Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

test-removal-criteria

БесплатноБез исполняемых скриптовНе проверен

Use when a suite has outgrown its value and someone is about to delete tests. Sorts candidates into duplicate, tautology, trivial, dead-signal and orphan, and…

testlandот testland★ 18 звёзд на GitHub

Об этом скилле

test-removal-criteria

The axis: removal, not selection

Two questions about a large test suite get confused, and they have very different risk profiles:

Question What it decides Effect of a wrong answer
Which tests run on this change? A per-change subset of an unchanged suite. Recoverable: the skipped test still exists and runs on the next full pass.
Which tests should stop existing? The contents of the suite itself. Not recoverable in practice: the behavior stops being asserted, and nothing in CI announces the loss.

This skill owns the second question only. Anything about narrowing a single run (impacted-set computation, previously-failing sets, fallback triggers, nightly safety runs) belongs to per-change selection and is deliberately out of scope here.

The asymmetry is the whole reason this skill is written conservatively. Meszaros names the end state of a bad removal a Lost Test, whose symptom is that "the number of tests being executed in a test suite has dropped (or has not increased as much as expected)", and lists it as a direct cause of Production Bugs: untested code has "no automated tests to tell the developer when they have introduced a problem" (Meszaros, Production Bugs). A deleted test and a disabled test produce the same silence.

How to use

  1. Classify each candidate into exactly one removal class - duplicate, tautology, trivial, dead-signal, or orphan (Step 1); anything that fits no class is not a candidate.
  2. Apply that class's test to confirm the classification (Step 2), honouring the never-remove list.
  3. Run the four-condition delete gate; any failed or missing-input condition reverts the verdict to keep (Step 3).
  4. Choose the action - keep, rewrite, fold, or remove (Step 4).
  5. Record the pass as a ledger plus a kept table, packaged by confidence - templates and the confidence-to-action rules are in references/removal-ledger-and-report-format.md (Step 5).

The burden of proof sits on removal

Five rules govern every decision below. They are not advisory.

  1. Keep is the default verdict. A test stays unless a removal case is affirmatively made. "No case was made either way" resolves to keep, never to delete.
  2. Every removal carries a stated reason and a named reviewer. The reason names the removal class and the evidence; the reviewer is a person, not a team alias, who signed off on that specific row. A removal without both is not eligible to ship. (Practitioner convention, not a standard: teams that skip the named-reviewer column end up with rubber-stamped bulk deletes.)
  3. "It never fails" is not evidence a test is worthless. A test that has passed for years while its subject churned may be the load-bearing guard that is passing because the code is still correct. Absence of failure is absence of evidence, in both directions.
  4. Coverage-tool output alone is not grounds for removal. Coverage finds untested code; it does not measure test quality. Per Fowler, "if you make a certain level of coverage a target, people will try to attain it. The trouble is that high coverage numbers are too easy to reach with low quality testing" (Fowler, TestCoverage). A redundant-coverage number is one input to the delete gate below, never the whole case.
  5. Never remove a test to make a signal go away. Meszaros is explicit about the temptation with an intermittently failing test: "we may be tempted to remove the failing test from the suite to 'Keep the Bar Green' but this would result in an (intentional) Lost Test" (Meszaros, Erratic Test). Flakiness is a diagnosis problem, not a removal class. Quarantine and fix.

Step 1 - Classify the candidate into one removal class

Each candidate gets exactly one class. If two fit, take the more conservative one (the one lower in this table).

Class Signal that puts a test in this class Default action
duplicate Two tests with the same normalized setup and the same normalized assertion arguments. Keep one, remove the other.
trivial The body has no assertion at all, or its only assertion is self-satisfying (expect(true).toBe(true), expect(1).toBe(1), expect(undefined).toBe(undefined)). Remove.
orphan The test imports a module or calls a function that no longer exists. Remove, and name the missing module in the change description.
tautology The expected side of the assertion recomputes the behavior under test. Rewrite to a known-good literal. Remove only if the rewrite has no value left.
dead-signal Zero failures
Полный SKILL.md на GitHub

Установить test-removal-criteria в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

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

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

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

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

.tessl-plugin/plugin.jsonreferences/applying-the-removal-classes.mdreferences/removal-ledger-and-report-format.md

FAQ

Что делает скилл test-removal-criteria?

Use when a suite has outgrown its value and someone is about to delete tests. Sorts candidates into duplicate, tautology, trivial, dead-signal and orphan, and deletes only when all four gate conditions hold, with a written reason, coverage evidence and a named reviewer.

Как установить скилл test-removal-criteria?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл test-removal-criteria запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить test-removal-criteria с