/agent-starter:test-auditfrom agent-starter
Audits test suites for value, prunes junk patterns, and enforces an authoring gate that ensures every test fails on a credible regression before being added.
Ships in agent-starter. 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.
A test earns its place by failing on a credible regression that no stronger test already catches. This skill has two uses: the authoring gate for every new or changed test, and the audit for an existing suite.
Before adding or changing a test, answer all four:
A regression test must fail before the fix for the intended reason and pass after it. A behavior-preserving refactor must not break it.
waitForTimeout(500)) standing in for a produced state.Keep tests that guard public API, protocol, config, migration, storage, security, permission, default values, cross-implementation parity, architecture boundaries and observable ordering, even when they are slow, static or read source. A source read stays when it is the cheapest guard of a user-facing key, byte or path and survives an identifier-only rename. A test that fails at baseline is a possible product bug: reproduce it and repair the owner, never delete the test for it.
git diff <file> is empty. Record the mutation and
the red message. An assertion that cannot be turned red protects nothing, so it
does not go in, even when the ledger asked for it.origin/main, never the shared checkout. Run
commands from inside that worktree: the agent-starter rm-scope-guard hook
blocks deletes outside the working directory. If you cannot, say up front that
file deletions will be handed to the user as one git rm command.python3 -I <this skill's directory>/scripts/find-test-only-exports.py .
It prints status, test-file refs, path, export, flag per line:
TEST-ONLY: no production reference, at least one test reference.USED-IN-FILE: used inside its own file plus tests; exported only so a test
can reach a private helper.UNREFERENCED: referenced nowhere outside docs.scaffold: an agent-starter foundation template or a file named in
.claude/rules/starter-patterns.md. These are installed ahead of use on
purpose. Never mark one D; ask the owner.
Word matches miss dynamic use, so verify every row by hand before it becomes a
candidate.subagent-dispatch to pick the tier.Each lane writes a ledger in the shape of references/ledger-template.md. Marks:
R retain: name the contract and the bug it catches.F fix: keep the contract, repair the assertion. Say what is vacuous and what
the repaired assertion checks.C consolidate: name the keeper that absorbs the assertion, by file, test
name and line.D delete: name the remaining proof, or why no contract exists.For each non-R candidate record: exact location, the failure it would or would not detect, non-test callers of the seam, the keeper, the git history reason it exists, which hook or CI stage runs it and its keeper, and confidence.
scaffold row;origin/main
and on an idle machine before attributing it. Report a timing flake as a
follow-up instead of fixing it in the audit.Lead with open owner decisions. Then: counts by mark, gaps closed with their mutations, production versus test LOC removed, baseline failures, timing flakes seen, and what was not covered (files only pattern-searched, skipped directories).
| Mistake | Correction |
|---|---|
| Deleting a test that fails at baseline | It is a bug report. Fix the owner in its own commit. |
| Trusting the ledger's keeper | Mutate the line the deleted test guarded and watch the keeper go red. If nothing goes red, the deleted cases protected nothing and need no replacement. |
| Deleting a starter template the finder flagged | scaffold rows go to the owner. |
| Each worker running the full suite | One serial run from the orchestrator. |
| Reporting ledger leads as findings | Verify by opening the test and keeper, or label as unverified. |
Adapted from openclaw's test-audit skill.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
test-audit, test-quality, test-maintenance, regression-testing
npx claudepluginhub sneg55/agent-starter --plugin agent-starter10 skills in this plugin
/adopt-projectApply agent-starter patterns to an EXISTING project - audits the codebase, proposes components by invasiveness tier (hooks, skills, CLAUDE.md, lint configs, patterns), and applies only what the developer approves. Use when the user says adopt, retrofit, "apply agent-starter to this project", or wants starter patterns in an existing codebase./commitCreate a single well-crafted git commit from current changes. Analyzes diff, follows repo's commit style, and writes a concise "why not what" message./commit-push-prFull git workflow - creates branch, commits, pushes, and creates or updates a PR with summary and test plan./dep-vuln-updateUse when dependencies in a repo have known vulnerabilities and need updating, including when the dep-vuln hook reports advisories at commit or merge request time, when the user asks to fix vulns, patch CVEs or GHSAs, run an audit fix, or bump vulnerable packages. Covers scanning tracked lockfiles with osv-scanner, choosing the smallest version that clears each advisory, overrides for transitive deps, verifying with the repo's own tests, and committing per repo./dreamMemory consolidation - review, merge, prune, and index memory files. Run periodically to keep memories organized and up-to-date./new-projectFull project bootstrap - interviews the developer (name, description, stack, components), then scaffolds directory structure, CLAUDE.md, config files, hooks, skills, and first commit.Other plugins' skills for the same job