Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aj-geddes avatar

Mutation Testing

  • 422 installs
  • 305 repo stars
  • Updated March 4, 2026
  • aj-geddes/useful-ai-prompts

mutation-testing is an agent skill that runs mutation testing with Stryker, PITest, or mutmut to expose weak unit tests for developers who need behavioral test confidence before release.

About

mutation-testing is an agent skill from aj-geddes/useful-ai-prompts that evaluates unit test effectiveness by injecting small code mutations and checking whether tests fail. It explains mutation concepts including killed, survived, equivalent, and timed-out mutants, plus mutation operators for arithmetic, conditional, and boundary changes. The skill provides tool-specific guidance for Stryker on JavaScript and TypeScript, PITest on Java, mutmut on Python, and Infection on PHP, including setup, CI integration, and report interpretation. Developers reach for mutation-testing when line coverage looks high but tests may not verify real behavior, or before release on critical modules like billing, auth, or pricing logic. It recommends targeting critical paths rather than entire repositories and aiming for roughly 80 percent mutation scores on important code. Output is mutation reports, survived-mutant analysis, and strengthened test assertions rather than new application features.

  • Mutant generation
  • Kill rate analysis
  • Weak assertion detection
  • CI integration patterns
  • Coverage vs quality gap

Mutation Testing by the numbers

  • 422 all-time installs (skills.sh)
  • Ranked #642 of 2,153 Testing & QA skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill mutation-testing

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs422
repo stars305
Last updatedMarch 4, 2026
Repositoryaj-geddes/useful-ai-prompts

How do you find weak unit tests with mutation testing?

Run mutation testing to find weak unit tests, improve assertions, and raise confidence before release by verifying tests catch injected faults.

Who is it for?

Developers with existing unit tests who need to verify tests catch real bugs beyond line coverage metrics before release.

Skip if: Greenfield projects without tests yet or teams wanting fast full-repo mutation runs on every CI build without scoping critical modules.

When should I use this skill?

User asks for mutation testing, Stryker setup, mutmut runs, test effectiveness analysis, or wants to find weak assertions before release.

What you get

Mutation testing reports, mutation scores, survived-mutant analysis, and improved test assertions that kill injected faults.

  • mutation test report
  • survived-mutant list
  • strengthened test cases

By the numbers

  • Covers 4 mutation testing tools: Stryker, PITest, mutmut, and Infection
  • Recommends roughly 80% mutation score target on critical code modules

Files

SKILL.mdMarkdownGitHub ↗

Mutation Testing

Table of Contents

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.

When to Use

  • Evaluating test suite effectiveness
  • Finding untested code paths
  • Improving test quality metrics
  • Validating critical business logic is well-tested
  • Identifying redundant or weak tests
  • Measuring real test coverage beyond line coverage
  • Ensuring tests actually verify behavior

Quick Start

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

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Stryker for JavaScript/TypeScriptStryker for JavaScript/TypeScript
PITest for JavaPITest for Java
mutmut for Pythonmutmut for Python
Mutation Testing ReportsMutation Testing Reports

Best Practices

✅ DO

  • Target critical business logic for mutation testing
  • Aim for 80%+ mutation score on important code
  • Review survived mutants to improve tests
  • Mark equivalent mutants to exclude them
  • Use mutation testing in CI for critical modules
  • Test boundary conditions thoroughly
  • Verify actual behavior, not just code execution

❌ DON'T

  • Expect 100% mutation score everywhere
  • Run mutation testing on all code (too slow)
  • Ignore equivalent mutants
  • Test getters/setters with mutations
  • Run mutations on generated code
  • Skip mutation testing on complex logic
  • Focus only on line coverage

Related skills

How it compares

Pick mutation-testing over code-coverage skills when line coverage is high but you need proof that tests detect injected behavioral faults.

FAQ

Which mutation testing tools does mutation-testing cover?

mutation-testing covers Stryker for JavaScript and TypeScript, PITest for Java, mutmut for Python, and Infection for PHP. The skill provides tool-specific setup, run commands, and report interpretation for each.

What mutation score should developers target?

mutation-testing recommends aiming for roughly 80% mutation score on critical business logic modules. Full-repository runs are discouraged because mutation testing is slow and most valuable on high-risk code paths.

What does a survived mutant indicate?

mutation-testing explains that a survived mutant means tests still pass after a code change, revealing a gap in assertions or boundary coverage. Survived mutants should be reviewed to add tests that verify actual behavior.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.