mutation-testing

mutation-testing is a skill for Claude Code from aks-builds/quality-skills. It costs 105 tokens per session (2,414 once invoked), scanned A, original, MIT.

A method for checking whether an existing test suite can detect small, deliberate bugs inserted into production code. Each inserted change is called a mutation, and tests should fail when they encounter one.

In plain words
What is it for?
Use it to find gaps in test coverage and assess test quality in languages supported by tools such as Stryker, PIT, mutmut, or go-mutesting.
Why use it?
It shows whether tests actually catch mistakes, rather than only measuring which lines of code they execute.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the quality-skills plugin — 57 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/aks-builds/quality-skills/mutation-testing
Any agent
npx skills add aks-builds/quality-skills --skill mutation-testing
Clone the repo
git clone --depth 1 https://github.com/aks-builds/quality-skills

Made for: Claude Code.

Or install quality-skills, the plugin that ships this one along with the rest of its 57 skills.

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 mutation-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/aks-builds/quality-skills/mutation-testing.svg)](https://agentmods.dev/skills/aks-builds/quality-skills/mutation-testing)
Your own site
<a href="https://agentmods.dev/skills/aks-builds/quality-skills/mutation-testing"><img src="https://agentmods.dev/badge/skills/aks-builds/quality-skills/mutation-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,414 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00105 $0.02414
Opus 5 $0.00053 $0.01207
Sonnet 5 $0.00021 $0.00483
Haiku 4.5 $0.00011 $0.00241

Measured 6d ago against content hash 8aa68f8a4c35, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

mutation-testing 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 6d 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.

skills/mutation-testing/SKILL.md · 235 lines

How it starts

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

Mutation Testing

You are an expert in mutation testing — a technique that measures how much your test suite actually catches by introducing small bugs (mutations) into your production code and checking whether tests fail. Your goal is to help engineers use mutation testing as a quality signal for their tests without falling into the trap of treating "mutation score" as another vanity metric. Don't fabricate mutation operators or tool features. When uncertain, point the reader to the relevant tool's docs.

Initial Assessment

Check .agents/qa-context.md (fallback: .claude/qa-context.md) before answering. Pay attention to:

  • Language — mutation tools are language-specific. The maturity varies (Java/.NET have the most mature tools; Python and Go are workable; some languages have weak ecosystems).
  • Test suite size and runtime — mutation testing runs the suite once per mutation. A 5-minute suite × 1000 mutations = a long run.
  • Coverage baseline — mutation testing on uncovered code finds nothing. Cover the code first, then assess test quality.
  • Goal — gap-finding (recommended) or release gate (rarely a good idea).

If the file does not exist, ask: language, current suite runtime, coverage baseline, and what motivated the mutation-testing question.


What mutation testing is

Mutation testing introduces small, semantically-meaningful bugs (called mutations) into your production code and runs the test suite. Each mutation falls into one of three outcomes:

Outcome Meaning
Killed At least one test failed. Good — tests caught the bug.
Survived All tests still passed. Bad — the mutation went undetected.
No coverage The mutation is in code with no test coverage at all. Mutation testing isn't the right tool yet; cover first.
Timeout / error Mutation caused infinite loop or runtime error. Usually informational.

Mutation score = killed / (killed + survived). Higher is better. But — same as line coverage — chasing a number without understanding the cause is a trap.

Read the full file on GitHub · 235 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago First seen · 235 lines · 105 tokens per session scan A 8aa68f8a4c35

Subscribe to this mod's changes

mutation-testing is a skill published in the GitHub repository aks-builds/quality-skills (2 stars, last pushed 2d ago), licensed MIT. It adds 105 tokens to every session and 2,414 once invoked, about $0.0005 per session on Opus 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-08-31.

Related

Other skills, from other repositories

defect-analyzer

Use when someone asks to analyze a defect report, analyze bug data, perform defect metrics analysis, review a defect log, or upload a defect file for quality insights.

ukkuru/testmetry-skills · 38 tokens

test-case-writer

Use when someone asks to generate test cases, write test cases from a user story, create test cases from a BRD, design test cases from a mockup or wireframe, or produce a test case table from requirements.

ukkuru/testmetry-skills · 50 tokens

api-testing

接口级测试时使用——从 OpenAPI/Swagger 文档或用例 Schema 中可自动化的接口用例出发,覆盖参数、边界、鉴权、幂等、并发、错误响应与数据一致性,产出可执行的 API 测试脚本与运行结果;含接口压测承接(k6,类型矩阵轴 1 执行层)。不用于:Web UI 流程(automated-e2e-testing)、手动用例编写(test-case-writing)。.

fishzjp/qa-skills · 117 tokens

test-strategy

回答"这个功能应该怎么测"——把风险翻译成两域测试范围与深度。策略位于"需求 → 风险分析 → 策略 → 测试设计 → 用例"链路中,跳过策略直接写用例是本框架明确反对的。.

fishzjp/qa-skills · 103 tokens

regression-testing

代码变更(diff/Bug 修复/需求变更)后判断应回归哪些测试时使用——沿"改动文件 → 改动函数 → 受影响功能 → 受影响用例"分析链,基于用例 Schema 的追溯映射产出分级回归清单。不用于:用例文件本身的增量修改(test-case-writing)、长期回归策略(test-strategy)。.

fishzjp/qa-skills · 98 tokens

test-case-review

回答"这些测试用例到底测得好不好"——事后、独立的审查(写时自审归 test-case-writing 阶段四)。.

fishzjp/qa-skills · 95 tokens