Agent skill

Atdd Mutate

by swingerman in swingerman/engineer

A skill your agent uses to add a third validation layer to the ATDD workflow — after acceptance tests verify WHAT and unit tests verify HOW, mutation testing verifies the tests actually catch bugs.

MITAuto-check passedTesting & QA

Install Atdd Mutate

skills CLI
$ npx skills add swingerman/engineer --skill atdd-mutate -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install swingerman/engineer atdd-mutate --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/swingerman/engineer.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/atdd-mutate .claude/skills/atdd-mutate && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
atdd-mutate
GitHub stars
154
Token cost
~2.7k tokens
SKILL.md length
1,217 words
Files
2 (incl. references)
Skills in repo
27
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses to add a third validation layer to the ATDD workflow — after acceptance tests verify WHAT and unit tests verify HOW, mutation testing verifies the tests actually catch bugs.

  • Works in 6 steps: Verify Prerequisites → Set Up Mutation Tool → Run Mutations → …
  • Add a third validation layer to the ATDD workflow — after acceptance tests verify WHAT and unit tests verify HOW
  • SKILL.md covers Core Concept, When to Use, Approach: Custom Mutation Tool… and Alternative: Existing Frameworks, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Atdd Mutate is an agent skill from swingerman/engineer. Use to add a third validation layer to the ATDD workflow — after acceptance tests verify WHAT and unit tests verify HOW, mutation testing verifies the tests actually catch bugs. Triggers — "/mutate", "/kill-mutants", "run mutation testing", "mutate my code", "kill mutants", "check test quality", "find surviving mutants", "run stryker", "run mutmut", "run pitest", "are my tests catching bugs".

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/frameworks.md`).

It sits in Testing & QA, covering Test coverage, End-to-end testing and Unit testing. The repository describes itself as: Disciplined Agentic Engineering — a methodology kit for Claude Code: acceptance-test-first specs, explicit checkpoints, and autonomy you can actually leave running. The engineer… The licence is MIT.

When your agent uses it

  • Add a third validation layer to the ATDD workflow — after acceptance tests verify WHAT and unit tests verify HOW
  • Mutation testing verifies the tests actually catch bugs
  • Run mutation testing
  • Check test quality

Example prompts

  • “/mutate”
  • “/kill-mutants”
  • “run mutation testing”
  • “/atdd-mutate”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Verify Prerequisites
  2. Set Up Mutation Tool
  3. Run Mutations
  4. Analyze Survivors
  5. Kill Surviving Mutants
  6. Report

What it can do on your machine

Read from SKILL.md and the folder at commit 32947eb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • stryker-mutator.io
    • pitest.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Atdd Mutate loads about 2.7k tokens when it runs, and up to ~5.2k if it reads all its reference files. Until then it costs about 102 tokens; SKILL.md has 1,217 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~102
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from swingerman/engineer at commit 32947eb, republished under its MIT licence (© swingerman). 1,217 words, ~2,679 tokens.

Download SKILL.mdSave it as .claude/skills/atdd-mutate/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
atdd-mutate
description
Use to add a third validation layer to the ATDD workflow — after acceptance tests verify WHAT and unit tests verify HOW, mutation testing verifies the tests actually catch bugs. Triggers — "/mutate", "/kill-mutants", "run mutation testing", "mutate my code", "kill mutants", "check test quality", "find surviving mutants", "run stryker", "run mutmut", "run pitest", "are my tests catching bugs".

Mutation Testing

Add a third validation layer to the ATDD two-stream testing approach. Acceptance tests verify WHAT, unit tests verify HOW, mutation testing verifies that the tests actually catch bugs.

Core Concept

Mutation testing introduces deliberate bugs (mutants) into source code, then runs the test suite. If tests fail, the mutant is killed (good). If tests pass despite the bug, the mutant survives (test gap found).

Source code → introduce mutation → run tests
                                     ├── tests FAIL → mutant killed ✓
                                     └── tests PASS → mutant survived ✗

A project with 100% code coverage can still have a 60% mutation score — meaning 40% of introduced bugs go undetected by the test suite.

When to Use

Run mutation testing after both test streams are green:

  1. Acceptance tests pass (WHAT is correct)
  2. Unit tests pass (HOW is correct)
  3. Mutation testing — verify tests actually detect regressions

This is Phase 6 in the team-based ATDD workflow, or a standalone quality check at any point during development.

Approach: Custom Mutation Tool (Preferred)

The preferred approach is to build a custom mutation tool for the project. This follows the methodology Uncle Bob developed for empire-2025 — a project-specific tool that walks the AST/source tree, applies one mutation at a time, runs targeted tests, and reports survivors.

Why Custom is Preferred
  • Tight integration with the project's test runner and source structure
  • Targeted execution — run only the tests affected by each mutation
  • Language-agnostic — works for any language, including those without established mutation frameworks
  • No external dependencies — the tool lives in the project
  • AST-level precision — understands the language's constructs natively
Architecture (4 modules)
  1. Mutations — rules table (e.g., + → -, true → false, >= → >) plus matching logic that walks the AST/form tree
  2. Runner — source-to-test mapping, test execution, pass/fail capture
  3. Core — orchestration: read source → discover sites → apply one at a time → run tests → restore original → report
  4. Hashing/Selection — hash each function (AST-level) and its covering tests; call dae_mutmap.py to mutate only changed functions and to update the manifest after the run. See the Differential Mutation Testing section.
Core Mutation Categories
CategoryExamples
Arithmetic+ ↔ -, * ↔ /, ++ ↔ --
Comparison> ↔ >=, < ↔ <=
Equality== ↔ !=
Booleantrue ↔ false, && ↔ `
Conditionalnegate conditions, swap if/if-not
Constant0 ↔ 1, "" ↔ "mutant"
Return valuereturn true → return false
Void methodremove method call entirely

