Cleanup
Clean up low-value/tautological/vacuous/flaky tests in folder/whole repo's tests via /testing:audit findings: quarantine, rewrite (default), delete, merge…
от melodic-software★ 34 звезды на GitHub
Установить Cleanup в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Cleanup
Repository context. Gather first
Run each command below as its own Bash call, all sent together in one message (worktree isolation).
Keep any bound in the command's own pipe (output limits).
Unless this section says otherwise, treat a failure (not a repository, git unavailable) as an unknown value and carry on. Keep these as body calls, never ## Pre-computed context lines (gather-block convention).
- Current branch,
git branch --show-current - Default branch,
git symbolic-ref --short refs/remotes/origin/HEAD(unset: ask, unless the user named it) - Working tree status (empty = clean),
git status --porcelain | head -20
Arguments
$ARGUMENTS: <folder> (required, one folder per batch; the repository root runs the
Repository plan instead of the steps), --max <n> (the recording run's mutant
cap, default 100), --flaky <test> (repeatable; flaky tests the user names, also taken from the
conversation), --cannot-fail-only (run Cannot-fail-only mode instead of
steps 1 to 6). No folder: run the plan when the user asked for the whole repository, otherwise ask
for one. A target form (--repo, --repos-from, --owner, --fleet, --skip, or the same
request in words) runs Over several repositories.
Working files
Every step reads and writes <work> = .work/testing-cleanup/<folder-slug>/ in the repository
root, <folder-slug> being the folder path lowercased with every character outside [a-z0-9._-]
replaced by -. It holds before.tsv and after.tsv (the mutant records), classifier-brief.md,
classifier-answer.md (in cannot-fail-only mode, skeptic-brief-<n>.md and
skeptic-answer-<n>.md instead), decisions.md (the decision table, each item's approval state,
the step reached, and each edited file's git hash-object after its last edit) and pr-body.md.
Right after each edit to a test file (the step 2 quarantine, each rewrite, deletion or merge in
step 5 or cannot-fail-only step 4, each revert the user makes in step 6), run
git hash-object "<path>" and record the hash and the step reached in decisions.md; step 0's
resume check reads them.
Read the working files from that path at every step, never from conversation memory, so a
compacted or resumed session continues where the files say it stopped. Before the first write,
confirm .work/ is ignored (git check-ignore -q .work/x); when it is not, create
.work/.gitignore holding *, and say so.
Repository plan
For the repository root (git rev-parse --show-toplevel), plan one batch per test project, then
run each through the single-folder steps below. The plan edits and runs no test. Its files live in
.work/testing-cleanup-plan/, read at every batch boundary, never from conversation memory.
- Findings. Run the step 1 scanner command once with
CANT_FAIL_SCAN_ROOTset to the repository root, and save its table asfindings.mdthere. - Batches. Group the rows by folder: a row whose
project:names a.csprojbelongs to that file's directory; any other row to its own file's directory. A folder inside another listed folder of the same language (the adapters'language, as step 0 reads it) joins that folder's batch, since a batch scans its whole folder; one holding a folder of another language is markedskip: mixed languages, which step 0 would refuse. The repository root is never a batch: list its own rows asnot planned. A project with no finding gets no batch. Mark a batchskip: kind <kind>when any of its rows has kindliveoroperational. - Show. Write
plan.mdthere, one row per batch ordered by finding count, most first: folder, findings, kind, ci, state (pending,skip: <reason>, then the outcome). Show it, ask whether anyunknown-kind batch's tests reach live or shared environments (outside C#, every kind isunknown), mark each one the user namesskip: kind live, and ask which batches to run; the default is everypendingrow in order. Askip: kindbatch runs only when the user names its folder, and then only in Cannot-fail-only mode: never run a live or operational project's tests, a baseline included. - Run. Run steps 0 to 7 on each chosen folder in turn, unchanged, with the invocation's
--max
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- context/classifier-brief.md
- context/skeptic-brief.md
FAQ
Что делает скилл Cleanup?
Clean up low-value/tautological/vacuous/flaky tests in folder/whole repo's tests via /testing:audit findings: quarantine, rewrite (default), delete, merge, keep per test; mutation gate or --cannot-fail-only; unattended never commits. Use on existing test suites/tests: 'clean up these tests', 'prune the useless tests', 'fix the tests audit flagged'.
Как установить скилл Cleanup?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Cleanup запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…