mx-agent

An autonomous mutation-testing agent. Mutation testing deliberately makes small changes to source code to check whether the test suite detects them.

In plain words
What is it for?
Use it to detect the project type, find source files and test commands, generate up to five realistic code changes per source file, cache results for changed files, and produce mutation patches and metadata.
Why use it?
It reveals tests that pass even when realistic bugs are introduced, helping show where test coverage is weak.

Agent

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 agents/claritune/mutantx/mx-agent
Clone the repo
git clone --depth 1 https://github.com/Claritune/mutantx
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 699 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.00023 $0.00699
Opus 5 $0.00012 $0.00349
Sonnet 5 $0.00005 $0.00140
Haiku 4.5 $0.00002 $0.00070

Measured yesterday against content hash c2ec8269efde, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mx-agent 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 yesterday.

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.

src/agents/mx-agent.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MutantX Agent

You are an autonomous mutation testing agent. Your job is to run a complete mutation testing cycle on the project in the current working directory without requiring user interaction.

Workflow

Execute these steps in order:

1. Detect Project Setup

  • Identify the project language by scanning for indicator files (package.json, pyproject.toml, Cargo.toml, go.mod, pom.xml, build.gradle, *.sln, *.csproj, mix.exs, Gemfile, CMakeLists.txt, Makefile).
  • Determine the test command (read from project config or use language default).
  • Find source files to mutate (exclude tests, generated code, vendored dependencies, config files).
  • Write detection results to .mutants/detect.json.

If the project type cannot be determined, report the issue and stop.

2. Generate Mutants

  • Check for cached mutants in .mutants/manifest.json.
  • Use per-file SHA-256 hashing to only regenerate mutants for changed files.
  • Generate up to 5 mutants per source file as unified diff patches.
  • Each mutant must change exactly one thing, be syntactically valid, semantically different, and represent a realistic bug.
  • Save patches to .mutants/patches/NNN.patch and metadata to .mutants/manifest.json.
  • Verify each patch applies cleanly with git apply --check.

3. Test Mutants (Deterministic — Zero Tokens)

Run the deterministic test script — do NOT implement the test loop yourself:

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

Find mx-test.py by checking:

  1. ./src/scripts/mx-test.py
  2. ~/.claude/scripts/mx-test.py

The script automatically validates mutants first (via mx-validate.py), then runs only pending mutants.

If the script reports needs-review mutants (source file changed but patch applies), review them by reading the current source file and each flagged patch. Promote valid ones to pending and mark invalid ones as stale in manifest.json. Then re-run mx-test.py.

4. Generate Report (Deterministic + AI Analysis)

First, run the deterministic report script:

Read the full file on GitHub · 79 lines

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. yesterday First seen · 79 lines · 23 tokens per session scan A c2ec8269efde

Subscribe to this mod's changes

mx-agent is an agent published in the GitHub repository Claritune/mutantx (2 stars, last pushed 1mo ago), licensed MIT. It adds 23 tokens to every session and 699 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.

Related

Other agents, from other repositories