asarchami/dotfiles/mutation-testing
- community
Checking that the SKILL.md file is still in the repository.
Assess test suite strength by introducing deliberate bugs (mutations) one at a time and checking whether any test catches each one. Reports on test suite gaps and optionally implements missing tests.
Install
npx vskill@latest install asarchami/dotfiles/mutation-testingSKILL.md
Mutation Testing
Assess the strength of the project's test suite by introducing deliberate bugs (mutations) into the source code, one at a time, and checking whether any test fails. A mutation that the tests don't catch reveals a gap in coverage.
Scope
- If the user names specific files or directories, restrict mutations to those.
- Only mutate production code, never test files.
- Prioritise code with meaningful logic (branching, arithmetic, state changes).
Pre-flight
- Clean working tree. Run
git status. If there are uncommitted changes, ask the user to commit or stash first. - Find the test runner. Look for
pytest.ini,pyproject.toml [tool.pytest], or atests/directory. Confirm the suite passes before starting. - Map the code. Read the files in scope. Build a mental model of data flow.
Workflow
- Choose mutations. Read the file and identify 3–8 candidate mutations from the catalogue below.
- Apply, test, revert. For each mutation:
a. Apply the mutation using a single-line change. b. Run the test suite. c. Record the result: Killed (a test failed) or Survived (no test failed). d. Revert the mutation with git checkout -- <file>.
Mutation Catalogue
- Delete or skip a side effect — remove an assignment, method call, append.
- Negate or invert a condition —
if x→if not x,and→or. - Change a boundary —
<→<=,>=→>,== 0→== 1. - Swap or hardcode a return value —
return score→return 0. - Delete an early return or guard clause — remove
if not items: return []. - Change an operator —
+→-,*→/. - Modify a default argument or constant — change a default parameter value.
- Swap argument order — reverse arguments in a non-commutative call.
Assessing test failures
Rate diagnostic quality:
- Clear — test name and failure message immediately point to the bug.
- Indirect — failure describes a symptom rather than root cause.
- Cascading — many tests failed, making it hard to locate the root cause.
Reporting
Produce a summary table:
Then provide:
- Mutation score: killed / total (e.g. 6/8 = 75%)
- Uncaught mutations: list each survived mutation with explanation
- Diagnostic quality: note indirect/cascading failures
- Recommended tests: for each survived mutation, describe a test that would catch it
Critical Rules
- Always revert after every test run. Never stack mutations.
- Don't mutate test files, imports, type annotations, or docstrings.
- 3–8 mutations per file is enough. Quality over quantity.
Cross-References
python-testing— pytest patterns, coveragepython-hypothesis— property-based testing
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
- SKILL.md in the repositoryCheckingdot_config/opencode/skills/python/mutation-testing/SKILL.md
Popularity
- Repository stars
- 1
- Repository forks
- 2
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. 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
[](https://verified-skill.com/skills/asarchami/dotfiles/mutation-testing)