لوگوی اسکیلیکس اسکیلیکس | Skilliks آکادمی و استودیوی ابزارهای AI

skraft mutation

آزاد تازه‌وارد تاییدشده امن

کارهای تکراری ترمینال، مدیریت شاخه‌ها، نوشتن پیام کامیت استاندارد و ساخت اسکریپت‌های کمکی را سریع و یکدست انجام می‌دهد. (شامل ۶ گام عملی · سازگار با Claude Code و GitHub Copilot).

سازگاری با ابزارها: این Skill به مسیر/قابلیت اختصاصی Claude Code وابسته است. مشاهدهٔ جدول سازگاری

متن دستورالعمل (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

<!-- ‹guest · 2026-11-25› -->
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.

این نسخه با نشانه‌گذاری اختصاصی حساب شما نمایش داده می‌شود. برای نصب سریع، به تب نصب و راه‌اندازی بروید.

مهارت‌های مشابه و پیشنهادی

مشاهدهٔ همه ←
کیفیت کد و تست
✦ Pro

REA CI and tests audit

«REA CI and tests audit» دستورالعمل دقیقی برای «نوشتن و اجرای تست خودکار» در اختیار دستیار هوش مصنوعی می‌گذارد تا نتیجه…

⚡ /rea-ci-tests-audit SKILL.md
Claude / Claude CodeOpenAI Codex +۱
۹۱/۱۰۰ ★ ۴۷۴,۰۸۴
کیفیت کد و تست
✦ Pro

Finishing a Development Branch

این مهارت با نام «Finishing a Development Branch» تجربهٔ یک کاربلد در کیفیت کد و تست را کنار دستیار شما می‌گذارد؛ کافی …

⚡ /finishing-a-development-branch SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
کیفیت کد و تست
✦ Pro

Code Review Reception

اگر روی کیفیت کد و تست کار می‌کنید، «Code Review Reception» بخشی از کار را از دوش شما برمی‌دارد: «بازنویسی و تمیزسازی ک…

⚡ /receiving-code-review SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
کیفیت کد و تست
✦ Pro

Requesting Code Review

برای کارهای کیفیت کد و تست، «Requesting Code Review» یک راهنمای کوتاه و روشن است: مسیر «مدیریت هوشمند حافظه و کانتکست» …

⚡ /requesting-code-review SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
کیفیت کد و تست
✦ Pro

Test-Driven Development (TDD)

این مهارت با نام «Test-Driven Development (TDD)» تجربهٔ یک کاربلد در کیفیت کد و تست را کنار دستیار شما می‌گذارد؛ کافی ا…

⚡ /test-driven-development SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
کیفیت کد و تست
✦ Pro

Skill Creator

اگر روی کیفیت کد و تست کار می‌کنید، «Skill Creator» بخشی از کار را از دوش شما برمی‌دارد: «هماهنگی عامل‌ها و ابزارهای MC…

⚡ /skill-creator SKILL.md
Claude / Claude Code
۹۲/۱۰۰ ★ ۱۹۸,۷۹۴