About test-audit
Test Suite Audit is a skill for reviewing software tests against audit criteria and specifications. It gathers project and test context, reports test and design issues by severity, and can optionally measure test strength with mutation testing.
Key features
- 01Audits scoped test files
- 02Checks tests against specifications
- 03Finds test and design issues
- 04Classifies findings by severity
- 05Optionally runs mutation testing
Use cases
- 01Reviewing tests in changed files
- 02Auditing a project’s test suite
- 03Finding missing specification coverage
- 04Prioritizing test improvements
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ juliomrqz/ skills --skill test-auditAfter installing, type/test-auditin Claude Code to confirm it loaded.
Bundled filesreferences/audit-criteria.mdreferences/mutation-testing.md
Details
From the project READMETest Suite Audit
Step 1: Clarify Scope
If the request already names the scope, skip to Step 2. Otherwise ask:
Would you like me to audit:
- A specific file — Provide the path to the test file
- Only changed files — I'll audit tests in the diff against
main(new or modified tests)- The entire project — I'll scan for all test files in the codebase
Also: is there a spec, issue, or list of required test cases I should check the tests against?
Wait for the answer. Done when the scope is fixed and you know whether a specification exists.
Step 2: Gather Context
Read the project's test config, package scripts, and CI files to find the framework, the test command, and the test files. Then collect, for every test file in scope:
- Code under test — read it; many test problems start in the production code
- Specification — the user's case list, PR description, linked issue, spec or plan file
- History (diff audits) — tests added in commits that only delete code
Done when you have the test command, the list of test files in scope, and the production file each one exercises.
Step 3: Apply Audit Criteria
Apply every section of references/audit-criteria.md to every test in scope. Done when each section has been checked against each file, including the sections that produce Design findings (Testability and Design Signals) and specification gaps (Traceability to the Specification).
Step 4: Measure Test Strength (Optional)
If a mutation testing tool exists for the language, offer to run it on the audit scope. Read references/mutation-testing.md before you run it: it has the preconditions, tool flags, and how to classify surviving mutants. If the user declines or no tool exists, the audit is static only.
Step 5: Report Findings
Severity, unless a criteria section sets its own:
- HIGH — the test can pass while the behavior it claims is broken, or a required error or security case has no test
- MEDIUM — the test is weak, brittle, or misleading: it misses some bugs or breaks on a refactor
- LOW — naming, structure, style
For each issue:
### [HIGH | MEDIUM | LOW] [Test | Design] Issue Title
**File**: `path/to/test_file.ext`
**Test**: `test name`
**Lines**: X–Y
**Problem**: What's wrong
**Current**:
[code snippet]
**Fix**:
[corrected code]
**Why**: One-sentence rationale
For a Design finding, set File to the production file and give the production-code fix under Fix, with a short-term test fix after it.
Step 6: Summarize
Conclude with:
- Critical issues — the HIGH findings
- Quality issues — the MEDIUM findings
- Style issues — the LOW findings
- Design findings — production-code changes that make the tests simpler
- Test strength — if Step 4 ran: tool, scope, productive surviving mutants (score as context only); else "static audit only"
- Overall health — one paragraph
- Top 3–5 priorities — highest-impact improvements
- Suggested test list — each missing case as one given/when/then line, ready to paste into the next prompt to an agent