Agent skill

Mutation Testing

by rshankras in rshankras/claude-code-apple-skills

EXPERIMENTAL — mutation testing with muter to measure whether tests actually assert anything: mutants that survive reveal assertion-free coverage.

MITAuto-check: notesTesting & QA

Install Mutation Testing

skills CLI
$ npx skills add rshankras/claude-code-apple-skills --skill mutation-testing -a claude-code

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

GitHub CLI
$ gh skill install rshankras/claude-code-apple-skills mutation-testing --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/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/testing/mutation-testing .claude/skills/mutation-testing && 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
mutation-testing
GitHub stars
783
Token cost
~1.1k tokens
SKILL.md length
518 words
Files
2
Skills in repo
41
Repo updated
First seen
Licence
MIT

At a glance

EXPERIMENTAL — mutation testing with muter to measure whether tests actually assert anything: mutants that survive reveal assertion-free coverage.

  • Works in 3 steps: Install muter and confirm it runs… → Copy templates/muter.conf.yml to the… → First run
  • Tasks that involve Test coverage
  • SKILL.md covers When This Skill Activates, Setup, Scoping: Engines Only and Reading the Report, plus 4 more sections
  • Calls brew

What it does

Mutation Testing is an agent skill from rshankras/claude-code-apple-skills. EXPERIMENTAL — mutation testing with muter to measure whether tests actually assert anything: mutants that survive reveal assertion-free coverage. Advisory report only, never a merge gate. Use on engine/logic targets when coverage numbers look good but bugs still slip through.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `templates/muter.conf.yml`).

It sits in Testing & QA, covering Test coverage. It works with Xcode. The repository describes itself as: Claude Code skills for Apple platform development (iOS, macOS, iPadOS) — product validation, code generation, App Store optimization, and more. The licence is MIT.

When your agent uses it

  • Tasks that involve Test coverage

Example prompts

  • “/mutation-testing”

Requirements

  • Pre-approved tools (allowed-tools): Read, Write, Edit, Glob, Grep, Bash

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Install muter and confirm it runs against the current Xcode before investing further
  2. Copy templates/muter.conf.yml to the repo root as muter.conf.yml and scope it (see below).
  3. First run

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Glob
    • Grep
    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • brew

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

  • Network

    No URLs in SKILL.md.

    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

Mutation Testing loads about 1.1k tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 518 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~74
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Edit, Glob, Grep, Bash

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 rshankras/claude-code-apple-skills at commit 9ffb831, republished under its MIT licence (© rshankras). 518 words, ~1,089 tokens.

Download SKILL.mdSave it as .claude/skills/mutation-testing/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
mutation-testing
description
EXPERIMENTAL — mutation testing with muter to measure whether tests actually assert anything: mutants that survive reveal assertion-free coverage. Advisory report only, never a merge gate. Use on engine/logic targets when coverage numbers look good but bugs still slip through.
allowed-tools
Read, Write, Edit, Glob, Grep, Bash
last_verified
2026-07-24
review_by
2027-07-01

Mutation Testing (Experimental)

Status: EXPERIMENTAL — advisory report only. Never wire this as a merge gate.

Coverage proves a line ran under test; mutation testing proves a test would notice if the line were wrong. Muter mutates the source (flips > to <, && to ||, deletes statements), reruns the suite per mutant, and reports the mutants that survived — code that is covered but effectively unasserted. It is the truest answer to "did the agent write real tests or coverage theater," and also the slowest and most fragile tool in the gauntlet, which is why it stays advisory.

When This Skill Activates

Use this skill when:

  • Coverage is healthy but bugs still slip through covered code
  • Auditing agent-written test suites for assertion-free tests
  • A periodic (nightly/weekly) quality audit of engine/logic targets

Do NOT use as a per-commit or merge-blocking check — a full mutation run multiplies the suite's runtime by the mutant count.

Setup

  1. Install muter and confirm it runs against the current Xcode before investing further:
bash
brew install muter-mutation-testing/formulae/muter
muter --version
  1. Copy templates/muter.conf.yml to the repo root as muter.conf.yml and scope it (see below).
  2. First run:
bash
muter run    # writes an HTML/console report of surviving mutants

Scoping: Engines Only

Mutation-test the code where logic density is highest and the suite claims real coverage — engine/store/service types. Exclude UI, generated code, and test files: mutating a SwiftUI body mostly produces noise, and every excluded file cuts the runtime multiplier.

