audit-tests
Skill1 starsChanged 6 months agoMITView on GitHub
Audit repository test suites for low-value, brittle, duplicative, or AI-generated tests. Use when Codex needs to review tests across a single project or monorepo, identify tests to delete or merge, upgrade weak tests, consolidate repeated setup into helpers, or produce a precise test quality cleanup plan.
14 other projects use a version of this.
Adopted by
Most recently taken up by
- ku5ic/claude-kittheir own version, first seen Nov 29, 2026
- borkweb/skillstheir own version, first seen Nov 29, 2026
- dzhng/skillstheir own version, first seen Nov 15, 2026
- nicholasjconn/skillstheir own version, first seen Nov 15, 2026
- dzhng/jevgreptheir own version, first seen Nov 11, 2026
- Buddhilive/buddhi-clitheir own version, first seen Nov 1, 2026
Used with
Projects with it also use close-spec, design-with-images and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
dzhngSkillclose-spec
When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for the how. Use when implementation has landed and the plan no longer matches what shipped, or the user says a feature/spec is finished. Pairs with [write-spec](../write-spec/SKILL.md) (the plan this closes) and [review](../review/SKILL.md) (run before closing).
Also in 5 projects that use this
dzhngSkilldesign-with-images
Explore UI and visual design with image generation, then iterate the real implementation against the user-selected concept. Use when brainstorming visual directions, offering mockup variants, or implementing an approved generated design; do not stop at the mockups or the first code approximation.
Also in 5 projects that use this
LucasMatuszewskiSkillaudit-agents
Audit and maintain agent configuration files (.claude/agents, AGENTS.md, CLAUDE.md, agent-memory). Checks for duplicates, outdated info, naming conflicts, wrong technical facts, and files over 200 lines. Fixes all issues and commits.
Also in 5 projects that use this
transitive-bullshitSkillcompare-screenshots
Compare screenshots against the intended design, distinguishing approved references from historical baselines. Use for iterative implementation matching, before/after visual review, objective image telemetry, or checking a lone capture for flat, empty, or badly framed content.
Also in 5 projects that use this
rhnfzlSkillexplore-unknowns
Walk the user through mapping the unknowns of a task before, during, and after they build it, and hand them a four-quadrant map (settled ground, open decisions, taste, and landmines) they keep. Reach for this eagerly whenever a request is ambiguous or underspecified, the codebase or domain is unfamiliar, the user will "know it when they see it", a reference implementation must be understood before porting, a build-queue or architecture-changing task is about to start, a mid-build deviation needs capturing, or a finished change needs buy-in or verified understanding before merge. Trigger even when the skill is not named: "do a blindspot pass", "find my unknown unknowns", "interview me about this change", "brainstorm the approach for a task I am about to build", "help me scope this", "what am I missing here", "plan this before I build", "I know nothing about X in this codebase". When a territory profile is present it reads memory and the graph first and feeds the map into the build pipeline; without one it degrades to a plain general map. Not for trivial or mechanical tasks with clear acceptance criteria, single-fact lookups, pure debugging of a known symptom, or pure code review, those have their own tools. Do not use it to run the build itself; the map is the deliverable and implementation remains a separate task, whether it has not started or is already underway.
Also in 5 projects that use this
- +7 more from dzhng
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- dzhng/jevgrep★ 3.2ksame name
- trycompai/comp★ 2.2ksame name
- dzhng/skills★ 1.5ksame name
- dzhng/yap★ 118same name
- dzhng/duet-agent★ 55same name
- borkweb/skills★ 9same name
- TalonT-Org/AutoSkillit★ 5same name
- daanvandenbergh/claudekit★ 2same name
- ku5ic/claude-kit★ 2same name
- Buddhilive/buddhi-cli★ 1same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- babysit-prSkill
- codex-cliSkill
- execute-dynamic-workflowSkill
- writing-specsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. 0 are common, 20 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
20
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Prefer tests that protect real behavior.
- Distinctive: line 24
Use repository-native metadata where possible: workspaces, package manifests, build files, project files, test config, or CI config.
- Distinctive: line 27
Prefer explorer-style subagents when they are available and working.
- Distinctive: line 29
Ask workers to inspect tests and return structured findings only.
- Distinctive: line 30
Do not ask workers to edit files.
- Distinctive: line 31
If the repository is small, use one worker for all tests.
- Distinctive: line 32
If subagent launch fails because of tool-schema incompatibility, missing tools, or platform limits, stop retrying the same worker type and …
- Distinctive: line 45
Prefer one clear behavior-level test over several narrow implementation-detail tests.
- Distinctive: line 56
Delete tests that add little or no incremental value.
- Distinctive: line 59
Avoid broad unrelated test rewrites.
- Distinctive: line 67
Use a different available general-purpose subagent type with the same bounded prompt, if the platform supports it.
- Distinctive: line 68
Run the module audit sequentially in the parent agent, keeping the same report format.
- Distinctive: line 75
Use this shape when dispatching module workers:
- Distinctive: line 113
Delete when bug signal and uniqueness are low, especially if brittleness is high.
- Distinctive: line 117
Keep tests that protect important behavior even if they need minor cleanup.
- Distinctive: line 122
Treat these as deletion or upgrade candidates unless there is a strong repo-specific reason:
- Distinctive: line 138
Prefer keeping or strengthening tests that:
- Distinctive: line 143
Use helpers/factories to make complex setup readable.
- Distinctive: line 182
Run the narrowest relevant test command first.
- Distinctive: line 183
Run broader package or repo checks when deletion or merge affects shared behavior.
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Audit Tests
Review all tests in a repository and identify tests that should be kept, deleted, merged, upgraded, or refactored to use shared helpers.
This skill is language-agnostic. Adapt test discovery, module boundaries, and verification commands to the repository's existing conventions.
Core Principle
Prefer tests that protect real behavior. Remove or change tests that mainly protect implementation shape, generated text, incidental structure, or current coding choices.
A low-quality test is unlikely to catch a real bug but likely to break during valid changes.
Workflow
- Inspect repository structure.
- Identify language ecosystems, package boundaries, test frameworks, and test commands.
- In monorepos, define modules by package/workspace/app/library ownership.
- In single projects, define modules by major source or test directories.
- Use repository-native metadata where possible: workspaces, package manifests, build files, project files, test config, or CI config.
- Dispatch bounded audit workers by module when the environment supports it.
- Prefer explorer-style subagents when they are available and working.
- Give each worker one module or bounded test area.
- Ask workers to inspect tests and return structured findings only.
- Do not ask workers to edit files.
- If the repository is small, use one worker for all tests.
- If subagent launch fails because of tool-schema incompatibility, missing tools, or platform limits, stop retrying the same worker type and continue the audit in the parent agent module-by-module.
- Build a test inventory.
- Include test file, test name, behavior under test, inputs and states, assertions, setup, mocks/helpers, and related production code.
- Note duplicate or overlapping behavior across files and modules.
- Distinguish unit, integration, end-to-end, contract, snapshot, policy, smoke, and regression tests when the distinction matters.
- Grade each test.
- Evaluate behavior value, bug signal, brittleness, uniqueness, setup quality, flakiness risk, runtime cost, and maintenance burden.
- Assign one action:
keep,delete,merge,upgrade,helperize, orinvestigate.
- Review across modules.
- Deduplicate tests that cover the same behavior and inputs.
- Prefer one clear behavior-level test over several narrow implementation-detail tests.
- Preserve coverage for important states, edge cases, regressions, contracts, security boundaries, and business requirements.
- Propose a precise cleanup plan.
- List tests recommended for deletion with rationale.
- List tests to merge and identify the surviving test.
- List tests to upgrade and the behavior/assertion change needed.
- List repeated setup that should become shared helpers.
- Include verification commands to run after cleanup.
- Edit only after user approval unless the user explicitly asked for implementation.
- Delete tests that add little or no incremental value.
- Merge duplicate tests into the clearest surviving behavior-level case.
- Refactor repeated setup only when it reduces real maintenance burden.
- Avoid broad unrelated test rewrites.
Subagent Compatibility
The audit must not fail only because a specific subagent type is unavailable.
In Claude Code, if an Explore subagent fails immediately with an API error like input_schema does not support oneOf, allOf, or anyOf at the top level, treat it as a platform/tool-schema incompatibility. Do not retry the same Explore subagent repeatedly. Fall back to one of these approaches:
- Use a different available general-purpose subagent type with the same bounded prompt, if the platform supports it.
- Run the module audit sequentially in the parent agent, keeping the same report format.
- For large repositories, process modules in batches and write intermediate notes before synthesizing the final plan.
Preserve the quality bar and output format regardless of whether the audit used parallel workers.
Worker Prompt Template
Use this shape when dispatching module workers:
Audit tests in <module/path>. Do not edit files.
Return a structured report with:
- Test files inspected
- For each test case:
- file and test name
- exact behavior it claims to evaluate
- inputs, states, and edge cases covered
- assertions made
- setup steps required
- mocks, fixtures, factories, or helpers used
- production behavior or requirement protected
- likely bug this test would catch
- brittleness risks
- duplicate/overlap candidates within this module
- recommended action: keep, delete, merge, upgrade, helperize, or investigate
- concise rationale
- Repeated setup patterns that should become helpers
- Any tests that look AI-generated, implementation-coupled, or policy-styleGrading Rubric
Score each dimension from 1 to 5 when useful.
bug_signal: Would the test fail for a plausible real defect?behavior_focus: Does it test public behavior, user-visible behavior, API contracts, or business rules?change_resilience: Would valid refactors, renames, formatting changes, or dependency updates leave it passing?uniqueness: Does it add coverage not already provided elsewhere?setup_quality: Is setup minimal, readable, and helperized when complex?cost_stability: Is it fast, deterministic, isolated, and unlikely to flake?requirement_trace: Can it be tied to a product requirement, API contract, safety invariant, regression, or repo policy?
Guidance:
- Delete when bug signal and uniqueness are low, especially if brittleness is high.
- Merge when multiple tests cover the same behavior and input conditions.
- Upgrade when the intent is valuable but the assertions or setup are brittle.
- Helperize when repeated setup obscures test intent or makes updates expensive.
- Keep tests that protect important behavior even if they need minor cleanup.
- Mark
investigatewhen a test may encode historical context that is not visible from the code.
Low-Quality Test Patterns
Treat these as deletion or upgrade candidates unless there is a strong repo-specific reason:
- Tests that inspect source text, function bodies, private names, or implementation branches.
- Tests that assert generated schema shape without checking consumer-visible behavior or documented contract requirements.
- Tests that enforce dependency, version, style, or repository policy better handled by package manager config, lint, CI policy, or lockfiles.
- Snapshot tests covering broad incidental output with unclear behavioral intent.
- Tests that only assert mocks were called without validating meaningful outcomes.
- Tests that duplicate another test with the same setup, input, and assertion.
- Tests whose main value is preserving current file structure, names, ordering, or formatting.
- Tests with excessive setup for a trivial assertion.
- Tests that require frequent updates during valid product or implementation changes.
- Tests that pass because they reimplement the same logic as production code.
- Tests with broad "does not throw" assertions and no meaningful state or output validation.
High-Value Test Patterns
Prefer keeping or strengthening tests that:
- Validate business rules, API contracts, user-visible behavior, persistence behavior, security boundaries, or important regressions.
- Cover failure modes, edge cases, permissions, invalid input, concurrency, recovery, or state transitions.
- Mock irrelevant dependencies while exercising the behavior under test.
- Use helpers/factories to make complex setup readable.
- Would catch a realistic bug without breaking on harmless refactors.
- Encode an explicit repo policy that is not reliably enforced elsewhere.
Cleanup Plan Format
Present recommendations grouped by action:
Delete:
- path/to/test.ext :: "test name"
Reason: <why low value or brittle>
Coverage impact: <why safe / what still covers it>
Merge:
- Remove <duplicate test>; keep or expand <surviving test>
Shared behavior: <behavior and inputs>
Upgrade:
- path/to/test.ext :: "test name"
Current issue: <weakness>
Proposed assertion/setup: <change>
Helperize:
- Repeated setup: <description>
Used by: <files/tests>
Proposed helper: <name/location>
Keep:
- Notable valuable tests worth preserving
Investigate:
- Tests whose value depends on missing product, policy, or historical contextVerification
After approved edits:
- Run the narrowest relevant test command first.
- Run broader package or repo checks when deletion or merge affects shared behavior.
- Report any commands that could not be run.
- Summarize removed tests, preserved coverage, and remaining risks.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

