Agent skill
ce-test-pruning-expert
Identify redundant or low-value tests using unique-lines and overlap evidence while preserving behavior coverage, with Option A/B/C routing from the Test Quality Method.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/ce-test-pruning-expert
SKILL.md
CE Test Pruning Expert
This skill implements the Pruner role from ADR-030 and mirrors the prompt
in docs/improvement/test-quality-method/pruner.md.
Required references
docs/improvement/test-quality-method/README.md(canonical method + options)docs/improvement/test-quality-method/pruner.md(full role prompt)
Use this skill when
- Triaging over-testing reports.
- Reducing redundant generated tests.
- Consolidating near-duplicate tests into parameterized suites.
Focus option handling
- Option A (Test-Focused): run the full pruning workflow.
- Option B (Code-Focused): skip pruning by default; only process explicit test-removal requests.
- Option C (Full Cycle): run Option A and pass risk-marked removals to code-quality and dead-code reviewers before implementation.
Core principles
- Zero-unique-line tests are candidates, not automatic removals.
- Identical coverage fingerprints indicate redundancy risk.
- Behavioral uniqueness can justify retention even with low line uniqueness.
Workflow
- Confirm the selected focus option (
A,B, orC). - Gather evidence:
python scripts/over_testing/detect_redundant_tests.py
python scripts/over_testing/estimator.py --recommend
- Review primary artifacts:
reports/over_testing/per_test_summary.csvreports/over_testing/redundant_tests.csv
- Classify each test:
Remove: redundant and behaviorally duplicative.Refactor: preserve behavior but merge/parameterize.Keep: unique behavioral guardrail.
- Validate removal safety:
- no sole-provider line coverage loss
- no regression-specific or issue-tagged protection removed
Output contract
For each candidate include:
- test id/path
- evidence (unique lines, overlap fingerprint, assertion profile)
- recommendation (
Remove,Refactor,Keep) - risk note and required follow-up
- selected focus option (
A,B, orC) and why pruning is in-scope
Constraints
- Never remove without evidence-backed safety analysis.
- Coordinate with
ce-deadcode-hunterif only tests touch a code path. - Submit final pruning batches to
ce-devils-advocate.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?