Testing & QA Automation
Compatible with Cursor, Claude Code, Cline, Roo Code, Antigravity

Simulated Mutation Testing & Branch Coverage Verification

Audit test suites by simulating mutant bugs (flipped conditionals, off-by-one errors) to expose weak assertions.

TestingMutation TestingStrykerPitestCode Quality
Skill Objective

Simulate code mutants (negating conditionals, swapping return values, removing boundary checks) to identify surviving mutants and strengthen weak assertions.

Execution Workflow Procedure

Ordered steps the coding agent executes when performing this skill.

1

Generate Realistic Code Mutants

Create 5-8 subtle mutations in the target code (e.g. changing > to >=, modifying arithmetic, returning default values).

2

Evaluate Test Suite Kill Rate

Check if the existing test suite fails (kills the mutant) or gives false confidence (mutant survives).

3

Deliver Hardened Test Cases

Write new, targeted unit tests that kill every surviving mutant and achieve 100% mutation score.

Agent Safety Guardrails & Anti-Hallucination Rules

  • DO NOT rely on line coverage as proof of test quality; verify that assertions actually test behavior.
  • DO NOT use vague toBeTruthy() or toBeDefined() assertions where exact value checks are possible.

Expected Output Format

Surviving mutant report and strengthened test cases.

🐛 Simulated Mutants Table: Mutant, Location, Status (Killed/Survived).
🧪 Hardened Test Cases: New tests killing all surviving mutants.

Domain Verification Checks

Surviving Mutant Kill: Discovers and kills mutants that slip through unit tests.
Strict Equality Assertions: Replaces vague truthy checks with exact values.
False Confidence Elimination: Ensures test suite genuinely catches regressions.

Example Agent Invocations

"Run a simulated mutation testing analysis on our password validation logic and unit tests."
"Check if our discount calculation unit tests catch off-by-one boundary bugs."

Install / Configure This Skill

# Place in .cursorrules or create .cursor/rules/simulated-mutation-testing-verification.mdc
# Trigger: Whenever you perform simulated mutation testing & branch coverage verification

---
name: simulated-mutation-testing-verification
description: Audit test quality by simulating code mutants to expose weak assertions and false confidence.
version: 1.0.0
compatibility: [Cursor, Claude Code, Cline, Roo Code, Antigravity]
---

# Simulated Mutation Testing & Branch Coverage Verification

## Objective
Expose weak assertions in unit test suites by introducing realistic code mutations and providing tests to kill every surviving mutant.

## Workflow
1. **Mutant Generation**: Introduce conditional flips, off-by-one errors, and boundary changes.
2. **Kill Rate Analysis**: Identify which mutants pass undetected by existing unit tests.
3. **Test Hardening**: Write precise assertions that fail whenever logic is altered.
Complementary Agent Prompt

Need a quick one-time prompt for chat?

Try the Mutation Testing & Missing Branch Coverage Finder — a lightweight version designed for 1-click copying directly into Claude, ChatGPT, or Cursor chat.

View Prompt

SprintKit Workflow Integrations

Complementary tools and checklists to pair with this agent workflow.

Related Agent Skills

Explore related procedural workflows in this discipline.

All Skills

Comprehensive Unit Test Suite Generation (AAA Pattern)

Generate mutation-tested unit tests with Arrange-Act-Assert structure, boundary cases, and proper mock boundaries.

TestingJUnitVitest+3
3 workflow stepsView skill

Flaky CI Test & Async Timing Resolution

Fix nondeterministic test failures, unhandled async promises, and race conditions in Playwright, Jest, or Vitest.

TestingPlaywrightVitest+3
3 workflow stepsView skill

Strict TypeScript Type Safety & Soundness Audit

Audit TypeScript code for type safety, type narrowing, generics, mutation traps, and runtime boundary validation.

TypeScriptNode.jsClean Code+1
4 workflow stepsView skill