From aj-geddes-useful-ai-prompts-4
Evaluates test suite quality by introducing code mutations to find untested paths and weak tests. Covers Stryker, PITest, and mutmut.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aj-geddes-useful-ai-prompts-4:mutation-testingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- [Overview](#overview)
Mutation testing assesses test suite quality by introducing small changes (mutations) to source code and verifying that tests fail. If tests don't catch a mutation, it indicates gaps in test coverage or test quality. This technique helps identify weak or ineffective tests.
Minimal working example:
# Install Stryker
npm install --save-dev @stryker-mutator/core @stryker-mutator/jest-runner
# Initialize configuration
npx stryker init
# Run mutation testing
npx stryker run
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Stryker for JavaScript/TypeScript | Stryker for JavaScript/TypeScript |
| PITest for Java | PITest for Java |
| mutmut for Python | mutmut for Python |
| Mutation Testing Reports | Mutation Testing Reports |
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4Performs 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.
Validates test effectiveness using mutation testing with Stryker for TypeScript/JavaScript (Vitest/Jest) and mutmut for Python to identify weak tests.
Runs diff-scoped mutation testing to verify test quality beyond coverage metrics. Detects language and selects Stryker, mutmut, cargo-mutants, PIT, or gremlins.