Skip to content
Back to skills

Skraft Mutation

ASecurity

Use when the developer runs /skraft-mutation to run their mutation testing now, see each scope's score against the bar and the surviving mutants. The only way SKRAFT runs mutation: the pipeline never does, the project's CI runs it.

  • 16 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 22, 2026
ai-agentsbashnodetestinggit

Works with

  • claude code
  • cli

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned November 26, 2026

npx -y skills add SebastienDegodez/skraft-plugin --skill skraft-mutation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Skraft Mutation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Skraft Mutation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sebastiendegodez-skraft-mutation/badge)](https://www.skillsdirectory.com/skills/sebastiendegodez-skraft-mutation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: skraft-mutation
description: "Use when the developer runs /skraft-mutation to run their mutation testing now, see each scope's score against the bar and the surviving mutants. The only way SKRAFT runs mutation: the pipeline never does, the project's CI runs it."
disable-model-invocation: true
---

# skraft mutation

You run the mutation gate on the developer's demand, with the command they give you. The
pipeline never runs mutation; this skill is the only place it runs. Every scope (core and
boundary, or global) is held to 80%.

Ask every question below with the host's question tool (`AskUserQuestion` on Claude Code,
`ask_user` on Copilot), never by writing a line and reading the answer from the transcript.

## 1. The command, per component

Mutation testing is the developer's responsibility: you never write their mutation script,
install a tool, pick one for them, or store their command in a config file.

1. Read `CONTRIBUTING.md`, `.github/CONTRIBUTING.md` and `docs/CONTRIBUTING.md` when they
   exist. A mutation command written there (Stryker, PIT, mutmut, cosmic-ray, a project script)
   is a proposal: offer it as the first option of the question, with the folder it runs in.
2. Ask for each component its name, the folder its command runs in (`.` for the root) and the
   command. Without a proposal, ask the same question with no option filled in.
3. The command must write its scores as JSON to the file named by the `SKRAFT_MUTATION_RESULT`
   environment variable: `{ "scopes": [{ "name": "core", "score": 97.6, "survivors": ["src/Domain/Order.cs:12 Equality -> age > 18"] }, { "name": "boundary", "score": 85.7, "survivors": [] }] }`;
   `core` and `boundary` for a Clean Architecture component, one `global` scope for a single
   project. `survivors` is optional: one `file:line detail` line per surviving mutant, the file
   relative to the component root. `{baseSha}` in the command becomes `<base>`.

## 2. Alert on a full run

A command with no `--since`, `{baseSha}`, `delta`, `incremental` or diff option mutates every
line of the component. Before running it, alert the developer that the run is complete, not
incremental, and ask whether to run it as is or change it. The gate prints the same
`warning:` line at the top of its output.

## 3. Run

From the root of the working copy:

```bash
node "<skill>/scripts/mutation-gate/cli/mutation-gate.mjs" --root . --evidence .copilot-tracking/mutation --since "<base>" --run "<name>@<root>=<command>" [--run …]
```

`<skill>` is this skill's folder. `<base>` is the base of the work in progress:
`phaseHistory.DELIVER.baseSha` of the active pipeline when one is recorded, otherwise
`git merge-base HEAD <default branch>`. Drop `--since` when no command uses `{baseSha}`. One
`--run` per component, each quoted.

## 4. Report

Show the developer, from the gate's output:

- each scope's score and whether it meets the bar;
- the survivors, `file:line detail`, grouped by file; when the team reports none, say so and
  point to `.copilot-tracking/mutation/qg-mutation/<component>.log`;
- exit 2: the reason as the gate gives it.

The run never changes a delivery's evidence log: no log records mutation.

Kill survivors only when the developer asks: load `mutation-testing`, which says how, and rerun
the same command.

Files in this skill

  • SKILL.md1.7 KB
  • scripts/mutation-gate/GENERATED.md331 B
  • scripts/mutation-gate/cli/mutation-gate.mjs9.2 KB
  • scripts/mutation-gate/domain/mutation-gate-policy.mjs7.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.