fallow-mutation
БесплатноБез исполняемых скриптовНе проверенMutation testing for TypeScript and JavaScript with `fallow mutation`. Use when asked to improve, strengthen or check the tests of a change, a PR, a branch or…
от fallow-rs★ 145 звёзд на GitHubОб этом скилле
Fallow Mutation: test the tests of TypeScript and JavaScript
fallow mutation makes small edits to the code (mutants) and runs the
project tests against each one. A mutant that no test detects survived: the
code can be wrong there while the tests pass. You write the tests.
To add tests, do the loop below. To remove, merge or refactor tests, read references/test-suite-changes.md.
When not to use
- Rust code: use the
cargo-fallowskill (cargo fallow mutants). - A pass or fail verdict for a PR: use the
fallowskill (fallow audit).fallow auditandfallow reviewnever start a run.
Agent rules
- A run executes the project tests many times, and the tests can write
files or call other systems. Start a run when the user asks for better
tests, for a check of the tests, for a removal of tests, or for mutation
testing. In each other task, show the plan of step 1 and ask. Only the
CLI starts a run: the MCP tools
mutation_plan,mutation_inspectandmutation_tasksrun no test. - Use
--format json --quietand parse stdout as JSON. Exit code 0 means that the run finished, also with survivors. Exit code 1 means a score below--min-score. Exit code 2 means an error, with amessagein the JSON. On exit code 2 and on apartialrun, read references/run-control.md. Readfallow mutation --helpbefore you use a flag that these files do not name. - Keep each report and the verdict document out of the tracked tree, and
do not commit them or the run journal. Use
.fallow/when.fallow/.gitignoreexists after the plan of step 1, else the system temp directory. A>redirect or a-opath in another project directory makes the worktree dirty, and a run then exits 2. - Start a run in the foreground and wait for the result. Do not end your
turn while a run is in progress. When your shell has a command timeout,
pass a
--time-budgetsome minutes shorter than it, and continue with--resumeuntil the run iscomplete. - When another run or another agent uses the same machine, pass
--concurrency 2. Do not start two runs in one project at the same time. - Do not pass
--allow-side-effects. Fallow skips the mutants in a function that writes to a file system, a process, a network or a database. Such a mutant can remove the guard of a real write. The check does not follow calls into helpers. Pass the flag only when the user asks for it and the tests cannot reach a real system.
The loop
1. Plan
fallow mutation --plan --base main --format json --quiet
The plan runs no code. Replace main with the base branch of the change.
Read counts, then check these conditions:
| Condition | Action |
|---|---|
The test script in package.json uses a runner other than Vitest, node:test or bun test (for example Jest or Mocha) |
Start no run, and do not install a runner to make a run possible. Tell the user. Then write tests for the behavior of the change without mutation evidence, and say so in the report. |
counts.planned is 0 or very low, and the change is a signature or a parameter |
Add --function-scope. |
counts.planned is 0, and counts.pruned_dead_code or counts.pruned_side_effect_sink is not 0 |
Start no run. No test and no other code imports the change, or each changed function writes to a real system. Tell the user. |
counts.planned is 0 for another reason |
Replace --base with the changed files as paths: fallow mutation src/cart.ts. With a path, fallow mutates each line of the file. |
| The change is in one package of a monorepo | Run from the root with --base. With a package directory as a path, fallow mutates the whole package. --workspace exits 2. |
counts.planned is above 100 |
Tell the user the size. Read references/run-control.md and set a limit. |
Done when: you know the test runner, the number of planned mutants, and the limits of the run.
2. Run
fallow mutation --base main --format json --quiet
A run exits 2 when the worktree has an uncommitted file, also a new test.
Do not commit for the user. Pass --allow-dirty when a source file or a
test file is not committed. When a source file is not committed, repeat
this step in place of step 5.
Read these fields before the open mutants:
completion.status. Onlycompletemakes an empty list of survivors conclusive. Apartialrun lists itsreasons.baseline_failures. A test that fails on the original code decides no mutant. Fix that test first, then run again.errors, andno_coveragemutants in code that has tests. Both can mean that a test file did not run.
Done when: the run is complete, or you can name each reason why it is
partial.
3. Sort each open mutant
fallow mutation tasks --format json --quiet
fallow mutation inspect <mutant_id> --format j
Установить fallow-mutation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл fallow-mutation?
Mutation testing for TypeScript and JavaScript with `fallow mutation`. Use when asked to improve, strengthen or check the tests of a change, a PR, a branch or a file, to check whether a test can fail at all, to find behavior that the tests do not protect, to find redundant tests, to check that a change of the tests did not weaken them, to gate a mutation score, or to run fallow mutation. Do not use to raise line coverage, to write one requested test, or to fix a failing test. Do not use for Rust code; use cargo-fallow for that.
Как установить скилл fallow-mutation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fallow-mutation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic