cirrus-uchicago/symbolon/prefer-implicit-nonzero-test-over-equality

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 the code branches on an arithmetic equality like (expr % m == 0), forcing KLEE to solve an explicit equality constraint and structuring branches around the rarer (zero) case first

Install

npx vskill@latest install cirrus-uchicago/symbolon/prefer-implicit-nonzero-test-over-equality

SKILL.md

The same SKILL.md was published earlier as cirrus-uchicago/symbolon/prefer-implicit-nonzero-test-over-equality.

prefer-implicit-nonzero-test-over-equality

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 the code branches on an arithmetic equality like (expr % m == 0), forcing KLEE to solve an explicit equality constraint and structuring branches around the rarer (zero) case first

Transformation

Rewrite the condition to test the value implicitly as a boolean (e.g., if(x%y) handles the nonzero/main case first, with the zero case in else), so the common path is taken on a simple nonzero constraint

Why it helps

KLEE's solver and path scheduler handle implicit nonzero truthiness branches more uniformly than explicit ==0 equalities; placing the broader (nonzero) constraint on the then-branch yields test inputs that are representative typical values rather than the single degenerate divisor case, improving replay coverage on sibling solutions

Example

Before:

c
#include <stdio.h>
int main(void) {
int n, m;
scanf("%d %d", &n, &m);
if (n % m == 0) {
printf("-1\n");
}
else
printf("%d\n", n);
}

After:

c
#include<stdio.h>
int x,y;
int main(void){
scanf("%d%d",&x,&y);
if(x%y)
printf("%d",x);
else
printf("-1");
return putchar('\n'),0;
}

Evidence

  • Average coverage delta: 0.6667
  • Source problems: train_AtCoder_p03437
  • Rule id: aa6c9d9c

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-implicit-nonzero-test-over-equality/badge)](https://verified-skill.com/skills/cirrus-uchicago/symbolon/prefer-implicit-nonzero-test-over-equality)

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