Mutation Testing

Measuring test quality by mutating code and checking if tests catch mutations.

48 stars 10 forksTesting & QA Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add sethdford/claude-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add sethdford/claude-skills --skill mutation-testing
Manual install
git clone --depth 1 https://github.com/sethdford/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/engineer/testing/skills/mutation-testing ~/.claude/skills/mutation-testing

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Mutation Testing

Technique to measure how well tests detect bugs by injecting mutations.

## Context

You are using mutation testing to validate test quality. High mutation score means tests actually verify behavior.

## Domain Context

- **Mutation**: Small code change; operator flip, boundary change, constant modification
- **Killed**: Test fails on mutation; test is effective
- **Survived**: Test passes on mutation; gap in test coverage
- **Goal**: 80%+ mutation score indicates strong tests
- **Tools**: PIT (Java), Stryker (JavaScript), Mutant (Ruby)

## Instructions

1. **Run Baseline**: Execute test suite; note coverage
2. **Inject Mutations**: Tool modifies code (< becomes <=, true becomes false)
3. **Run Tests**: Check if tests catch each mutation
4. **Identify Survivors**: Which mutations did tests miss? Why?
5. **Strengthen Tests**: Add tests for survivor scenarios
6. **Repeat**: Run mutation testing again; iterate until satisfied

## Anti-Patterns

- Ignoring mutation testing; high code coverage doesn't guarantee good tests
- Trying to reach 100% mutation score; diminishing returns after 80%
- Adding tests just to kill mutations; tests should be meaningful
- Slow mutation testing blocking development; run on critical paths
- Not understanding why mutations survived; just adding tests blindly doesn't help

## Further Reading

- Richard Lipton, "The Fault-Based Testing (FBT) Paradigm"
- PIT documentation (Java mutation testing)
Read the full skill on GitHub

Details

Skill name
mutation-testing
Path
engineer/testing/skills/mutation-testing/SKILL.md
License
MIT
Repo updated
11 March 2026

FAQ

What does the Mutation Testing skill do?

Measuring test quality by mutating code and checking if tests catch mutations.

How do I install the Mutation Testing skill?

Claude Code plugin: /plugin marketplace add sethdford/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Mutation Testing popular?

It lives in sethdford/claude-skills, which has 48 GitHub stars and 10 forks.

Related skills

Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.