For the full architecture and detailed reference, see references/frameworks.md.

Alternative: Existing Frameworks

When speed of setup is more important than tight integration, use an established mutation framework as a secondary option:

LanguageFramework
JavaScript/TypeScriptStryker
Pythonmutmut
Java/JVMPIT (pitest)
C#Stryker.NET
Rustcargo-mutants
Gogo-mutesting
Rubymutant
ScalaStryker4s

For install commands, configuration, and CLI reference, see references/frameworks.md.

Differential Mutation Testing

Mutation testing is slow — re-running it after a small change re-mutates every function. Differential mutation testing re-mutates only the functions whose code or covering tests changed, reusing cached results for the rest.

  • Custom-tool path — the Hashing/Selection module hashes each function and its covering tests and calls dae_mutmap.py (select before the run, update after). Results live in a committed mutation-manifest.json beside the tool, so the saving reaches CI and every clone. A function is re-mutated when its code, its covering tests, or the mutation operator set changed. See ${CLAUDE_PLUGIN_ROOT}/references/differential-mutation.md.
  • Framework path — Stryker (--incremental), PIT (withHistory), and mutmut have native incremental modes; enable the framework's incremental flag and commit its history file. Do not build a separate manifest for the framework path.

Workflow

Before Step 1, create one TodoWrite todo per step of this workflow (Steps 1–6), all at once — the full list up front, as a roadmap. Flip each todo to in_progress / completed as you go. See ${CLAUDE_PLUGIN_ROOT}/references/progress-indicator.md.

Step 1: Verify Prerequisites

Before running mutation testing, confirm:

  • Both test streams are green (acceptance + unit)
  • The project has meaningful unit tests (mutation testing runs against unit tests)
  • No uncommitted changes (mutations modify source files temporarily)

Introversion pre-pass (recommended). If the engineer plugin is installed, run its dae_introvert.py <root> first — a cheap static scan that flags tests which can pass without asserting on SUT output (no assertion, or every assertion nested in a conditional/loop/try). These are guaranteed-weak tests; fixing them before mutation makes the run cheaper and the suite stronger, and the conditional-assertion class is caught even when no mutant happens to exercise the bypassed path. A configured manifest.introversion.backend (e.g. a deintroverter that backward-slices each assertion to the SUT) does the deeper data-flow classification; absent one, a built-in Python-AST fallback covers the cheap cases. A test flagged introverted and carrying a surviving mutant is a high-confidence vacuous test — prioritise it in Step 4.

Show full SKILL.md (498 more words)Show less
Step 2: Set Up Mutation Tool

If no mutation tool is configured:

  1. Detect the project language from source files and build config
  2. Preferred: Build a custom mutation tool following the 4-module architecture (mutations, runner, core, hashing/selection). Use TDD to build the tool itself.
  3. Alternative: Install an existing framework if rapid setup is needed
  4. Configure to target source directories and exclude test/spec/generated files
  5. Exclude .build/ (generated tests and IR) and the acceptance/ pipeline code from mutation
  6. Enable differential mutation testing — the custom tool's hashing/selection module, or the framework's native incremental flag (see the Differential Mutation Testing section)

Important: Configure mutation testing to target source code only. Never mutate test files, spec files, or generated pipeline code.

Step 3: Run Mutations

