mutation-testing
CommunityUncover hidden test gaps, ensure code quality.
System Documentation
What problem does it solve?
This Skill addresses the critical problem of insufficient test coverage and weak test assertions, even in codebases with high line coverage. It reveals if your tests truly verify behavior or merely execute code, helping you find and fix gaps before bugs reach production.
Core Features & Use Cases
- Intelligent Mutation Generation: Creates deliberate, small code changes (mutations) using Go AST analysis.
- Test Suite Validation: Runs your existing tests against these mutations to see if they "kill" (fail) the mutants, indicating effective tests.
- Gap Identification & Remediation: Pinpoints surviving mutants, analyzes why tests failed to catch them, and suggests targeted test improvements.
- Use Case: After writing new tests for a critical financial calculation, use this Skill to ensure the tests are robust enough to catch subtle off-by-one errors or incorrect arithmetic operations, providing confidence in the code's reliability.
Quick Start
To generate mutations for a Go file named 'wallet.go' and save them to 'mutations.json': ~/.claude/skills/mutation-testing/scripts/generate-mutations.sh --file wallet.go --output mutations.json Then, to run tests against a specific mutation (e.g., M0) in the './internal/wallet' package: ~/.claude/skills/mutation-testing/scripts/run-mutation-test.sh --mutation-file mutations.json --mutation-id M0 --package ./internal/wallet --output results/M0.json
Dependency Matrix
Required Modules
None requiredComponents
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: mutation-testing Download link: https://github.com/Roasbeef/claude-files/archive/main.zip#mutation-testing Please download this .zip file, extract it, and install it in the .claude/skills/ directory.