nWave/skills/nw-optimize-tests/SKILL.md
Minimizes test count while preserving coverage. Detects byte-identical pairs, parametrize-inflation, language-guarantee tests, AST-shape tests, stale migration nets. Approval gate before any change.
npx skillsauth add nwave-ai/nwave nw-optimize-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.
Wave: CROSS_WAVE Agent: Trim (nw-test-optimizer) Reviewer: Trim Review (nw-test-optimizer-reviewer)
Dispatches Trim to inventory a test scope, detect duplication and anti-patterns, propose a consolidation plan, and apply it after explicit approval. Coverage is preserved; production code is never modified. Use after a feature lands, when a suite feels slow or noisy, on weekly audit, or whenever overtesting is suspected.
~/.claude/skills/nw-test-optimization/SKILL.md — methodology (loaded by agent)Trim compares against the wall-clock figures recorded in the execution-log.json.
@nw-test-optimizer
Execute test optimization for {scope}.
Configuration:
Trim presents the plan as a markdown table after Phase 3 (PLAN). The orchestrator (or invoking user) responds with one of:
No changes are applied without one of these responses. Trim never assumes approval.
If reviewer_chain: true:
@nw-test-optimizer-reviewer
Validate the optimization output for {scope}.
Reviewer hard-blocks on: production drift, coverage drop without justification, unmapped removal, missing approval gate evidence.
/nw-optimize-tests
Trim inventories the unit suite, runs md5sum cross-check, scans for anti-patterns, produces a leverage-sorted plan covering byte-identical pairs and parametrize-inflated files.
/nw-optimize-tests lean-wave-documentation
Trim resolves to tests/<feature-id>/ paths from the execution-log.json if available, otherwise scopes to test files referencing the feature-id.
/nw-optimize-tests tests/build/unit/test_skill_restructuring.py
Trim probes the single file (315 collected tests), checks migration-collapse lifecycle (skill 3.5), proposes collapse to ~3 tests.
/nw-optimize-tests tests/des/unit/ --reviewer
Trim runs the workflow, then dispatches Trim Review for adversarial validation. Reviewer issues YAML verdict.
/nw-refactor, crafter scope)git log --oneline {base}..HEAD (atomic commits per pattern)
<scope> (test files modified or deleted)
report (returned inline by agent) (baseline, after, deltas, SHAs)
testing
Acceptance test creation methodology for the DISTILL wave. Domain knowledge for the acceptance designer agent: port-to-port principle, prior wave reading, wave-decision reconciliation, graceful degradation, and document back-propagation.
development
Cross-agent collaboration protocols, workflow handoff patterns, and commit message formats for TDD/Mikado/refactoring workflows
development
Creates a phased roadmap.json for a feature goal with acceptance criteria and TDD steps. Use when planning implementation steps before execution.
testing
Acceptance test creation methodology for the DISTILL wave. Domain knowledge for the acceptance designer agent: port-to-port principle, prior wave reading, wave-decision reconciliation, graceful degradation, and document back-propagation.