/supermatt:improve-tests [path or area of the test suite]from SuperMatt
Measures test suites, identifies low-value tests and slow setup, then deletes or demotes them to minimize runtime while preserving bug-catching coverage.
Ships in SuperMatt. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Measure a test suite, find the tests that cost time and catch nothing, find the setup that wastes time, and cut both. The goal is the shortest run that still catches the bugs this project actually makes. Starts from a measured baseline and an assessment: if the suite is already lean, say so and stop.
Test files are the target, so editing and deleting them is expected. Production code changes only where a test needs a seam (Step 7), and only as the approved plan names it. If a cheap test is impossible because module boundaries are wrong across several modules, that is architecture work: say so, and tell the user to run /improve-architecture in Claude linked installs or Cursor, /supermatt:improve-architecture from the Claude plugin, $improve-architecture in Codex, or /skill:improve-architecture in OMP.
Every step applies these. Findings cite them by name.
%PDF). A test that renders a full PDF to check an invoice total pays for the renderer to test the library.dependency-vetting skill through the host's skill mechanism. Obtain separate user approval before adding the vetted tool.package.json scripts, Gemfile, pyproject.toml, go.mod, .github/workflows/). A project often has more than one (unit and browser, backend and frontend). The CI command is the one that counts.SPEED-LEVERS.md for the timing command per runner and for splitting boot, import, and setup time from test time. If the project has coverage set up, record it in the same run. Time every run on a quiet machine: no other test suite running, counting your own subagents and other sessions. Record the load average just before the run. A suite that fills every core raises the load by itself, so quiet means nothing else is running, not a load threshold. When another suite is running, name it and ask the user once whether to wait.Scope: if the user named a path or area, scope to it. Otherwise take the whole suite, with the slowest files first: in most suites a few files hold most of the time.
Done when: every suite has a baseline row taken from a real run.
Dispatch independent subagents, one per area of the test tree (by directory or by test level), in one message. Each one reads its area's test files in full, edits nothing, and returns rows, not file contents. Each one also runs Step 3 on its own area, so brief it with Step 3's move list and the path to this skill's RED-FLAGS.md. If independent subagents are unavailable, use sequential fresh sessions where possible; otherwise perform the areas yourself and report the independence gap. One row per test file in scope:
Done when: every test file in scope has a row, and any file skipped is listed with its reason.
The Step 2 subagents run this step inside their areas. RED-FLAGS.md names each defect, and the name carries the move. For each claim, name the break, then take the first move that applies:
For a claim marked covered elsewhere, read the other test's assertion: running the same code is not checking the same thing. The subagents check cover inside their own area. You check the claims they marked as covered in another area. If the project already has a mutation tool set up (Stryker, mutant, mutmut, PIT, go-mutesting), run it yourself, scoped to the modules whose tests you propose to delete, and record which mutants lose their only killer.
Then read the timing profile against SPEED-LEVERS.md. A lever is a finding only when the profile shows the time it would recover.
Done when: every claim in the map has a move, and every Delete and Demote names its evidence.
Each finding carries its payoff: seconds saved from the baseline timings, or, for a fast test with no break, the maintenance cost it removes (it fails on refactors, it pins an implementation). A finding with neither is a style preference. Drop it.
| Verdict | Meaning | Action |
|---|---|---|
| Lean | Tests catch real breaks at sensible levels, and the time goes to tests that earn it | Tell the user, show the baseline. Stop. |
| Localized | A few files or one lever hold most of the waste | Present only those candidates. |
| Systemic | Waste spreads across the suite: a whole level duplicates another, one setup pattern runs everywhere | Present ranked candidates. Recommend the top 3-5 batches for this session. |
Idempotency rule: on an unchanged suite already assessed and trimmed, do not re-propose completed or rejected cuts without new evidence.
User override: if the user names a specific cut on a Lean suite, scope strictly to it.
Group findings into batches the user accepts or rejects whole: one lever, or one flag across one area. Rank by seconds saved, then by maintenance cost removed. For each batch:
Ask through the host's native multi-select capability when exposed, following its live schema. Use one option per batch, with the label naming the batch and the description carrying the saving and risk; preserve the highest-saving-first order and split across calls at the tool's live limit. If native multi-select is unavailable, show the same choices in chat and wait for the user's selections.
Use the host's native plan mode when exposed. Otherwise draft the same plan in chat. Per accepted batch, the plan lists the files to edit or delete, the replacement tests a demotion writes first, any production seam, and the command that verifies the batch. Order the batches:
SPEED-LEVERS.md, Tiers and CI), last, so a tier holds only tests that survived the cuts.Present the plan through the host's native approval mechanism when exposed. Otherwise present it in chat. Require explicit user approval before Step 7 edits files.
Per batch:
When a batch goes red, revert it and diagnose from the reverted state, then retry a smaller batch.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub svyatov/supermatt --plugin supermatt42 skills in this plugin
/ask-supermattAsk which skill or flow fits your situation. A router over the skills in this repo./babysit-prWatch a pull request until it is ready to merge: open it when the branch has none, handle review feedback before CI, recover CI within a bounded budget, keep the branch current, and stop without merging./codebase-designShared vocabulary for designing deep modules. Use when designing interfaces, data contracts, state transitions, shared mutable state, or retryable effects; deepening a module; choosing test seams; or consulting the deep-module vocabulary./code-reviewReview the changes since a fixed point (commit, branch, tag, or merge-base) along three axes: Standards (does the code follow this repo's documented coding standards?), Spec (does the code match what the originating issue/spec asked for?), and Adversarial (how does the change fail in production?). Runs each axis in an independent host reader and applies the repository external-peer policy. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X"./commitCommit all changes on the current branch, main included./dependency-vettingVerify a package or tool is authentic before installing, adding, upgrading, or recommending it. Use whenever a task would add a dependency to a project, suggest a CLI tool, or pull a package from npm, PyPI, crates.io, Go modules, RubyGems, Homebrew, or any other registry. Also use when a registry page, install command, or installed artifact looks inconsistent with the project that supposedly publishes it.Other plugins' skills for the same job