yaml
mutateSourcesInDirectories:
  - App/Engines
  - App/Stores
excludeList:
  - "*View.swift"
  - "*Preview*"

Reading the Report

  • Killed mutant — a test failed: the suite genuinely asserts this behavior.
  • Survived mutant — every test passed with the code broken: coverage without verification. Each survivor is a concrete, located prompt: write the assertion that kills it.
  • Mutation score (killed ÷ total) is a trend number for the same scope over time; do not chase an absolute score.
Show full SKILL.md (239 more words)Show less

Caveats (Why This Stays Advisory)

  • Toolchain fragility: muter rewrites source and drives xcodebuild; new Xcode releases can break it until the project catches up. Always verify a plain muter run completes on the current toolchain before trusting results.
  • Swift Testing detection: muter's kill detection matured on XCTest. Verify it detects Swift Testing (#expect) failures in YOUR project: run one mutant cycle on a file whose suite you trust, and confirm survivors/kills match expectations.
  • Runtime: suite time × mutants. Scope hard, run nightly or on demand.

Deterministic Fallback: Manual Mutation Spot-Checks

When muter can't run (toolchain break, CI limits), the drill from testing/fitness-functions/ scales down to single mutations by hand:

  1. Pick a critical function; invert one condition (or return a constant).
  2. Run its suite — a test MUST fail. If nothing fails, the suite has an assertion gap: write the missing test now.
  3. Revert. Two or three spot-checks per engine per release is a meaningful audit.

Common Pitfalls

PitfallProblemSolution
Wiring as a merge gateRuntime + fragility block everyoneNightly/on-demand advisory report
Mutating the whole appHours of UI-noise mutantsScope to engine/store directories
Chasing a scoreScore varies with scope, not qualityTrack survivors fixed, not the percentage
Trusting an unverified runKill detection may miss the test frameworkCalibrate on a suite you trust first

References

  • testing/coverage-ratchet/ — the cheap proxy this tool audits
  • testing/fitness-functions/ — deliberate-break drill (the manual fallback)
  • testing/tdd-feature/ — writing the assertions that kill survivors

© rshankras, 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 in skills/testing/mutation-testing of rshankras/claude-code-apple-skills.

  • SKILL.md
  • templates/muter.conf.yml

Open the folder on GitHubat commit 9ffb831

Compare with similar skills

Mutation Testing 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.

Mutation Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mutation Testing this skillrshankras/claude-code-apple-skills783—~1.1kAutomated safety check: NotesMIT
Coverage Reportn0an/VivaDicta131—~1.2kAutomated safety check: PassMIT
Xcsiftldomaradzki/xcsift489—~1.2kAutomated safety check: PassMIT
Test Writing WorkflowiOfficeAI/AionUi33k1 repos~1.2kAutomated safety check: PassApache-2.0
Evaluate PR Testsdotnet/maui23k—~2.9kAutomated safety check: PassMIT
Integration Testtracewayapp/traceway1.6k1 repos~2.4kAutomated safety check: PassMIT

Similar skills

  • Coverage Report

    n0an/VivaDicta

    Measure VivaDicta test code coverage from the terminal. An agent skill from n0an/VivaDicta.

    131 GitHub stars~1.2k tokensUpdated 3 days ago
    Testing & QAAuto-check passed
  • Xcsift

    ldomaradzki/xcsift

    Use xcsift for all Swift and Xcode build commands. An agent skill from ldomaradzki/xcsift.

    489 GitHub stars~1.2k tokensUpdated 3 days ago
    MobileAuto-check passed
  • Test Writing Workflow

    iOfficeAI/AionUi

    Sets the test-writing workflow for the repository: risk-first scenario lists, behavior-focused Vitest tests, a full run before each commit and a coverage target.

    33k GitHub starsUsed in 1 repo~1.2k tokens
    Testing & QAAuto-check passed
  • Official

    Reviews the tests added in a pull request for fix coverage, quality, edge cases and test type, and recommends lighter test types where they would do.

    23k GitHub stars~2.9k tokensUpdated today
    Testing & QAAuto-check passed
  • Integration Test

    tracewayapp/traceway

    Run a live-instance verification of traceway-cli that goes beyond the Go smoke suite — exercises real-data detail endpoints, TTY-default rendering, adaptive metric-name discovery, and emits a…

    1.6k GitHub starsUsed in 1 repo~2.4k tokens
    Testing & QAAuto-check passed
  • Requirements

    rizsotto/Bear

    Write, modify, or review a requirement file under docs/requirements -- pick the single owning file, keep the text contract-only, name IDs so they need no explanation, and verify cross-references and…

    6.5k GitHub stars~2k tokensUpdated yesterday
    Testing & QAAuto-check passed

