← ClaudeAtlas

mutation-testlisted

Proves a test actually checks something, by breaking the behaviour it claims to cover and confirming it goes red. Use when a test, fixture, assertion or guard has been reported as working and you want evidence rather than a green run, or to check a claim that some code is dead, unused or unreachable. Also use it to SCOPE that work to a PR or a diff — shortlisting the changed lines and giving you a throwaway checkout to break them in. It does not mutate anything for you. Triggers on "mutation test", "mutation testing", "prove it fails", "are these tests real", "does this test actually assert anything", "is that assertion live", "did you verify it's not vacuous", "which changed lines are tested", "is this PR actually covered", "are the changes in PR 123 tested", "check the coverage on this diff", "mutation test this PR", or any claim that a test passes being offered as evidence the behaviour is correct. Also use it proactively before reporting harness or fixture work as done.
LunarCommand/claude-skills · ★ 1 · Testing & QA · score 67
Install: claude install-skill LunarCommand/claude-skills
# Mutation testing A green test run is the **null result**, not evidence. A dead assertion and a live one produce identical output, so "it passed" discriminates nothing. This skill establishes the one thing that does discriminate: **break the behaviour and watch it go red.** Work is not done when it passes. It is done when it has been seen to fail for the right reason. ## Scope, and what this version does not do Two paths. **Path A** runs one claim at a time, by hand, mutating the file in place — the right answer for code you have just written, because a worktree cannot hold uncommitted work. **Path B** takes a PR or a diff and gives you the changed lines plus a throwaway checkout to work in; it needs committed work. Neither path applies a mutation for you — choosing the edit and judging the result are manual in both. There is no coverage map, so checking several lines means running the suite several times. ## Rules - **Break the source, never the test.** Mutating the test proves only that the test tests itself. - **Never mutate test files.** - **Copy the file before you touch it, and restore from that copy.** Not from git. The files this skill is pointed at are usually the ones just written, so they hold uncommitted work — `git checkout`, `git restore` and `git stash` destroy it rather than restoring it. `cp <file> <file>.mtbak`, mutate, then `mv` it back. - **Mutate the file where the tests actually load it from — in place.** The tempting shortcut is to muta