/syv-skills:review-testsfrom syv-skills
Critically reviews test suites to reveal design issues — tests that pin implementation, near-duplicates, tests that freeze over-specialised designs, and tests that keep dead code alive — and names a remedy for each.
Ships in syv-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Tests are the clearest record of how an agent understood the code. A test that mocks four collaborators says the unit does too much; three tests that differ only in the function they call say the production code is written three times; a test for a function nothing else calls says the function shouldn't exist. Read the suite as evidence about the design, and say what it shows.
The job of a test is to catch the codebase drifting from its intended behaviour. A test that fails on every refactor and passes through real bugs is doing the opposite job, however green it is.
A weak finding costs more than a missing one, and so does a remedy that over-builds. Your default failure is to report too much and to "fix" duplication by proposing an abstraction nobody needs.
$SKILL_DIR means the directory containing this SKILL.md (${CLAUDE_SKILL_DIR} in Claude Code).
git diff --name-only $(git merge-base HEAD <default-branch>) plus git ls-files --others --exclude-standard, written one path per line to a temp file that you pass as --focus @<that file>.Run the project's test command once for the scope, if it has one and it's cheap. A test that fails or is skipped without anyone noticing is a finding in itself: report it in one line and don't develop it. If the runner isn't installed, say so, and check suspicious expectations by evaluating the production call directly when that is a one-liner.
Under ~5 tests or a single test file, skip the scripts, the gate and the written report: read them and answer in the conversation.
Run before reading tests; the hits are candidates, not findings.
ROOT is the repo root.
python3 "$SKILL_DIR/scripts/tells.py" ROOT [--focus @focus.txt]
python3 "$SKILL_DIR/scripts/dupes.py" ROOT [--focus @focus.txt]
python3 "$SKILL_DIR/scripts/reach.py" ROOT [--focus @focus.txt]
Stdlib only, Python and TypeScript/JavaScript. tells.py finds internal mocks, mock-heavy and interaction-only tests, private access, heavy arrange and variant families in production. dupes.py clusters near-identical tests and says whether they aim at one target or several. reach.py finds production code only tests reach, parameters only tests pass and production code that switches on test mode; when the project already has a dead-code tool (knip, ts-prune, vulture, deadcode), it names it, and that tool's output wins. For other languages, or without python3, use the by-hand checks in FAMILIES.md and say the scripts were skipped.
Read FAMILIES.md before judging, in particular each family's "Not an instance" list: boundary mocks, calls that are the contract, similar-looking tests of different rules and code reached by reflection or config are not findings. For each test in scope, read it next to the production code it calls and ask what the test claims the code is. Then place each candidate in one family:
Give each finding a remedy kind:
Test fixes and removals are mechanical enough to hand straight to an executor; design fixes need a design conversation first. Name the remedy (Extract Function, Parameterize Function, Strategy, Dependency Injection, Inline, delete). "Refactor this" is not a remedy.
Weak assertions in general (tautologies, change detectors) belong to the tdd skill's test guidance; mention them in one line only when they sit inside a finding.
You can't reliably gate your own findings. Hand the drafted list to the test-auditor subagent, started with a fresh context window, with prompt $SKILL_DIR/subagents/test-auditor.md:
<list>. Families: $SKILL_DIR/FAMILIES.md."Give the auditor read-only tools where the harness lets you. Each candidate goes in with its claim, its evidence (file:line, counts) and its remedy; script hits you set aside while judging don't go in, but count them as "set aside" in the tally. It returns KEEP, DOWNGRADE or DROP with evidence. Overturn a drop only where its evidence is wrong, and say so.
Read REPORT.md before writing. Each kept finding gets an ID (T1, T2…) that both outputs share.
Artifact tool), otherwise a local file.Make no edits to tests or production code during the review.
Ask which findings to act on, and walk each one: what varies and what doesn't, which callers move, what the tests look like afterwards, what must not break. The grill-me skill, a relentless interview through the decision tree, is a good companion. Then hand off: test fixes and removals to executing-plans with the findings file, design leads to improve-code-design on the listed paths, or fix a small one in place with the tdd skill's red-green loop.
FAMILIES.md · REPORT.md · subagents/test-auditor.md · scripts/
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
test-review, test-quality, design-audit, test-suite-analysis
npx claudepluginhub syv-ai/agentic-coding-playbook --plugin syv-skills20 skills in this plugin
/brainstormingThinks an idea through with the user before anything is built — new angles and radical alternatives, their thoughts organised and drawn, every open decision settled — and ends in an agreed design. Use when a feature or behaviour change is underspecified, when several approaches are plausible, when the user wants to explore an idea or think a design through, or wants their thinking organised or mapped. To only be questioned on a plan that already exists, use grill-me./executing-plansExecutes a written implementation plan task by task, verifying each step and reviewing the result against the plan before calling it done. Use when there is an existing plan to implement, in this session or one started fresh from a handoff./grill-meInterviews the user relentlessly about an idea, plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when the user wants to stress-test a plan, get grilled on an idea or design, or mentions "grill me". It is the interview inside brainstorming; when the idea also needs alternatives or a written design, use brainstorming./guardrailsReviews what a coding agent could damage in this repo, notes the controls already in place, and asks which remaining risks to cover./handoffCompacts the current conversation into a handoff document so another agent can pick up the work. Use when you want to hand off to a fresh session, or when continuing in a clean context would work better than carrying this one forward./improve-codebase-architectureFind deepening opportunities in a codebase — refactors that turn shallow modules into deep ones — and present them as a visual HTML report. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable.Other plugins' skills for the same job