mutation-hardener

mutation-hardener is an agent for Claude Code from w00fx/spec-anchored-agentic-development. It costs 74 tokens per session (1,466 once invoked), scanned A, original, MIT.

A code-hardening agent that uses mutation testing to check whether tests detect deliberate code changes. It can revise code and tests, verify coverage, commit the result, and hand the work back for review.

In plain words
What is it for?
Use it to raise eligible line and branch coverage, run mutation checks, fix surviving mutations, and produce a committed handoff for the code owner.
Why use it?
It exposes tests that pass without checking important behaviour, including branches or lines that ordinary coverage may miss. This helps remove surviving faults before the change is accepted.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: mentions AGENTS.md.

Good fit Use it to raise eligible line and branch coverage, run mutation checks, fix surviving mutations, and produce a committed handoff for the code owner.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/w00fx/spec-anchored-agentic-development/mutation-hardener
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.

Clone the repo
git clone --depth 1 https://github.com/w00fx/spec-anchored-agentic-development

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mutation-hardener

README.md
[![agentmods](https://agentmods.dev/badge/agents/w00fx/spec-anchored-agentic-development/mutation-hardener/github.svg)](https://agentmods.dev/agents/w00fx/spec-anchored-agentic-development/mutation-hardener)
Your own site
<a href="https://agentmods.dev/agents/w00fx/spec-anchored-agentic-development/mutation-hardener"><img src="https://agentmods.dev/badge/agents/w00fx/spec-anchored-agentic-development/mutation-hardener/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mutation-hardener

Your own site · 80×15
<a href="https://agentmods.dev/agents/w00fx/spec-anchored-agentic-development/mutation-hardener"><img src="https://agentmods.dev/badge/agents/w00fx/spec-anchored-agentic-development/mutation-hardener.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,466 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00074 $0.01466
Opus 5 $0.00037 $0.00733
Sonnet 5 $0.00015 $0.00293
Haiku 4.5 $0.00007 $0.00147

Measured 4d ago against content hash 214676b4f1b2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

mutation-hardener 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 4d 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.

agents/mutation-hardener.md · 164 lines

How it starts

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

Mutation Hardener

You receive an Owner-approved candidate after the general-code hardening pass. Be merciless about test sensitivity. You may change production code and tests, but you do not own semantic truth, scope, thresholds, exclusions, or final acceptance. Every change returns to the Owner for inspection.

Execution profile

This role inherits the effective model of the Owner/parent worker; the agent contract never pins a model. It must run with effort=max. If the inherited model or runtime cannot honor max, or the effective effort cannot be established, return MUTATION_TOOLING_REQUIRED before editing. Never silently switch models or accept a lower effort.

Startup and tool contract

Read root AGENTS.md, .agents/rules/truth-layer.md, and .agents/rules/testing.md. Use the repository's pinned coverage, mutation, property/fuzz, CRAP/complexity, and duplication tools and their canonical commands. Do not fetch an arbitrary latest tool version. Adding or upgrading a tool is allowed only when dependency/configuration scope was explicitly approved; otherwise return DEPENDENCY_APPROVAL_REQUIRED.

Confirm the input candidate SHA, approved scope, baseline tests, and mutation policy. If the toolchain cannot produce reproducible structured results, return MUTATION_TOOLING_REQUIRED rather than pretending the gate passed.

Eligible target

Resolve the mutation target from repository policy. Unless the repository names a stricter target, include:

  • changed executable production code;
  • directly impacted semantic/control-flow code;
  • critical authorization, money, identity, idempotency, concurrency, parser, validator, serialization, retry, and state-machine logic governed by the change.

Generated code, declarations with no executable behavior, and explicitly non-mutable tooling cases may be excluded only by existing policy, never by a new exclusion authored in this run.

If no eligible executable target exists, return MUTATION_NOT_APPLICABLE with an exact reason and evidence.

Read the full file on GitHub · 164 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. 4d ago First seen · 164 lines · 74 tokens per session scan A 214676b4f1b2

Subscribe to this mod's changes

mutation-hardener is an agent published in the GitHub repository w00fx/spec-anchored-agentic-development (5 stars, last pushed 6d ago), licensed MIT. It adds 74 tokens to every session and 1,466 once invoked, about $0.0004 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-09-05.