Agent skill · data analytics · secondsky
mutation-testing
Validate test effectiveness with mutation testing using Stryker (TypeScript/JavaScript with Vitest or bun test via @hughescr/stryker-bun-runner) and mutmut (Python). Find weak tests that pass despite code mutations. Use to improve test quality.
Why this skill is useful
Provides specific commands and configurations for mutation testing with Stryker and mutmut that the AI wouldn't reliably generate on its own.
What it needs
Requires bun, npm, uv installed locally. About 3k tokens when loaded. Last updated 2026-08-06. 204 stars on the source repository.
What this skill does
Mutation Testing Expert knowledge for mutation testing - validating that your tests actually catch bugs by introducing deliberate code mutations. Core Concept Mutants: Small code changes introduced automatically Killed: Test fails with mutation (good - test caught the bug) Survived: Test passes with mutation (bad - weak test) Score: Percentage of mutants killed (aim for 80%+) TypeScript/JavaScript (Stryker) Vitest Runner Installation Configuration Bun Native Runner (bun test) Use when projects use bun test directly (not Vitest). Requirements Bun >= 1.3.7 (needs TestReporter WebSocket events from Bun PR #25986) @stryker-mutator/core ^9.6.1 Installation Configuration Key Behaviors Sequential execution: Runs tests with --concurrency=1 for accurate per-test coverage. Slower than parallel but required for correct test-to-mutant correlation. Concurrent test patching: Automatically patches describe.concurrent(), test.concurrent(), it.concurrent() to run sequentially during mutation testing — no code changes needed. Inspector Protocol: Uses Bun's WebSocket Inspector API to discover tests and correlate coverage. Running Stryker Example: Weak Test Python (mutmut) Installation Running mutmut Common Mutation Types Mutation Score Targets Score Quality Action ------- --------- -------- 90%+ Excellent Maintain quality 80-89% Good Small improvements 70-79% Acceptable Focus on weak areas < 60% Poor Major improvements needed Improving Weak Tests Pattern: Insufficient Assertions Pattern: Boundary Conditions Best Practices Start with core business logic modules Ensure 80%+ coverage before mutation testing Run incrementally (only changed files) Focus on important files first Don't expect 100% mutation score (equivalent mutants exist) Workflow See Also vitest-testing - Unit testing framework test-quality-analysis - Detecting test smells
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills secondsky/mutation-testing