n-popescu/Inkypaint / .claude/skills/snx-code-quality
snx-code-quality
VerifiedRFC #142's C rules: strict ISO C99, no redundant state, indices not pointer chains, one allocation per owner, atomics apart, no stored pointers, one global struct per file. Use when writing or reviewing C in src/.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.4 KB |
| check.pyexecutable | script | 13.4 KB |
| examples.md | markdown | 10.9 KB |
| test/fixtures/clean.c | other | 1.7 KB |
| test/fixtures/expected.txt | markdown | 668 B |
| test/fixtures/flagged.c | other | 1.0 KB |
| test/test-check.shexecutable | script | 1.1 KB |
test/test-check.sh
View on GitHub#!/bin/sh
# Gate test of snx-code-quality/check.py: each rule found once in fixtures/flagged.c, nothing in fixtures/clean.c
# (near misses: a feature flag, two pointers, padded atomics, extern atomics, text in comments and strings, two
# owners, a const table), exit 0 with candidates and 2 on a path it cannot read. CHECK=<edited copy> runs a mutant.
cd "$(dirname "$0")" || exit 1
CHECK=${CHECK:-../check.py}
fail=0
got=$(python3 "$CHECK" fixtures/flagged.c fixtures/clean.c 2>/dev/null)
status=$?
if [ "$got" != "$(cat fixtures/expected.txt)" ]; then
echo "FAIL: candidates differ"; printf '%s\n' "$got" | diff fixtures/expected.txt - ; fail=1
fi
[ $status -eq 0 ] || { echo "FAIL: exit $status with candidates, want 0"; fail=1; }
python3 "$CHECK" fixtures/no-such-file.c >/dev/null 2>&1
[ $? -eq 2 ] || { echo "FAIL: an unreadable path must exit 2"; fail=1; }
[ -z "$(python3 "$CHECK" fixtures/clean.c 2>/dev/null)" ] || { echo "FAIL: clean.c has candidates"; fail=1; }
[ $fail -eq 0 ] && echo "check.py: 7 candidates in flagged.c, none in clean.c, exit codes: passed"
exit $fail
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |