mutantx
CLAUDE.md2 starsChanged 4 months agoMITView on GitHub
AI-powered mutation testing for Claude Code. Language-agnostic. Commit after each change. Do not batch multiple changes into one commit. Phases 1-2 (detect, generate) use AI. Phases 3-4 (test, report) are deterministic Python scripts that consume zero tokens. Once mutants are generated, repeated testing is free. Validation runs automatically before testing. If source files changed since generation, mutants are classified as valid, stale, or needs-review. The AI skill reviews ambiguous cases only. mx-agent runs the full mutation testing cycle autonomously without…
In this repository12 other files it gives its agents.
- mutateSkill
- mx-detectSkill
- mx-generateSkill
- mx-reportSkill
- mx-testSkill
- mx-validateSkill
- mutateSkill
- mx-detectSkill
- mx-generateSkill
- mx-reportSkill
- mx-testSkill
- mx-validateSkill
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Commit after each change. Do not batch multiple changes into one commit.
- Very specific: line 65
Run /mutate on the demo projects to verify skill changes work correctly:
- Very specific: line 74
All mutation testing artifacts go to .mutants/ in the target project:
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MutantX
AI-powered mutation testing for Claude Code. Language-agnostic.
Workflow
Commit after each change. Do not batch multiple changes into one commit.
Project Structure
src/skills/ — Distributable Claude Code skills
src/scripts/ — Deterministic Python scripts (zero tokens)
src/agents/ — Distributable Claude Code agents
demos/python/ — Python demo project with intentional test gaps
demos/cpp/ — C++ demo project with intentional test gapsArchitecture
Phases 1-2 (detect, generate) use AI. Phases 3-4 (test, report) are deterministic Python scripts that consume zero tokens. Once mutants are generated, repeated testing is free.
| Phase | Component | AI? |
| Detect | /mx-detect skill | Yes |
| Generate | /mx-generate skill | Yes |
| Validate | mx-validate.py + /mx-validate skill | Deterministic + optional AI |
| Test | mx-test.py script | No |
| Report | mx-report.py script + /mx-report skill | Partial |
Validation runs automatically before testing. If source files changed since generation, mutants are classified as valid, stale, or needs-review. The AI skill reviews ambiguous cases only.
Skills
| Skill | Purpose |
/mutate | Full mutation testing run (orchestrates all phases) |
/mx-detect | Phase 1: detect project language, test command, source files |
/mx-generate | Phase 2: generate mutant patches with per-file caching |
/mx-validate | Review mutants flagged as needs-review after file changes |
/mx-test | Phase 3: invokes mx-test.py |
/mx-report | Phase 4: invokes mx-report.py then adds AI analysis |
Agent
mx-agent runs the full mutation testing cycle autonomously without user interaction.
Installing for use
# Skills
cp -r src/skills/* ~/.claude/skills/
# Scripts (required for testing and reporting)
mkdir -p ~/.claude/scripts
cp src/scripts/*.py ~/.claude/scripts/
# Agent (optional)
mkdir -p ~/.claude/agents
cp src/agents/mx-agent.md ~/.claude/agents/Testing changes
Run /mutate on the demo projects to verify skill changes work correctly:
cd demos/python && pytest # baseline should pass
cd demos/cpp && make test # baseline should passOutput
All mutation testing artifacts go to .mutants/ in the target project:
detect.json— project detection resultsmanifest.json— mutant metadata, file hashes, test resultsreport.md— human-readable reportpatches/*.patch— individual unified diffs
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

