nw-optimize-tests
Consolidates a test scope to the fewest tests that preserve coverage and behavior, deleting duplication, parametrize inflation, language-guarantee tests, AST-shape tests, and stale migration nets. An independent read-only reviewer with veto always validates the result.
Install / Use
npx skills add nWave-ai/nWave --skill nw-optimize-testsInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of nw-optimize-tests
nw-optimize-tests scores 87/100 on our quality scale, 2230th of 4,702 Development & Engineering skills we index (top 48%).
Its SKILL.md is 3.9 KB long, well organised into 15 sections with 5 code examples: a solid amount of guidance for an agent.
It has 617 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so nw-optimize-tests is actively maintained.
- Our last check on 2026-10-11 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-07. Automated pattern scan on 2026-10-07. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
nw-optimize-tests compared with similar skills
All 4 of these similar skills score higher than nw-optimize-tests; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| nw-optimize-tests (this skill)by nWave-ai | 87 | 617 | 2mo ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 117.6k | 9d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.3k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.4k | 3d ago | CLAUDE.md |
| lobehubby lobehub | 100 | 85.7k | today | MCP Server |
Frequently asked questions
- How do I install nw-optimize-tests?
- Run
npx skills add nWave-ai/nWave --skill nw-optimize-tests. The install tabs above show the steps for each supported agent. - Which AI agents does nw-optimize-tests work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is nw-optimize-tests safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is nw-optimize-tests still maintained?
- The repository was last updated about 2 months ago, so nw-optimize-tests is actively maintained.
Skill content
View source on GitHubname: nw-optimize-tests description: "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." user-invocable: true argument-hint: '[scope] - Optional: a path (e.g. tests/des/unit/), a feature-id (auto-resolves to tests/<id>/), or omit for full unit suite. --reviewer to chain reviewer agent.'
NW-OPTIMIZE-TESTS: Test Suite Optimization
Wave: CROSS_WAVE Agent: Trim (nw-test-optimizer) Reviewer: Trim Review (nw-test-optimizer-reviewer)
Overview
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.
Context Files Required
- The scope path (passed as argument or auto-detected)
~/.claude/skills/nw-test-optimization/SKILL.md— methodology (loaded by agent)
Timing Baseline
Trim compares against the wall-clock figures recorded in the execution-log.json.
Agent Invocation
@nw-test-optimizer
Execute test optimization for {scope}.
Configuration:
- scope: <path | feature-id | empty for full unit suite>
- approval_required: true # always; gate is non-negotiable
- mutation_validation: false # set true for critical scopes (financial, safety, infra)
- reviewer_chain: false # set true to dispatch nw-test-optimizer-reviewer after apply
Approval Gate
Trim presents the plan as a markdown table after Phase 3 (PLAN). The orchestrator (or invoking user) responds with one of:
- APPROVE — full plan, all rows
- APPROVE WITH EXCLUSIONS — list row IDs to skip
- REJECT — abort, return findings as deferred report
- REPLAN — provide new scope or constraint
No changes are applied without one of these responses. Trim never assumes approval.
Reviewer Chain (optional)
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.
Success Criteria
- [ ] Baseline numbers recorded (passed count, coverage %)
- [ ] Plan presented before any change
- [ ] Explicit approval received
- [ ] Production files in diff: 0
- [ ] Coverage % preserved (or drop documented per skill 5.3)
- [ ] Atomic commits per consolidation pattern
- [ ] Final report with deltas and SHAs
Examples
Example 1: Full unit suite audit
/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.
Example 2: Scoped to a feature
/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.
Example 3: Single fat file
/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.
Example 4: With reviewer
/nw-optimize-tests tests/des/unit/ --reviewer
Trim runs the workflow, then dispatches Trim Review for adversarial validation. Reviewer issues YAML verdict.
Out of Scope
- Authoring new tests (crafter scope, DELIVER wave)
- Production code refactoring (
/nw-refactor, crafter scope) - Test infrastructure changes (platform-architect, troubleshooter)
Expected Outputs
git log --oneline {base}..HEAD (atomic commits per pattern)
<scope> (test files modified or deleted)
report (returned inline by agent) (baseline, after, deltas, SHAs)
Related Skills
taste-skill
117.6kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
72.3kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.4kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
lobehub
85.7k🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
