audit-tests
Skill1 starsChanged 8 months agoMITView on GitHub
Audit the test suite for useless tests, consolidation opportunities, over-mocking, weak assertions, and other test quality issues. Use when user says "audit tests", "audit test suite", "review tests", or "test quality check". Generates an improvement plan in temp/ with explanations for each proposed change.
13 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- leonardourci/pnyxtheir own version, first seen Nov 16, 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
- dzhng/duet-agenttheir own version, first seen Oct 30, 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 versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- TalonT-Org/AutoSkillit★ 536% same
Wrote their own version · 12
- dzhng/jevgrep★ 3.2ksame name
- trycompai/comp★ 2.1ksame name
- dzhng/skills★ 1.5ksame name
- dzhng/yap★ 118same name
- dzhng/duet-agent★ 55same name
- leonardourci/pnyx★ 4same name
- daanvandenbergh/claudekit★ 2same name
- Buddhilive/buddhi-cli★ 1same name
- dzakirinf/skills★ 1same name
- nicholasjconn/skills★ 1same name
2 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 repository59 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- arch-lens-c4-containerSkill
- arch-lens-concurrencySkill
- arch-lens-data-lineageSkill
- arch-lens-deploymentSkill
- arch-lens-developmentSkill
- arch-lens-error-resilienceSkill
- arch-lens-module-dependencySkill
- arch-lens-operationalSkill
- arch-lens-process-flowSkill
- arch-lens-repository-accessSkill
- arch-lens-scenariosSkill
- arch-lens-securitySkill
- arch-lens-state-lifecycleSkill
- audit-archSkill
- audit-bugsSkill
- audit-cohesionSkill
- audit-defense-standardsSkill
- audit-frictionSkill
- audit-implSkill
- design-guardsSkill
- dry-walkthroughSkill
- elaborate-phaseSkill
- exp-lens-benchmark-representativenessSkill
- exp-lens-causal-assumptionsSkill
- exp-lens-comparator-constructionSkill
- exp-lens-error-budgetSkill
- exp-lens-estimand-claritySkill
- exp-lens-exploratory-confirmatorySkill
- exp-lens-fair-comparisonSkill
- exp-lens-governance-riskSkill
- exp-lens-iterative-learningSkill
- exp-lens-measurement-validitySkill
- exp-lens-pipeline-integritySkill
- exp-lens-randomization-blockingSkill
- exp-lens-reproducibility-artifactsSkill
- exp-lens-sensitivity-robustnessSkill
- exp-lens-severity-testingSkill
- exp-lens-unit-interferenceSkill
- exp-lens-validity-threatsSkill
- exp-lens-variance-stabilitySkill
- id-slopSkill
- implement-worktreeSkill
- investigateSkill
- make-arch-diagSkill
- make-experiment-diagSkill
- make-groupsSkill
- make-planSkill
- make-reqSkill
- make-scenariosSkill
- mermaidSkill
- plan-arcSkill
- rectifySkill
- review-approachSkill
- update-architectureSkill
- update-reqsSkill
- update-specsSkill
- verify-diagSkill
- verify-proposed-diagSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 8 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Use subagents for parallel exploration
- Distinctive: line 33
Read both the test AND the code it tests before judging
- Very specific: line 35
Write the improvement plan to temp/audit-tests/test_audit_{YYYY-MM-DD_HHMMSS}.md
- Distinctive: line 91
Test name says "error handling" but doesn't verify the error path
- Distinctive: line 93
Test claims to verify integration but mocks all dependencies
- Distinctive: line 132
Test files or supporting files exceeding 1000 lines.
- Very specific: line 154
Write a structured plan to: temp/audit-tests/test_audit_{YYYY-MM-DD_HHMMSS}.md
- Distinctive: line 160
Action: Remove, consolidate, strengthen assertion, reduce mocking, relocate, etc.
- Distinctive: line 180
Test utilities and helper functions in test support directories
- Distinctive: line 181
Test infrastructure and safety mechanisms
“Common” is measured: kept by at least 6 in 10 of the 12 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
Test Suite Audit Skill
Audit the test suite to identify useless tests, consolidation opportunities, quality issues, and tests that don't validate what they claim. Produces an actionable improvement plan with explanations.
When to Use
- User says "audit tests", "audit test suite", "review tests"
- User wants "test quality check" or "test cleanup"
- User asks to "find useless tests" or "consolidate tests"
Critical Constraints
NEVER:
- Modify any source or test code files
- Flag tests as useless without reading and understanding them
- Recommend removing tests that guard against real regressions
- Recommend changes that would reduce meaningful coverage
ALWAYS:
- Use subagents for parallel exploration
- Read both the test AND the code it tests before judging
- Provide file paths, line numbers, and an explanation for each finding
- Write the improvement plan to
temp/audit-tests/test_audit_{YYYY-MM-DD_HHMMSS}.md - Categorize findings by issue type and severity
Issue Categories
Category 1: Useless Tests (HIGH)
Tests that provide no meaningful coverage. They pass regardless of whether the code works correctly.
What to look for:
- Tests that assert always-true conditions (e.g.,
assert result is not Nonewhen the function never returns None) - Tests that verify tautologies (e.g., confirming an enum member is a valid enum member)
- Tests whose assertions would pass even if the code under test were completely broken
- Tests with no assertions at all (just call a function and check it doesn't crash)
- Tests in "testing mode" that bypass the logic they claim to test
Category 2: Redundant / Consolidatable Tests (MEDIUM)
Tests that duplicate each other or could be combined without losing coverage.
What to look for:
- Multiple tests asserting the exact same behavior with trivially different inputs (candidates for parameterization)
- Identical fixtures or setup code defined in multiple places
- Tests in different files that exercise the same code path
- Contract tests that duplicate what unit tests already cover
- Integration tests that only exercise unit-level logic (no actual integration)
Category 3: Over-Mocked Tests (HIGH)
Tests that mock so aggressively they no longer test real behavior. The test validates the mock wiring, not the production code.
What to look for:
- Tests that mock the system under test (mocking the handler inside a handler test)
- Auto-mocked database/IO layers where the test then only verifies mock call counts
- Tests that patch internal module functions instead of external boundaries
- Dependency injection tests that only verify args are passed through
- Tests where removing the production code entirely would still pass
Category 4: Weak Assertions (HIGH)
Tests that have assertions too loose to catch real bugs.
What to look for:
- Inequality assertions where exact values are known (e.g.,
assert count >= 2when it should be== 3) - Substring checks where full string comparison is appropriate
assert result(truthy check) when specific value/type should be verified- Mock call verification without checking call arguments
- Tests that check collection length but not contents
Category 5: Misleading Tests (MEDIUM)
Tests whose name, docstring, or structure misrepresents what they actually verify.
What to look for:
- Test name says "error handling" but doesn't verify the error path
- Docstring describes behavior the test doesn't actually assert
- Test claims to verify integration but mocks all dependencies
- Exception tests that don't verify the exception was actually raised or caught
- Tests named for edge cases that actually test the happy path
Category 6: Stale / Outdated Tests (MEDIUM)
Tests that no longer align with the current codebase.
What to look for:
- Tests for deprecated or removed functionality
- Tests that reference old file paths, class names, or module structure
- Fixtures marked as deprecated that are still defined
- Tests that are always skipped or conditionally disabled
- Tests whose setup creates state the production code no longer uses
Category 7: Fixture Issues (LOW)
Problems in test fixtures that make tests harder to understand and maintain.
What to look for:
- Same fixture defined in multiple places with slight variations
- Deeply nested fixture chains where the dependency graph is unclear
autouse=Truefixtures where a significant portion of tests in scope don't need them. Assess the usage ratio: if more than ~30% of tests don't need the fixture, it should be explicit instead of autouse. The more expensive the fixture, the lower the tolerance for unnecessary execution.- Overly complex fixtures (50+ lines of mock configuration)
- Dead fixtures that no test references
- Tests that create temporary files/directories directly instead of using test framework fixtures (e.g., pytest's
tmp_path) - Tests that manually set up resources the framework provides as fixtures
Category 8: Misclassified Tests (LOW)
Tests placed in the wrong directory or category.
What to look for:
- Unit-level tests in integration directories (no multi-component interaction)
- Tests in contract/specification directories that duplicate standard unit tests
- Integration tests that could be unit tests (everything is mocked anyway)
Category 9: Oversized Files (MEDIUM)
Test files or supporting files exceeding 1000 lines. Flag files approaching the threshold (800+) as warnings.
Audit Workflow
Step 1: Launch Parallel Subagents
Spawn subagents to explore different areas of the test suite. Divide by test directory/module, not by issue category — each subagent should assess all issue categories within its area.
Each subagent should read test files AND the corresponding production code to judge whether the test is meaningful. For each finding, note the file, line range, issue category, and a brief explanation of why it's a problem and what should change.
Step 2: Consolidate and Deduplicate
After subagents complete:
- Merge findings across subagents
- Deduplicate (same test flagged from different angles)
- Cross-reference fixture issues across test configuration files
- Identify patterns that repeat across the codebase (systemic issues vs. one-offs)
Step 3: Generate Improvement Plan
Write a structured plan to: temp/audit-tests/test_audit_{YYYY-MM-DD_HHMMSS}.md
Organize the plan into phases grouped by issue type. Each finding must include:
- File path and line range
- Issue category and severity
- Explanation: What the test does, why it's a problem, and what the concrete improvement is
- Action: Remove, consolidate, strengthen assertion, reduce mocking, relocate, etc.
Include a summary table at the top with counts by category.
Step 4: Terminal Summary
Output a summary including:
- Plan file location
- Total findings by category and severity
- Top systemic issues (patterns that appear across many files)
- Estimated test count reduction from consolidation
- Next steps
Exclusions
Do NOT flag:
- Tests that guard against known regressions (even if they look simple)
- Property-based tests (different testing philosophy)
- Test utilities and helper functions in test support directories
- Test infrastructure and safety mechanisms
- Tests that are intentionally minimal as smoke tests
- Shared fixtures in centralized test configuration
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.