On the custom-tool path, run dae_mutmap.py select first and mutate only the functions it returns — or all of them when it returns ALL. On the framework path, the incremental flag handles this. Then execute and collect results:

  • Total mutants generated
  • Mutants killed (tests caught the bug)
  • Mutants survived (test gap)
  • Mutation score (killed / total × 100)
Step 4: Analyze Survivors

For each surviving mutant:

  1. Read the mutation — what was changed? (e.g., >= → >, removed function call)
  2. Identify which behavior is unguarded
  3. Determine whether this represents a real test gap or an equivalent mutant

Equivalent mutants are mutations that don't change observable behavior (e.g., changing x = x + 0). These can be ignored.

Step 5: Kill Surviving Mutants

For each real survivor:

  1. Write a new unit test that specifically targets the unguarded behavior
  2. Run the test to confirm it fails against the mutant
  3. Run the full test suite to confirm it passes against the original code
  4. Re-run mutation testing to confirm the kill
Step 6: Report

On the custom-tool path, run dae_mutmap.py update to refresh mutation-manifest.json. The report combines this run's fresh results with the manifest's cached entries for unchanged functions — mark the cached ones ("unchanged since last_mutated"). Present a summary:

Mutation Testing Report
═══════════════════════
Score:     87% → 95% (after killing survivors)
Killed:    190 / 200
Survived:  10 → 5 (5 equivalent mutants ignored)
New tests: 5 unit tests added

Remaining survivors (equivalent mutants):
- src/utils.js:42 — changed `x + 0` to `x + 1` (no-op mutation)
- ...

Mutation Score Targets

ScoreAssessment
90%+Strong test suite — minor gaps only
70-89%Moderate — meaningful gaps to address
< 70%Weak — significant untested behavior

A 100% mutation score is not always practical or necessary. Focus on killing mutants that represent real behavioral gaps, not chasing equivalent mutants.

Integration with ATDD Workflow

Mutation testing extends the existing two-stream approach:

1. Write specs (WHAT)           ← acceptance tests
2. Implement with TDD (HOW)     ← unit tests
3. Verify test quality (REAL?)  ← mutation testing

When using the atdd-team skill, mutation testing is part of Phase 6 (Verify & Harden), run by the architect — an agent whose agent_id is independent of the implementer and the refiner.

Anti-Patterns

"Let me mutate before tests are green"

No. Fix failing tests first. Mutation testing assumes a green baseline.

"100% mutation score or nothing"

Not practical. Equivalent mutants inflate the denominator. Aim for 90%+ and document the equivalent mutants that remain.

"Mutate everything including generated code"

Never mutate generated test files or the acceptance pipeline. Only mutate source code under development.

Additional Resources

Reference Files

For detailed framework setup and configuration:

  • references/frameworks.md — Installation, configuration, and CLI reference for each supported mutation testing framework

© swingerman, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/atdd-mutate of swingerman/engineer.

  • SKILL.md
  • references/frameworks.md

Open the folder on GitHubat commit 32947eb

Compare with similar skills

Atdd Mutate next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Atdd Mutate compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Atdd Mutate this skillswingerman/engineer154—~2.7kAutomated safety check: PassMIT
Post Dev Testsd0xdev/sd0x-harness192—~1.8kAutomated safety check: NotesMIT
Test Coverageluongnv89/skills131—~2.5kAutomated safety check: PassMIT
Scenario Testingaiskillstore/marketplace4301 repos~830Automated safety check: PassNone
Studio Testingsupabase/supabase111k—~2.2kAutomated safety check: PassApache-2.0
Test Specialisttravisjneuman/.claude101—~3.7kAutomated safety check: PassMIT

Similar skills

  • Post Dev Test

    sd0xdev/sd0x-harness

    Post-development test completion. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.8k tokensUpdated today
    Testing & QAAuto-check: notes
  • Test Coverage

    luongnv89/skills

    Generate unit tests for untested branches and edge cases. An agent skill from luongnv89/skills.

    131 GitHub stars~2.5k tokensUpdated today
    Testing & QAAuto-check passed
  • Scenario Testing

    aiskillstore/marketplace

    This skill should be used when writing tests, validating features, or needing to verify code works.

    430 GitHub starsUsed in 1 repo~830 tokens
    Testing & QAAuto-check passed
  • Studio Testing

    supabase/supabase

    Official

    Testing strategy for Supabase Studio. An agent skill from supabase/supabase.

    111k GitHub stars~2.2k tokensUpdated today
    Testing & QAAuto-check passed
  • Test Specialist

    travisjneuman/.claude

    Test-writing patterns for JS/TS, Python, Go, and Rust (unit, integration, E2E, visual regression).

    101 GitHub stars~3.7k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Dotnet Testing

    novotnyllc/dotnet-artisan

    Defines .NET test strategy and implementation patterns across xUnit v3 (Facts, Theories, fixtures, IAsyncLifetime), integration testing (WebApplicationFactory, Testcontainers), Aspire testing…

    233 GitHub stars~972 tokensUpdated today
    Testing & QAAuto-check passed

