franky47/dotfiles/mutation-testing

Claude Code and agent skill by franky47/dotfiles

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Evaluate test suite quality by introducing code mutations and verifying tests catch them. Use for mutation testing, test quality, mutant detection, and test effectiveness analysis.

Install

npx vskill@latest install franky47/dotfiles/mutation-testing

SKILL.md

The same SKILL.md was published earlier as franky47/dotfiles/mutation-testing.

Mutation Testing

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

Key Concepts

  • Mutant: Modified version of code with small change
  • Killed: Test fails when mutation is introduced (good)
  • Survived: Test passes despite mutation (test gap)
  • Equivalent: Mutation that doesn't change behavior
  • Mutation Score: Percentage of mutants killed
  • Mutation Operators: Types of changes (arithmetic, conditional, etc.)

Instructions

  1. Introduce a random mutation in the source code, under the scope defined by the user.
  2. Run the tests for the project
  3. Keep track of the mutations you introduced in a MUTATIONS.md log file at the root of the repository.

If the test passed (mutant survived): it indicates a gap in coverage or test quality. Write a test update suggestion in your mutation log notes.

If the test failed (mutant was killed): good outcome. Revert the change, keep a note of it in the log, and start the loop again.

Mutation Log

Follow this log format for the MUTATIONS.md file:

markdown
## File being tested: path/to/file.ts
### Mutation 1
-Mutation: <description> (`<before>` -> `<after>`)
-Result: passed | failed
-Notes: <context>

Common Mutation Operators

Arithmetic Mutations
  • + → -, *, /
  • - → +, *, /
  • * → +, -, /
  • / → +, -, *
Conditional Mutations
  • > → >=, <, ==
  • < → <=, >, ==
  • == → !=
  • && → ||
  • || → &&
Return Value Mutations
  • return true → return false
  • return x → return x + 1
  • return → Remove return statement
Statement Mutations
  • Remove method calls
  • Remove conditional blocks
  • Remove increments/decrements

Best Practices

✅ DO
  • Focus on the scope defined by the user
  • Target critical business logic for mutation testing
  • Review survived mutants to improve tests
  • Mark equivalent mutants to exclude them
  • Test boundary conditions thoroughly
  • Verify actual behavior, not just code execution
❌ DON'T
  • Run mutation testing on all code (too slow)
  • Ignore equivalent mutants
  • Run mutations on generated code
  • Skip mutation testing on complex logic
  • Focus only on line coverage

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/franky47/dotfiles/mutation-testing/badge)](https://verified-skill.com/skills/franky47/dotfiles/mutation-testing)

Something wrong with this skill or its page? Tell us.