cirrus-uchicago/symbolon/prefer-decrementing-while-over-for-counter

Claude Code and agent skill by cirrus-uchicago/symbolon

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when a fixed-iteration loop uses a for-statement with an incrementing counter compared against a constant upper bound (e.g., for(i=0;i<N;i++))

Install

npx vskill@latest install cirrus-uchicago/symbolon/prefer-decrementing-while-over-for-counter

SKILL.md

The same SKILL.md was published earlier as cirrus-uchicago/symbolon/prefer-decrementing-while-over-for-counter.

prefer-decrementing-while-over-for-counter

Overview

A KLEE-coverage code transformation. Applying it rewrites C source so symbolic execution explores more of the program's behavior.

When to use

When a fixed-iteration loop uses a for-statement with an incrementing counter compared against a constant upper bound (e.g., for(i=0;i<N;i++))

Transformation

Rewrite as a while-loop initialized to N that decrements toward zero and tests inequality with zero (e.g., i=N; while(i!=0){...; i--;})

Why it helps

KLEE's symbolic state and constraint solver handle comparisons against zero more efficiently than against arbitrary constants, and a single decrement-and-test produces simpler path conditions per iteration, reducing solver load and enabling deeper exploration within the same budget.

Example

Before:

c
#define scanf_s scanf
#include<stdio.h>
int main(void) {
int a, b, i;
for (i = 0; i < 7; i++) {
scanf_s("%d %d", &a, &b);
printf("%d\n", a - b);
}
return(0);
}

After:

c
#include<stdio.h>
int main(void){
int i=7,a,b;
while(i!=0){
scanf("%d %d",&a,&b);
printf("%d\n",a-b);
i--;
}
return 0;
}

Evidence

  • Average coverage delta: 0.3333
  • Source problems: train_AIZU_p00271
  • Rule id: 3db21883

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
11
7-day trend score
17

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/cirrus-uchicago/symbolon/prefer-decrementing-while-over-for-counter/badge)](https://verified-skill.com/skills/cirrus-uchicago/symbolon/prefer-decrementing-while-over-for-counter)

Something wrong with this skill or its page? Tell us.