test-mutation

test-mutation is a skill for Claude Code from motlin/claude-code-plugins. It costs 89 tokens per session (1,552 once invoked), scanned A, original, Apache-2.0.

A testing helper that makes small, temporary changes intended to behave like bugs, then checks whether the test suite catches them. Mutation testing measures whether tests notice incorrect behavior, not just whether code runs.

In plain words
What is it for?
It helps strengthen tests by writing checks for surviving mutations while keeping tests that pass on the original code.
Why use it?
It reveals tests that execute code but would not fail when that code is subtly wrong.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions Claude Code; mentions Codex.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the code plugin — 12 skills, 2 commands shipped together

Good fit It helps strengthen tests by writing checks for surviving mutations while keeping tests that pass on the original code.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add motlin/claude-code-plugins
Claude Code
/plugin install code

Made for: Claude Code.

Or install code, the plugin that ships this one along with the rest of its 12 skills, 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-mutation

README.md
[![agentmods](https://agentmods.dev/badge/skills/motlin/claude-code-plugins/test-mutation/github.svg)](https://agentmods.dev/skills/motlin/claude-code-plugins/test-mutation)
Your own site
<a href="https://agentmods.dev/skills/motlin/claude-code-plugins/test-mutation"><img src="https://agentmods.dev/badge/skills/motlin/claude-code-plugins/test-mutation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for test-mutation

Your own site · 80×15
<a href="https://agentmods.dev/skills/motlin/claude-code-plugins/test-mutation"><img src="https://agentmods.dev/badge/skills/motlin/claude-code-plugins/test-mutation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,552 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00089 $0.01552
Opus 5.5 $0.00036 $0.00621
Sonnet 5.5 $0.00018 $0.00310
Haiku 4.5 $0.00009 $0.00155

Measured 20d ago against content hash 0f493c16c043, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-mutation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 20d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/code/skills/test-mutation/SKILL.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test Mutation

Coverage shows which code ran; mutation testing shows whether any assertion would notice that code going wrong. Plant a small bug, run the tests, and if nothing fails, write the test that would have caught it. The mutation score is a signal, not a threshold: the output is tests that catch real bugs, not a number.

Load code:test-assertions, code:test-data and code:test-speed alongside this skill. New tests follow their shape: strict whole-value assertions, self-evidently fake literals, and extending an existing test file before creating one.

Resolve <plugin-root> first: in Claude Code use ${CLAUDE_PLUGIN_ROOT}; in Codex use the plugin root that contains this skills/test-mutation/SKILL.md file. The scripts below need Python 3.9 or later.

Arguments

  • Scope: a file, a directory, or the whole repo (the default). Only files in scope get mutants.
  • unattended: passed by callers such as burn. An unattended run asks the user nothing. Every question it would have asked becomes a queued finding instead (see Report).
  • Time budget: 8 minutes of mutant runs by default. Stop planting new mutants when it runs out, and report what is left unvisited.

Pick lines to mutate

Mutants only belong on lines the tests already run. A mutant on an uncovered line survives by definition, and that gap belongs to code:test-coverage. Measure coverage first, with the same script that skill uses, then rank files by churn and pick lines:

python3 <plugin-root>/scripts/coverage_baseline.py --root . run > "$WORKDIR/coverage.json"
python3 <plugin-root>/scripts/mutation_targets.py --root . targets "$WORKDIR/coverage.json" --paths <scope>...

Put $WORKDIR outside the repository so reports are never committed. The baseline must pass: if the suite fails before any change, stop and report it, because this skill never fixes a broken build.

targets skips vendored, generated and test files, files with no covered lines and files with no recent commits, and lists each skip with its reason. In each remaining file it picks at most 7 covered lines, one mutant per line, preferring relational operators, then logical connectors, then return values, then arithmetic. It never picks arid lines: logging, time and deadlines, metrics, tracing and pre-allocation. A mutant there is either equivalent or a bug nobody would write a test for.

Read the full file on GitHub · 101 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 20d ago First seen · 101 lines · 89 tokens per session scan A 0f493c16c043

Subscribe to this mod's changes

test-mutation is a skill published in the GitHub repository motlin/claude-code-plugins (20 stars, last pushed 2d ago), licensed Apache-2.0. It adds 89 tokens to every session and 1,552 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-15.

Related

test-mutation compared with skills from other repositories

test-mutation next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
test-mutationmotlin/claude-code-pluginsSkill202d agoApache-2.0A89Claude Code
engram-testing-coverageGentleman-Programming/engramSkill8.4k10d agoMITA25Claude Code, Codex
iterative-developmentalinaqi/maggySkill7128d agoMITA24Claude Code
tddglebis/claude-skillsSkill419todayMITA92Claude Code
mobiai-mobile-tddArisGuimera/MobiAI-CoreSkill4964d agoMITA38Claude Code
nw-ddd-eventsourcingnWave-ai/nWaveSkill63815d agoMITA38Claude Code
nw-leanux-methodologynWave-ai/nWaveSkill63815d agoMITA37Claude Code