src/autoskillit/skills_extended/audit-tests/SKILL.md
Audit the test suite for useless tests, consolidation opportunities, over-mocking, weak assertions, placement/organization issues, xdist safety violations, test path filter integrity, 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 {{AUTOSKILLIT_TEMP}}/ with explanations for each proposed change.
npx skillsauth add talont-org/autoskillit audit-testsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
NEVER:
run_in_background: true is prohibited)ALWAYS:
{{AUTOSKILLIT_TEMP}}/audit-tests/test_audit_{YYYY-MM-DD_HHMMSS}.md (relative to the current working directory)audit_report_path = <absolute path to test_audit_{YYYY-MM-DD_HHMMSS}.md>Tests that provide no meaningful coverage. They pass regardless of whether the code works correctly.
What to look for:
assert result is not None when the function never returns None)Tests that duplicate each other or could be combined without losing coverage.
What to look for:
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 have assertions too loose to catch real bugs.
What to look for:
assert count >= 2 when it should be == 3)assert result (truthy check) when specific value/type should be verifiedTests whose name, docstring, or structure misrepresents what they actually verify.
What to look for:
Tests that no longer align with the current codebase.
What to look for:
LAYER_CASCADE_CONSERVATIVE or LAYER_CASCADE_AGGRESSIVE keys in tests/_test_filter.py that don't match the current set of subpackages under src/autoskillit/.autoskillit/test-filter-manifest.yaml patterns that match zero tracked files (orphaned entries).autoskillit/test-source-map.json not regenerated within the quarterly scheduleProblems in test fixtures that make tests harder to understand and maintain.
What to look for:
autouse=True fixtures 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.tmp_path)Tests placed in the wrong directory or category.
What to look for:
tests/ root that are part of the filter infrastructure (test_test_filter.py, test_test_filter_plugin.py, test_test_filter_step7.py) — these are correctly placed and should NOT be flagged for relocationTest files or supporting files exceeding 1000 lines. Flag files approaching the threshold (800+) as warnings.
Tests and configuration that maintain the path-based test filter's correctness. The filter system (tests/_test_filter.py) provides a 5-minute local feedback loop by selecting only affected test directories. False negatives here mean broken code passes CI; false positives mean slow developer feedback.
Cascade alignment:
LAYER_CASCADE_CONSERVATIVE — these tests are silently skipped when the imported module changes (false negative). Check by walking from autoskillit.<pkg> imports in each test file and verifying the test's directory appears in LAYER_CASCADE_CONSERVATIVE[<pkg>]src/autoskillit/ not present as keys in both LAYER_CASCADE_CONSERVATIVE and LAYER_CASCADE_AGGRESSIVEimportlib.import_module)Manifest coverage:
.autoskillit/test-filter-manifest.yaml — causes unnecessary full runs when only that file changedSize marker correctness:
arch/, contracts/) that have zero size markers — these are fully deselected by aggressive mode's size filter, nullifying the always-run safety netsmall-marked tests that spawn subprocesses or perform real filesystem I/O (should be medium)medium-marked tests that access the network (should be large)_SIZE_DIRS in conftest.py diverging from SIZE_DIRECTORIES in tests/arch/test_size_markers.pyBucket A discipline:
BUCKET_A_PATTERNS that could be narrowed to specific test directories via the manifest instead of triggering a full runTest file naming for oracle traceability:
src/autoskillit/ with zero corresponding test_<module>.py files — the coverage oracle (test-source-map.json) and aggressive mode step 7 file-level filtering rely on naming correspondenceFilter infrastructure staleness:
LAYER_CASCADE_CONSERVATIVE or LAYER_CASCADE_AGGRESSIVE keys in tests/_test_filter.py that don't match the current set of subpackages under src/autoskillit/test-source-map.json (coverage oracle) not regenerated within the quarterly scheduleALWAYS_RUN_CONSERVATIVE or ALWAYS_RUN_AGGRESSIVE sets containing directories that no longer exist under tests/Spawn 6 domain-based subagents. Each covers all issue categories (C1–C11) within its area. Group by source domain, not by issue category. Each subagent must read both test files AND the corresponding production code before making judgements.
core/ and config/ sub-packages. Also check conftest.py for fixture quality.pipeline/ and workspace/ sub-packages.execution/ sub-package.recipe/ and migration/ sub-packages.server/ and cli/ sub-packages.tests/CLAUDE.md for accuracy against the actual test files on disk. Additionally, perform filter integrity checks: verify filter cascade maps (LAYER_CASCADE_CONSERVATIVE, LAYER_CASCADE_AGGRESSIVE) against actual source subpackages under src/autoskillit/; check manifest completeness against git ls-files; verify size marker rollup coverage against _SIZE_DIRS in conftest.py; check Bucket A minimality (files that could use manifest instead); verify always-run directories (ALWAYS_RUN_CONSERVATIVE, ALWAYS_RUN_AGGRESSIVE) have appropriate size markers or are exempted from size filtering.For each finding, note the file, line range, issue category, and a brief explanation of why it's a problem and what should change.
After subagents complete:
Write a structured plan to: {{AUTOSKILLIT_TEMP}}/audit-tests/test_audit_{YYYY-MM-DD_HHMMSS}.md (relative to the current working directory)
Organize the plan into phases grouped by issue type. Each finding must include:
Include a summary table at the top with counts by category.
Output a summary including:
Emit the structured output token so the recipe can capture the path:
audit_report_path = {{AUTOSKILLIT_TEMP}}/audit-tests/test_audit_{YYYY-MM-DD_HHMMSS}.md
Do NOT flag:
tests/ root that are part of the filter infrastructure (test_test_filter.py, test_test_filter_plugin.py, test_test_filter_step7.py, _test_filter.py) — these test root-level infrastructure and are correctly placed at the root>= 22 patterns) — these are intentional drift detectors, not weak assertionsdevelopment
Generate YAML recipes for .autoskillit/recipes/. Use when user says "make script skill", "generate script", "script a workflow", "write a script", "create a script", "new recipe", "write a pipeline", or when loaded by other skills for script formatting.
data-ai
Create Uncertainty Representation visualization planning spec showing error bar definitions, distribution-aware alternatives, and multi-seed variance protocols. Statistical lens answering "How is uncertainty honestly represented?"
data-ai
Create Temporal Dynamics visualization planning spec showing axis scaling (linear vs log), smoothing disclosure, epoch/step alignment, run aggregation (mean + variance bands), early-stopping markers, and wall-clock vs step-count x-axis. Temporal lens answering "Are training dynamics shown clearly and honestly?"
data-ai
Create Narrative Story Arc visualization planning spec showing visual consistency across the report (same color = same model everywhere), logical figure progression, redundant figure detection, and narrative dependency between figures. Narrative lens answering "Do the figures tell a coherent story across the report?"