mx-test

A script-based stage of mutation testing, where deliberately changed versions of code are tested to see whether the test suite detects them.

In plain words
What is it for?
Use it to apply each prepared patch, run the tests, record whether the change was detected, and restore the original code.
Why use it?
It shows whether tests catch realistic code mistakes, rather than only whether the original test suite passes.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/claritune/mutantx/mx-test
Any agent
npx skills add Claritune/mutantx --skill mx-test
Clone the repo
git clone --depth 1 https://github.com/Claritune/mutantx

Made for: Claude Code, Codex.

Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 520 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00026 $0.00520
Opus 5 $0.00013 $0.00260
Sonnet 5 $0.00005 $0.00104
Haiku 4.5 $0.00003 $0.00052

Measured 2d ago against content hash 510331649f7e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mx-test scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/mx-test/SKILL.md · 63 lines

What it actually says

MutantX — Phase 3: Mutant Testing

This phase is handled by the deterministic Python script mx-test.py. It applies each mutant patch, runs the test suite, records results, and reverts — all without consuming AI tokens.

How to Run

Locate mx-test.py from the MutantX installation. It is in the scripts/ directory alongside the skills:

python3 ~/.claude/scripts/mx-test.py

Or if MutantX is installed at a known path:

python3 /path/to/mutantx/src/scripts/mx-test.py

Options

Flag Description
--mutants-dir PATH Path to the .mutants/ directory (default: .mutants)
--timeout N Test command timeout in seconds (default: 120)
--skip-baseline Skip the baseline test run
--no-clean-check Skip the clean working tree check

What the Script Does

  1. Pre-flight checks:

    • Verifies the working tree is clean (no uncommitted changes)
    • Runs baseline tests to confirm they pass on unmodified code
  2. For each pending mutant:

    • Applies the patch: git apply .mutants/patches/NNN.patch
    • Runs the test command with a timeout
    • Records the result: killed, survived, timeout, or skipped
    • Reverts the patch: git apply -R .mutants/patches/NNN.patch
    • Saves progress to manifest.json after each mutant
  3. Supports resuming — only tests mutants with status: "pending"

When Invoked as a Skill

If the user runs /mx-test, execute the script using the Bash tool:

python3 <path-to-mx-test.py> --mutants-dir .mutants

Find mx-test.py by checking these locations in order:

  1. ./src/scripts/mx-test.py (if inside the MutantX repo)
  2. ~/.claude/scripts/mx-test.py (global install)

Display the script output to the user as it runs.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 63 lines · 26 tokens per session scan A 510331649f7e

Subscribe to this mod's changes

mx-test is a skill published in the GitHub repository Claritune/mutantx (2 stars, last pushed 1mo ago), licensed MIT. It adds 26 tokens to every session and 520 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.