/mutation-testing:principles [question or concept]from mutation-testing
Answers mutation-testing questions from primary literature: mutant states, score vs coverage, equivalent mutants, arid nodes, coupling effect, and tool selection.
Ships in mutation-testing. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Distilled from the primary sources, the foundational papers, the industrial-scale reports, and the
tool documentation that defines the vocabulary everyone else borrows. Reference files in
reference/ are source-attributed; this file routes and answers the common questions without a load.
| Query about... | Load |
|---|---|
| Mutant states (killed/survived/no-coverage/timeout), operator catalogs, what a mutation actually is | operators-and-states.md |
| Mutation score, covered-code score, test strength, MSI, the oracle gap, what to report | metrics.md |
| Cost, diff-scoping, arid nodes, productive vs unproductive mutants, suppression, why not to gate | scaling-and-suppression.md |
| Which tool for which ecosystem, what each supports, what to do when no tool exists | tooling.md |
| Equivalent mutants, coupling effect, competent programmer hypothesis, the theory | theory.md |
"What is mutation testing?". Coverage tells you a line executed. It cannot tell you the line was checked. Mutation testing introduces a small deliberate fault (a mutant), re-runs the tests, and observes: tests fail → the mutant is killed, something genuinely asserted on that behavior; tests pass → the mutant survived, that line ran and nothing noticed it was wrong. The mutation is always reverted; the source is unchanged at the end.
"Is it just better coverage?". It answers a different question. Coverage measures execution; mutation testing measures fault detection. PIT states it directly: line coverage "does not check that your tests are actually able to detect faults." A file at 100% coverage and 40% mutation score has tests that run the code and assert almost nothing about it.
"Which number do I look at?". The covered-code one, always. Plain mutation score mixes two unrelated problems: "my tests are weak" and "I have no tests here." The covered-code variant (PIT calls it test strength, Infection calls it Covered Code MSI) isolates the first. A wide gap between the two means the coverage you have is thin, not that the tests are bad.
"Should we fail the build on a mutation score?". No, and this is the single most common way adoption fails. The score is depressed by equivalent mutants that no test can ever kill, so a hard threshold rewards suppressing mutants over writing tests. Report it; do not gate on it. Scaling and suppression mechanics: see scaling-and-suppression.md.
"Isn't this too slow to be practical?". Naive whole-repo mutation testing is, and that is why the technique sat unused for thirty years. The industrial answer is architectural, not computational: mutate only the changed lines, at most one mutant per line, suppress uninteresting nodes, and surface the result as a review-time prompt rather than a report. Google reports a median of 7 mutants per changelist under that regime against 820 for traditional mutagenesis.
"A mutant survived. Now what?". Three possible answers, and telling them apart is the whole skill:
"Why can't the tool tell me which?". Deciding equivalence is undecidable in general
(Jia & Harman). That is why the classification is a judgment step, and why
/mutation-testing:audit delegates it to a fresh context rather than to the context that authored
the tests.
/mutation-testing:audit./testing:write./mutation-testing:audit./mutation-testing:setup./tdd:principles when the tdd plugin is installed; without it, consult your project's own
test-design guidance./code-metrics:principles when the code-metrics plugin is
installed; without it, hold to the one rule this skill does own: coverage records execution,
not detection, and no coverage figure substitutes for a mutation score.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
mutation-testing, test-quality, fault-detection, test-strength
npx claudepluginhub melodic-software/claude-code-plugins --plugin mutation-testing3 skills in this plugin
/auditRepository context. Gather firstMutation analysis that reports surviving mutants, on the diff or, with `--exercised`, on the production code the changed tests call. Use when: the user asks to run mutation testing or for a mutation score on a change ('run mutation testing'), doubts a suite whose coverage looks healthy ('my coverage is high but I do not trust it'), asks whether the tests, including ones just written, actually check the code, asks to audit test quality, or wants the survivors persisted for the fix pass; after tests go green and before review./setupPurposeVerify and configure the mutation-testing plugin for this repository. check inspects the ecosystem's mutation tool (installed, runnable, supported test runner), the baseline suite's health, and the tracked docs/conventions/mutation-testing.yaml config across its merge layers, read-only; apply detects the ecosystem, installs or names the tool, interviews for the diff target and operator set, and writes the config plus an empty arid-node suppression record. Use when: 'set up mutation testing', 'is mutation testing configured', 'which mutation tool for this repo', 'mutation-testing setup', or the audit skill ran on fallback defaults or reports an unavailable tool. Re-runnable. Safe to invoke again to reconfigure.Other plugins' skills for the same job