mutation-testing

Introduces deliberate code mutations to measure test suite effectiveness and report coverage gaps.

3|Updated Oct 28, 2020
One-click install
npx skills add https://github.com/k0d3x8its/dotfiles --skill mutation-testing-k0d3x8its
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mutation-testing
Source: https://github.com/k0d3x8its/dotfiles/tree/main/claude/.claude/skills/mutation-testing
Command: npx skills add https://github.com/k0d3x8its/dotfiles --skill mutation-testing-k0d3x8its

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code coverage metrics show which lines run during tests but not whether tests actually verify behavior. This Skill reveals weak tests by introducing deliberate bugs into production code one at a time and checking whether the test suite catches each one, exposing gaps that coverage reports miss. ## Core Features & Use Cases - Guided Mutation Workflow: Applies 3-8 targeted mutations per file from a catalogue of eight categories (side-effect deletion, condition negation, boundary changes, return value swaps, and more), running the test suite after each and reverting immediately via git. - Diagnostic Quality Assessment: Rates each killed mutation as Clear, Indirect, or Cascading to evaluate how actionable test failure messages are. - Actionable Reporting: Produces a summary table with mutation score, lists survived mutations with explanations, and writes [TEST] TODOs to TODOS.md for closure via the /tdd workflow. - Use Case: Before a release, run mutation testing on a critical module like the payment pipeline to discover that a deleted cache-write line goes unnoticed by any test, then track the gap as a TODO. ## Quick Start Ask the AI to run mutation testing on a specific file or directory, for example: run mutation testing on the src/pipeline module.

Frequently Asked Questions about mutation-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run mutation testing on my codebase?▼

Invoke the skill with a file, directory, or description of scope, such as a specific module. It applies 3-8 deliberate mutations per file, runs your test suite after each one, reverts via git checkout, and reports which mutations survived as test gaps.

What is mutation testing and how is it different from code coverage?▼

Mutation testing introduces small deliberate bugs into source code and checks whether tests fail, measuring whether tests verify behavior. Code coverage only shows which lines executed, so fully covered code can still have tests that assert nothing meaningful.

Does mutation testing work with pytest, Jest, or Go test?▼

Yes, the skill detects the test runner automatically by looking for pytest.ini, pyproject.toml, package.json test scripts, go.mod, Cargo.toml, Makefiles, or CI configs. If it cannot determine the test command, it asks the user directly.

Is mutation testing safe for my working tree?▼

Yes, the skill requires a clean git working tree before starting and reverts every mutation immediately with git checkout after each test run. It verifies the revert with git diff and never mutates test files, imports, or docstrings.

What happens to mutations that my tests don't catch?▼

Survived mutations are reported with an explanation of the untested behavior and written to TODOS.md as critical [TEST] items. They are meant to be closed with the /tdd skill's red-green-refactor loop rather than ad-hoc test writing.

When should I not use mutation testing?▼

Avoid it when the test suite is already failing, when there are uncommitted changes to files in scope, or on boilerplate and trivial accessors with no meaningful logic. Slow test suites may also require running relevant subsets instead of the full suite per mutation.