What this skill teaches your AI coding agent
Mutation Testing and Fault Fuzzing tests the quality of the test suite itself rather than trusting raw line-coverage numbers. The agent injects subtle synthetic defects into target logic: inverting comparison operators, flipping conditional booleans, clearing collection returns, or altering loop boundary conditions. It then runs the test suite. If all tests pass despite the corrupted code, the test suite is deemed deficient, and the agent is tasked with authoring targeted edge-case assertions to kill the surviving mutant.
Mutation Testing & Fault Fuzzing is an open-source testing skill licensed under MIT that injects synthetic bugs to audit and harden unit test suites.
You need strict, reproducible guardrails enforcing testing & qa discipline across agent interactions.
You are building quick disposable prototypes where architectural consistency and test verification are unnecessary.
Activation boundaries & prompt triggers
- 💬 "User prompts: "Synthetic fault-injection playbook evaluating test suite effectiveness by m...""
- 💬 "User asks to evaluate test suite quality or identify undetected regressions and dead code branches."
- 💬 "When autonomous agent needs strict protocol guardrails"
- ⛔ Introduce targeted AST mutations (operator swaps, boundary tweaks) into production code.
- ⛔ Verify that the existing test suite fails (kills) each introduced mutant.
- ⛔ Do not mark test suites as sufficient based solely on high line coverage percentages.
Inject into Claude.ai, Claude Code, or Cursor
Choose your agent runtime to install the playbook directly into local configuration.
.cursor/rules/mutation-testing-fuzzer.mdc---description: Synthetic fault-injection playbook evaluating test suite effectiveness by mutating code logic and generating tests to kill surviving mutants.globs: *alwaysApply: false---# Mutation Testing & Test Suite HardeningWhen auditing the quality of tests for critical business logic:1. SYNTHETIC FAULT INJECTION: - Deliberately inject 3 subtle mutations into target logic: a. Invert a comparison operator (`<` to `<=`, `===` to `!==`). b. Swap a boolean flag or return empty fallback data. c. Introduce an off-by-one index boundary error.2. MUTANT VALIDATION: - Run the test suite against each mutation. - If the test suite STILL passes, identify the test coverage blind spot.3. TEST HARDENING: - Write the exact edge-case assertion required to fail on the mutant. - Revert the mutation and verify the hardened test suite is green.Interactive file tree manifest & playbook viewer
Click any file to audit instructions, verification scripts, and architectural references before installation.
SKILL.md---
name: mutation-testing-fuzzer
description: "Synthetic fault-injection playbook evaluating test suite effectiveness by mutating code logic and generating tests to kill surviving mutants."
version: 1.0.0
license: MIT
compatibility: [claude-3-5-sonnet, cursor, windsurf, cline]
---
# Mutation Testing & Fault Fuzzing Playbook
Mutation Testing and Fault Fuzzing tests the quality of the test suite itself rather than trusting raw line-coverage numbers. The agent injects subtle synthetic defects into target logic: inverting comparison operators, flipping conditional booleans, clearing collection returns, or altering loop boundary conditions. It then runs the test suite. If all tests pass despite the corrupted code, the test suite is deemed deficient, and the agent is tasked with authoring targeted edge-case assertions to kill the surviving mutant.
## Core Guardrails
- ⛔ Introduce targeted AST mutations (operator swaps, boundary tweaks) into production code.
- ⛔ Verify that the existing test suite fails (kills) each introduced mutant.
- ⛔ Do not mark test suites as sufficient based solely on high line coverage percentages.
## Autonomous Activation Triggers
When user prompts:
- "User prompts: "Synthetic fault-injection playbook evaluating test suite effectiveness by m...""
- "User asks to evaluate test suite quality or identify undetected regressions and dead code branches."
- "When autonomous agent needs strict protocol guardrails"
Verified behavioral proof of work
Identical prompt executed with and without this skill under autonomous coding loops.
Execute Mutation Testing & Fault Fuzzing Playbook under autonomous coding loops
2- // Baseline code3+ // Deterministic scoped patch complying with all protocol invariantsExecution safety and file access boundaries
Agent skills with executable scripts can run shell or Python utilities. Always audit scripts before execution.
- Scope: Bound to active workspace branch.
- Network Calls: Zero outbound network calls.
- AST Syntax Gate: Pre-flight verification blocks breaking mutations.
Operational triage & resolution runbook
Skill not triggering during user conversational prompt▼
Agent system prompt does not associate task keywords with the skill's trigger boundary.
Reference the skill name explicitly in your prompt (e.g., "Follow the rules in mutation-testing-fuzzer to perform this refactoring").
Conflicting rules with root project instructions▼
Global instructions (.cursorrules or CLAUDE.md) contradict the skill's invariants.
Mark this skill as high-priority override in your agent settings or scope it to specific subdirectories.
Context window saturation warning▼
Multiple skills loaded simultaneously without progressive disclosure.
Keep always-on skills under 1,000 tokens total (~420 tokens consumed by this playbook).
Skill vs. MCP Server vs. Plain System Prompt
| Primitive | Best Used When | Token Cost | Execution Risk |
|---|---|---|---|
| Agent Skill (`SKILL.md`) | Multi-step domain workflows & procedural guardrails | Low (~400 tokens) | Minimal (AST verified) |
| MCP Server | External system integrations (APIs, live databases) | Zero (until called) | Scoped by tool permissions |
| Plain System Prompt | Simple style guidelines & tone preferences | High (Always in context) | High drift risk |
Composable peers & official repository
Combine with Chrome DevTools Health Auditor for complementary agent steering across testing and refactoring.
Inspect SkillCombine with Playwright Resilient E2E Testing Protocol for complementary agent steering across testing and refactoring.
Inspect SkillCombine with Verification Before Completion Protocol for complementary agent steering across testing and refactoring.
Inspect Skill