Command Palette

Search for a command to run...

Назад к скиллам
скилл № 64565

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от 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.

  1. Findings. Run the step 1 scanner command once with CANT_FAIL_SCAN_ROOT set to the repository root, and save its table as findings.md there.
  2. Batches. Group the rows by folder: a row whose project: names a .csproj belongs 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 marked skip: mixed languages, which step 0 would refuse. The repository root is never a batch: list its own rows as not planned. A project with no finding gets no batch. Mark a batch skip: kind <kind> when any of its rows has kind live or operational.
  3. Show. Write plan.md there, 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 any unknown-kind batch's tests reach live or shared environments (outside C#, every kind is unknown), mark each one the user names skip: kind live, and ask which batches to run; the default is every pending row in order. A skip: kind batch 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.
  4. Run. Run steps 0 to 7 on each chosen folder in turn, unchanged, with the invocation's --max
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • 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), без исполняемых скриптов.

Похожие скиллы

Сравнить Cleanup с