agentleFS
shangyiyshangyiy/life-kit/skills/mutation-testing/SKILL.md

mutation-testing

Skill4 starsChanged 4 months agoMITView on GitHub

Assess test suite effectiveness via meaningful mutation operators. Child of /unit-tests. Mutants model realistic small faults (e.g. >= to >), not absurd swaps or magnet-detectable changes. Use for mutation score review, surviving mutant analysis, or /mutation-testing.

17 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 14 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Not a test-generation technique.

    line 18

“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/mutation-testing

Judge suite quality by seeding small realistic faults and measuring kills. Parent: unit-tests (references/principles.md).

Not a test-generation technique. Score = mutants killed / total (excl. equivalent).

Assumes: competent-programmer hypothesis + coupling effect (see Limits).

Meaningful Mutants

Adjacent slips a competent programmer might make:

  • Relational boundary: i >= 0 → i > 0, x < 5 → x <= 5
  • Arithmetic: x + 2*y → y + 2*y
  • Boolean: && → ||
  • Init removal: int x = 5 → int x
  • Constant from program text: x < 5 → x < 12

Reject (meaningless / equivalent)

  • Magnet mutants — detectable only by inspection, not by observable behavior
  • Non-context constants — x < 5 → x < 99999
  • Logically equivalent — i >= 0 → !(i < 0)
  • Non-adjacent relational swaps (e.g. > → <) — illustrative only; prefer adjacent boundary operators

Surviving Mutant Actions

SituationAction
Path not exercisedBetter input (/black-box); perturb representatives (e.g. for f(x,y), try y=1 then y=2)
Path exercised, weak oracleStrengthen oracle (/test-oracle)
EquivalentExclude from score
Meaningless operatorExclude; fix tool config

Output

Score (excl. equivalent), surviving meaningful mutants with fix, recommendation.

Limits

Assumptions may not hold for all codebases. Supplements black-box + white-box; do not chase 100% score.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.