regression-proof — Claude Code skill: bug fixes backed by a failing test
This skill walks the agent through a bug fix: write a test that fails on the old behavior, apply the fix, then watch the same test pass.
npx skills add Neeeophytee/finding-unknowns-skills --skill regression-proof -a claude-codeWhat regression-proof does
The skill fixes an order of operations for a reported bug. The agent records the starting state, uncommitted changes included, and tries to reproduce the failure on the baseline before touching anything, separating a real product failure from a broken test environment.
Next comes the smallest regression test that hits the actual failing path. It runs against the original code, and the failure has to match the reported reason rather than an import error or a missing dependency. Then the agent traces the cause and makes a scoped fix. The same test runs again on the fixed code. When the fix predates the test, the comparison happens in an isolated copy or worktree, and the user's working tree stays as it is.
Finally the agent checks the neighboring behavior most likely to break and adds a discriminating case if an incomplete fix would still pass the reproducer. Weakening assertions, editing expected behavior just to get green, or mocking away the boundary where the bug lives is off the table. A missing dependency or an unavailable original version counts as a verification limit, not as proof the fix is right. A local reproducer does not authorize production writes or an unrelated refactor.
What it helps with
- reproduce a reported bug before editing code
- add a regression test that fails on the original behavior
- tell a product failure apart from a broken test environment
- review a proposed fix without silently changing production code
- spot neighboring behavior an incomplete fix would break
Example prompts for the agent
- Reproduce the bug from the issue and add a regression test that fails before the fix
- Check this proposed fix: the test should fail on the original code and pass after the change
- Fix the failure in
parser.pyand show the test result before and after
How to install regression-proof
1Skills CLI (Vercel)
npx skills add Neeeophytee/finding-unknowns-skills --skill regression-proof -a claude-code2Manually: put the files in place
~/.claude/skills/regression-proof/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/regression-proof/
1Skills CLI (Vercel)
npx skills add Neeeophytee/finding-unknowns-skills --skill regression-proof -a codex2Manually: put the files in place
.agents/skills/regression-proof/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Neeeophytee/finding-unknowns-skills --skill regression-proof -a cursor2Manually: put the files in place
.cursor/skills/regression-proof/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Neeeophytee/finding-unknowns-skills regression-proof2Manually: put the files in place
.github/skills/regression-proof/SKILL.md1Skills CLI (Vercel)
npx skills add Neeeophytee/finding-unknowns-skills --skill regression-proof -a gemini-cli2Platform CLI
gemini skills install https://github.com/Neeeophytee/finding-unknowns-skills --path skills/regression-proofManually: put the files in place
.devin/skills/regression-proof/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Neeeophytee/finding-unknowns-skills --skill regression-proof -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about regression-proof
How do I install regression-proof in Claude Code?
Run npx skills add Neeeophytee/finding-unknowns-skills --skill regression-proof -a claude-code. The skill lands in ~/.claude/skills/regression-proof/SKILL.md.
What does regression-proof do?
It drives the agent through reproducing the failure, adding a minimal regression test, confirming it fails on the original behavior, applying the fix, and rerunning that test.
How is regression-proof different from a coverage audit?
It handles one reported bug and its reproducer. A general coverage audit or a new-feature workflow is outside its scope.
Source text
SKILL.md · MIT
--- name: regression-proof description: Fix a reported bug with a regression test that demonstrably fails on the original behavior and passes after the fix. Use when implementing a bug fix or checking whether a proposed fix actually addresses a reported failure. Not a general coverage audit or new-feature workflow. --- # Regression proof A passing test is evidence for a fix only if it can distinguish the broken behavior from the intended behavior. ## Steps 1. Establish the reported failure, expected behavior, and authorized scope from the request, relevant code, and existing tests. Record the starting state, including uncommitted changes. Run the relevant baseline and reproduce the bug before editing when possible; distinguish a product failure from a broken test environment. 2. Add the smallest regression test that exercises the real failing path and asserts the required outcome. Run it against the original behavior and verify that it fails for the reported reason, not an import error, missing dependency, or unrelated failure. Reuse an existing test if it already demonstrates this. 3. Trace the cause and make a scoped fix when implementation is authorized. For review-only requests, assess the proposed fix without silently changing production code. Preserve the evidence from the original failure. 4. Run the same regression test against the fixed behavior. If the fix existed before the test, compare with the original implementation in an isolated copy or worktree that preserves the relevant starting state. Do not reset the user's working tree. If an equivalent comparison cannot be made, report that limitation rather than claiming a verified before/after result. 5. Check the neighboring behavior most likely to be affected. Where an incomplete fix could pass the reproducer, add a discriminating case. Use reference comparisons, bounded randomized checks, or performance measurements only when the failure mechanism warrants them; record seeds and conditions needed to reproduce results. 6. Finish with the cause, fix or review finding, commands and observed before/after outcomes, adjacent checks, and remaining uncertainty. If the bug cannot be reproduced or expected behavior is unresolved, say what evidence is missing and avoid a speculative fix. Stop once the scoped claim is supported and relevant checks pass. ## Guardrails - Never weaken assertions, change expected behavior merely to make a test pass, or mock away the boundary responsible for the bug. - Preserve existing tests and unrelated user changes. Keep comparison artifacts isolated; do not use destructive checkout or reset operations to recreate the original failure. - A missing dependency or unavailable original version is a verification limitation, not proof of correctness. Keep pre-existing failures separate from regressions caused by the fix. - Keep execution within the task's authorization. A local reproducer does not authorize production writes, external side effects, or an unrelated refactor. - A regression test establishes the tested behavior, not the absence of all bugs. This skill does not change the host's reasoning-effort setting.
© Neeeophytee · MIT · Neeeophytee/finding-unknowns-skills