Help us improve
Share bugs, ideas, or general feedback.
From testing
Performs mutation testing using Claude as the mutation engine: generates code mutants, runs tests, tracks kill/survive rates, identifies test gaps, and recommends test improvements. No external mutation tools required.
npx claudepluginhub dawid-dahl-umain/augmented-ai-development --plugin testingHow this skill is triggered — by the user, by Claude, or both
Slash command
/testing:mutation-testingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are the mutation engine. Systematically mutate source code, run tests against each mutant,
Runs mutation testing workflow: mutates source code module-by-module, executes tests per mutation, writes tests for survivors, verifies, commits. Tracks multi-session progress.
Runs mutation testing to validate test suite quality across multiple stacks (Stryker, Infection, go-mutesting, mutmut, Vitest). Use when verifying test effectiveness or after generating tests.
Runs mutation testing on changed files to verify AI-generated test quality, computes kill score, and optionally auto-fixes surviving mutants.
Share bugs, ideas, or general feedback.
You are the mutation engine. Systematically mutate source code, run tests against each mutant, and identify test suite weaknesses. No external mutation testing tools — you do everything.
Scope: If $ARGUMENTS specifies files or directories, use that as the mutation target.
Otherwise, ask the user what to mutate — offer: "changed files (git diff)", "specific file/module",
or "all source files in a directory".
Environment detection:
package.json scripts for test/vitest/jest → npx vitest run, npx jest --no-coverage, etc.python -m pytest -xcargo testmvn test -pl <module> or gradle testgo test ./...git status. If they have uncommitted or unstaged changes, STOP — do not proceed. Tell the user to commit or stash first. This is a hard gate: the entire safety model depends on git checkout being a safe reset, which only works on clean, committed files.Read each target source file. For each file:
Identify mutation candidates — prioritize:
Select operators from references/MUTATION_OPERATORS.md. Prefer the "Key Five": Arithmetic, Relational, Logical, Unary, Return Value. Pick 1-2 operators per candidate.
Pre-filter equivalent mutants — skip mutations you can identify upfront as producing identical behavior (e.g., mutating dead code, or x >= 0 when x is always positive by type constraint).
Ask the user how many mutations to run (minimum 1, maximum 10). Report total candidates found and suggest a default of 5. Rank candidates by priority so the top N are the most impactful.
Present the mutation plan (top N by priority):
## Mutation Plan
Target: [file(s)]
Test command: [detected command]
Baseline: All tests passing
Candidates found: [total] | Running: [user-chosen count]
| # | File:Line | Original | Mutant | Category |
|---|-----------|----------|--------|----------|
| 1 | calc.ts:12 | a + b | a - b | Arithmetic |
| 2 | calc.ts:18 | x > 0 | x >= 0 | Boundary |
| ... | | | | |
Wait for user confirmation. The user may add, remove, or modify mutations before proceeding.
For EACH approved mutation:
old_string to guarantee Edit uniqueness.git checkout -- <file>. This is the primary restore — it always returns the file to its committed state regardless of what happened during the mutation.git diff <file> — output must be empty. If not, STOP and alert the user.All safety depends on the hard gate in Step 1: target files must be committed and clean. This makes git checkout -- <file> a guaranteed reset at every layer:
git checkout -- <file> after each test run (Step 3.5)git diff <file> must be empty after restore (Step 3.6)git checkout -- <file> all target files, then stopgit checkout — files were committedIf the pre-condition is not met (files have uncommitted changes), do not start mutation testing. There is no safe fallback without it.
git checkout restore fails or git diff shows residual changes, STOP immediately and alert the usergit checkout -- <file> before stoppingAfter each mutation, show progress:
Progress: 3/5 | Killed: 2 | Survived: 1
Present the full report:
## Mutation Testing Report
**Mutation Score: [killed]/[total] ([percentage]%)**
| Status | Count |
|--------|-------|
| Killed | N |
| Survived | N |
| Timeout | N |
| Build Error | N |
### Surviving Mutants
| # | File:Line | Original | Mutant | Category | Why It Survived |
|---|-----------|----------|--------|----------|-----------------|
| 1 | calc.ts:18 | x > 0 | x >= 0 | Boundary | No test for x=0 edge case |
| ... | | | | | |
### Summary
[Brief narrative: what areas are well-tested, what areas have gaps]
For each survivor, explain why it survived — what specific assertion or test case is missing.
Categorize each surviving mutant:
Present recommendations:
### Recommended Fixes (meaningful gaps):
1. **Mutant #N** [File:Line]: Add test for [specific scenario]. This reveals [specific weakness].
### Equivalent Mutants (no action needed):
- **Mutant #N**: [Why behavior is identical]
### Low Priority:
- **Mutant #N**: [Why this is low value]
Ask the user which fixes to implement. Do NOT auto-fix.
For each user-approved fix:
If a new test doesn't kill the mutant, explain why and suggest alternatives. After all approved fixes, show the updated mutation score.