More from swingerman/engineer

All 27 skills in this repo
  • Crap Analyzer

    swingerman/engineer

    A skill your agent uses to produce a risk-based refactor + test plan for recently-changed code on a diff/branch/PR by computing CRAP (complexity × untested) on changed methods.

    154 GitHub stars~1.2k tokensUpdated 15 days ago
    Auto-check passed
  • Fix

    swingerman/engineer

    A skill your agent uses to drive a bug fix from first report through close, with a "why didn't we catch it?" loop at the end.

    154 GitHub stars~3k tokensUpdated 15 days ago
    Auto-check passed
  • Atdd

    swingerman/engineer

    A skill your agent uses to drive feature work through the Acceptance Test Driven Development workflow — Given/When/Then specs before code, a project-specific test pipeline, and two parallel test…

    154 GitHub stars~2.8k tokensUpdated 15 days ago
    Auto-check passed
  • Harden

    swingerman/engineer

    Use after a feature passes Light Verify (CP7), to prove the tests actually catch bugs and, where the code warrants it, to formally check its invariants — Checkpoint 8.

    154 GitHub stars~1.8k tokensUpdated 15 days ago
    Auto-check passed
  • Next

    swingerman/engineer

    Use at the start of a work session, or any time the question is "what should I pick up now" across the whole project.

    154 GitHub stars~3k tokensUpdated 15 days ago
    Auto-check passed
  • Post Merge

    swingerman/engineer

    Use immediately after a PR is merged to clean up the local feature branch and resync main.

    154 GitHub stars~1.4k tokensUpdated 15 days ago
    Auto-check passed

Categories

Questions about Atdd Mutate

What does Atdd Mutate do?

A skill your agent uses to add a third validation layer to the ATDD workflow — after acceptance tests verify WHAT and unit tests verify HOW, mutation testing verifies the tests actually catch bugs. Atdd Mutate is an agent skill from swingerman/engineer. Use to add a third validation layer to the ATDD workflow — after acceptance tests verify WHAT and unit tests verify HOW, mutation testing verifies the tests actually catch bugs.

When should I use Atdd Mutate?

Atdd Mutate fits situations like: add a third validation layer to the ATDD workflow — after acceptance tests verify WHAT and unit tests verify HOW; mutation testing verifies the tests actually catch bugs; run mutation testing; check test quality.

How do I install Atdd Mutate in Claude Code?

Run `npx skills add swingerman/engineer --skill atdd-mutate -a claude-code`. Or copy the skill folder (skills/atdd-mutate in swingerman/engineer) into .claude/skills/atdd-mutate in your project. Claude Code loads it when a task matches its description.

How do I install Atdd Mutate in Codex?

Run `npx skills add swingerman/engineer --skill atdd-mutate -a codex`. Or copy the skill folder (skills/atdd-mutate in swingerman/engineer) into .agents/skills/atdd-mutate in your project. Codex loads it when a task matches its description.

Can I use Atdd Mutate in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add swingerman/engineer --skill atdd-mutate -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/atdd-mutate, .gemini/skills/atdd-mutate, .github/skills/atdd-mutate and .opencode/skills/atdd-mutate in your project.

What does Atdd Mutate need to run?

SKILL.md names no scripts, command-line tools or credentials: Atdd Mutate is instructions for the agent only. Our summary lists: Python 3.

Does Atdd Mutate access the network?

SKILL.md names 3 domains. As links in the text: github.com, stryker-mutator.io and pitest.org. This is read from the text; nothing was executed.

Is Atdd Mutate safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Atdd Mutate use?

Atdd Mutate is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Atdd Mutate use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.5k tokens, read only when the agent opens those files.

What are the alternatives to Atdd Mutate?

Skills that share tags, products or a category with Atdd Mutate: Post Dev Test (sd0xdev/sd0x-harness, 192 stars), Test Coverage (luongnv89/skills, 131 stars), Scenario Testing (aiskillstore/marketplace, 430 stars) and Studio Testing (supabase/supabase, 111k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Atdd Mutate?

swingerman (a GitHub user) maintains it in swingerman/engineer, which has 154 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on September 23, 2026.

Source: swingerman/engineer on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.