Test Audit
SkillDev toolsLets your agent review and improve your test suite by flagging low-value tests before writing or deleting them.
Then ask your AI: use the Test Audit skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Add it as a step in a pipeline you build on Ahel, or connect Ahel to Claude, ChatGPT, Cursor, Claude Code or Codex and ask your AI to use it.
About this skill
Invoke whenever writing, changing, reviewing, or sweeping tests. Authoring gate for new tests plus audit workflow for low-value, implementation-coupled, or duplicative tests and the test-only production seams they demand.
What this skill tells your AI
The instructions your AI receives, as published by wannabespace/conar in .agents/skills/test-audit/SKILL.md and read by Ahel’s review.
Two modes, one value bar. Authoring mode gates every new or changed test at write time. Audit mode sweeps for tests that re-assert source, duplicate stronger proof, couple behaviour to implementation, or keep test-only production seams alive. Optimize for confidence, not deletion count.
Stack: bun test for unit tests (colocated *.test.ts), Playwright for E2E (apps/app/e2e).
Authoring gate
Before adding any test, answer four questions; a missing answer means do not add it yet:
- What observable behaviour, invariant, or independent contract does it protect?
- What credible regression makes it fail?
- Why does existing coverage not already catch that failure? Each contract has one primary test owner at the strongest boundary; another layer needs its own distinct risk. Prefer extending a table-driven case (
test.each) or shared fixture over a near-duplicate test. - Does it need a production seam (export, flag, wrapper, injection hook) no production caller needs? If yes, move the test to the real boundary instead.
Then check the test against every junk pattern; a match fails the gate unless the retention bar names the contract it independently guards. A test that breaks under behaviour-preserving refactoring asserts implementation, not behaviour; rewrite it at the owning boundary.
Bug regression tests must fail on the pre-fix code for the intended reason and pass after the fix. A regression test that never demonstrably failed proves the mock, not the fix. One regression at the owner boundary covers the bug; do not replay it at every layer it crosses.
Junk patterns
- assertion-free coverage probes;
- self-comparisons and identity copiers;
- copied fixtures, inventories, manifests, or export lists;
- exact source, import, or string greps;
- private predicate or call-shape tests duplicated at real boundaries;
- duplicate invocations of the same contract;
- per-dialect replays of a shared helper;
- tests whose only purpose is preserving test-only exports, globals, or wrappers;
- dead production code whose only callers are tests;
- expected values produced by the helper under test;
- mocks that implement the asserted behaviour, or one mock standing in for different APIs;
- fixtures that supply the result or ordering the owner should produce;
- capability tests that restate declared flags instead of exercising what the flag gates;
- negative controls that pass for an unrelated reason, such as a rejection from a different guard;
- names or fixtures that promise more than the input exercises.
Value bar
Tests justify their maintenance cost by protecting behaviour, a credible regression, or an independently meaningful contract. In an audit, an existing test that must change for behaviour-preserving reorganization is suspect, not automatically deletable.
Before judging a candidate, read the complete test and production owner, its callers, sibling implementations (other dialects), overlapping tests, and relevant history. When the test claims dependency-backed behaviour, inspect the dependency source or types directly.
Discovery
Keep discovery read-only and report evidence before editing. For broad scope, split lanes: packages/, apps/app/src, apps/app/e2e, plus a cross-cutting pattern sweep. Prefer a few high-confidence candidates over a large speculative inventory.
Retention bar
Keep a test when it independently enforces a public API, protocol, parser, per-dialect SQL, encryption, security, default, or architecture contract. Also keep:
- call ordering when order is observable behaviour;
- regressions with a credible failure mode;
- source inspection when it is the cheapest independent guard — fails when the contract changes, survives an identifier-only rename;
- a retained test that fails on the baseline: treat it as a possible product bug, reproduce it, and repair the owner rather than deleting it.
Static or slow is not a deletion reason. A test that resembles implementation may still be the independent contract; prove otherwise before removing it.
Candidate evidence
Record every field before editing. A missing field means the candidate is not ready for deletion:
- exact test name and location;
- what failure it can actually detect;
- non-test callers of the covered seam;
- stronger remaining owner-boundary proof, or why no proof is needed;
- why the test or seam exists (history);
- production or test-support deletion unlocked;
- risk and the focused validation command.
Edit shape
One coherent owner-boundary batch at a time. Delete obsolete test-only exports, wrappers, and dead production paths instead of preserving aliases. Move retained regressions to their canonical owners. Prefer net-negative production LOC. Do not add replacement tests that restate the same implementation.
Validation
- Run the owner and sibling tests:
bun test <path>. pnpm run fix && pnpm run check, thengit diff --check.pnpm testbefore handoff.- Inspect
git diff --numstat; report production separately from tests.
Handoff
Report: removed low-value categories; production simplifications; retained false positives and why they stay; proof actually run; production versus test LOC; named follow-ups.
Signals
- GitHub stars
- 1k
- Forks
- 106
- Last commit
- Oct 2026
Advanced
- Item type
- skill
- Key
test-audit-wannabespace- Source
- github.com/wannabespace/conar
Related picks
Skill · mattpocock
The pick for TypeScripttypescript-providers
Skill · composiohq
The pick for TypeScripte2e-testing
Skill · thedaviddias
The pick for End-to-end testinge2e-environment-preflight
Skill · sno-ai
The pick for End-to-end testingteach
Skill · mattpocock
More in Dev toolscaveman
Skill · juliusbrussee
More in Dev tools