mutation-testing

Run mutation tests and report mutation scores for codebases.

8|3|Updated Sep 7, 2025
One-click install
npx skills add https://github.com/jwilger/claude-code-setup --skill mutation-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mutation-testing
Source: https://github.com/jwilger/claude-code-setup/tree/main/skills/mutation-testing
Command: npx skills add https://github.com/jwilger/claude-code-setup --skill mutation-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill rigorously verifies the quality of your test suite, going beyond simple code coverage to ensure your tests actually catch bugs. It automatically introduces small, deliberate "mutations" into your code and reports which ones your tests fail to detect, providing an objective measure of test effectiveness and guiding you to strengthen weak spots.

Core Features & Use Cases

  • Automated Mutation Execution: Run mutation tests using platform-appropriate tools (e.g., cargo-mutants for Rust, mutmut for Python, Stryker for JS/TS).
  • Mutation Score Reporting: Get a clear mutation score (percentage of "killed" mutants), with a mandatory threshold of ≥80% for new code.
  • Identification of Weak Tests: Pinpoint specific code mutations that your tests missed, indicating areas where your test suite needs improvement.
  • Use Case: Ensure your tests are truly effective at catching bugs, not just covering lines. Automatically identify weak spots in your test suite and get actionable recommendations to improve test quality and prevent regressions.

Quick Start

Run mutation tests for your project.

The AI will detect your project's language and use the correct tool.

Example for Rust:

cargo mutants

Example for Python:

mutmut run

Example for JavaScript/TypeScript:

npx stryker run