mutation-proof
Skill1 starsChanged 2 months agoMITView on GitHub
Prove that a test detects the bug it claims to prevent by deliberately breaking the production code and confirming the test goes red. Use before merging any new test, after fixing a bug, or when asked whether a suite is trustworthy. Includes running real mutation testing tools (Stryker, mutmut, go-mutesting).
In this repository34 other files it gives its agents.
- a11y-auditSkill
- api-contract-testingSkill
- autonomous-explorationSkill
- bug-reproSkill
- chaos-resilienceSkill
- ci-wiringSkill
- contract-testing-pactSkill
- coverage-ratchetSkill
- database-testingSkill
- e2e-authoringSkill
- environment-paritySkill
- exploratory-chartersSkill
- false-positive-hunterSkill
- flake-forensicsSkill
- i18n-l10n-testingSkill
- load-and-stressSkill
- never-break-prodSkill
- payment-testingSkill
- perf-budgetSkill
- qa-triageSkill
- regression-curationSkill
- release-gateSkill
- responsive-mobile-testingSkill
- risk-mapSkill
- root-cause-protocolSkill
- security-regressionSkill
- smoke-and-sanitySkill
- state-machine-testingSkill
- test-data-managementSkill
- test-strategySkill
- tracking-testingSkill
- transactional-email-testingSkill
- unit-test-authoringSkill
- visual-regressionSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Run only that test. Record the result.
- Distinctive: line 31
Never leave a mutation behind.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Mutation Proof
Coverage says the line ran. Mutation says the test would have noticed. Only the second is quality.
Level 1 — Targeted proof (always, per test, seconds)
For each new or suspect test:
- Identify the exact production line the test exists to defend.
- Apply one mutation to it:
| Original | Mutation |
if (a > b) | if (a >= b) |
return total | return 0 |
if (!user.isAdmin) throw | delete the guard |
status = 402 | status = 200 |
items.filter(x => !x.refunded) | drop the filter |
- Run only that test. Record the result.
- Red -> restore the code, the test is proven, note the mutation in the commit message. Green -> the test is a false positive. Fix the assertion, do not fix the mutation.
- Restore the file and re-run to confirm you are back to a clean tree (
git diff --exit-code).
Never leave a mutation behind. Verify with git status before finishing — a forgotten
mutation shipped to production is the one way this skill can hurt you.
Level 2 — Tool-driven mutation testing (per module, minutes)
| Stack | Tool | Command |
| JS/TS | Stryker | npx stryker run --mutate 'src/checkout/**/*.ts' |
| Python | mutmut | mutmut run --paths-to-mutate src/checkout |
| Go | go-mutesting | go-mutesting ./checkout/... |
| Java | PIT | mvn org.pitest:pitest-maven:mutationCoverage |
Scope it to P0 code only. Whole-repo mutation runs are slow, noisy, and get switched off within a week. Set a threshold on the P0 module and let the rest report without gating:
// stryker.conf.json
{ "mutate": ["src/checkout/**/*.ts"], "thresholds": { "high": 90, "low": 80, "break": 75 } }Reading the survivors
Each surviving mutant is a sentence: "we can change this behavior and nobody complains". Triage into three buckets:
- Real gap -> write the missing assertion.
- Equivalent mutant (behaviorally identical, e.g. a swapped order in a commutative op) -> annotate and exclude with a comment naming why.
- Dead code -> the mutation survives because nothing depends on the line. Delete the line.
Interaction with other skills
unit-test-authoring, api-contract-testing and e2e-authoring all end here. A test that
has not been through Level 1 does not count as done, and the orchestrator will not report it
as coverage.
Output
PROVEN tests/checkout.spec.ts:42 <- mutated charge.ts:88 (`>=` -> `>`) -> 1 failed ✓
UNPROVEN tests/cart.spec.ts:10 <- mutated cart.ts:31 (return 0) -> 0 failed ✗ false positive
Tree restored: git diff --exit-code -> cleanDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