More from rshankras/claude-code-apple-skills

All 41 skills in this repo
  • Accessibility Generator

    rshankras/claude-code-apple-skills

    Generate accessibility infrastructure for VoiceOver, Dynamic Type, and accessibility features.

    783 GitHub stars~1.4k tokensUpdated 2 mo ago
    Auto-check: notes
  • Animation Patterns

    rshankras/claude-code-apple-skills

    SwiftUI animation patterns including springs, transitions, PhaseAnimator, KeyframeAnimator, SF Symbol effects, scroll-driven effects, mesh gradients, text renderers, and shader effects.

    783 GitHub stars~2.1k tokensUpdated 2 mo ago
    Auto-check passed
  • App Description Writer

    rshankras/claude-code-apple-skills

    Generate compelling App Store descriptions that convert browsers into users.

    783 GitHub stars~1.3k tokensUpdated 2 mo ago
    Auto-check passed
  • App Icon Generator

    rshankras/claude-code-apple-skills

    Generates an app icon for macOS or iOS — a fast CoreGraphics placeholder and/or flat layered source art to finish in Icon Composer (the Liquid Glass / iOS 26+ standard).

    783 GitHub stars~5.1k tokensUpdated 2 mo ago
    Auto-check: notes
  • App Namer

    rshankras/claude-code-apple-skills

    Turn an app idea into validated, App-Store-ready name candidates.

    783 GitHub stars~3.4k tokensUpdated 2 mo ago
    Auto-check passed
  • Bundles And Licensing

    rshankras/claude-code-apple-skills

    Revenue beyond the single-app price tag — own-app bundles, Family Sharing as a conversion lever, cross-developer bundles & suites, and institutional licensing via Group Purchases / Apple School &…

    783 GitHub stars~1.8k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Mutation Testing

What does Mutation Testing do?

EXPERIMENTAL — mutation testing with muter to measure whether tests actually assert anything: mutants that survive reveal assertion-free coverage. Mutation Testing is an agent skill from rshankras/claude-code-apple-skills. EXPERIMENTAL — mutation testing with muter to measure whether tests actually assert anything: mutants that survive reveal assertion-free coverage.

When should I use Mutation Testing?

Mutation Testing fits situations like: tasks that involve Test coverage.

How do I install Mutation Testing in Claude Code?

Run `npx skills add rshankras/claude-code-apple-skills --skill mutation-testing -a claude-code`. Or copy the skill folder (skills/testing/mutation-testing in rshankras/claude-code-apple-skills) into .claude/skills/mutation-testing in your project. Claude Code loads it when a task matches its description.

How do I install Mutation Testing in Codex?

Run `npx skills add rshankras/claude-code-apple-skills --skill mutation-testing -a codex`. Or copy the skill folder (skills/testing/mutation-testing in rshankras/claude-code-apple-skills) into .agents/skills/mutation-testing in your project. Codex loads it when a task matches its description.

Can I use Mutation Testing 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 rshankras/claude-code-apple-skills --skill mutation-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mutation-testing, .gemini/skills/mutation-testing, .github/skills/mutation-testing and .opencode/skills/mutation-testing in your project.

What does Mutation Testing need to run?

Going by SKILL.md and its folder, Mutation Testing needs the command-line tools its instructions call (brew). Its frontmatter pre-approves these tools: Read, Write, Edit, Glob, Grep, Bash.

Does Mutation Testing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Mutation Testing safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Mutation Testing use?

Mutation Testing 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 Mutation Testing use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mutation Testing?

Skills that share tags, products or a category with Mutation Testing: Coverage Report (n0an/VivaDicta, 131 stars), Xcsift (ldomaradzki/xcsift, 489 stars), Test Writing Workflow (iOfficeAI/AionUi, 33k stars) and Evaluate PR Tests (dotnet/maui, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mutation Testing?

rshankras (a GitHub user) maintains it in rshankras/claude-code-apple-skills, which has 783 GitHub stars. The repository holds 41 skills in this directory. The repository was last updated on July 24, 2026.

Source: rshankras/claude-code-apple-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.