Agent skill

Nw Optimize Tests

by nWave-ai in nWave-ai/nWave

Minimizes test count while preserving coverage. An agent skill from nWave-ai/nWave.

MITAuto-check passed

Install Nw Optimize Tests

skills CLI
$ npx skills add nWave-ai/nWave --skill nw-optimize-tests -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nWave-ai/nWave nw-optimize-tests --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nWave-ai/nWave.git skills-src && mkdir -p .claude/skills && cp -r skills-src/nWave/skills/nw-optimize-tests .claude/skills/nw-optimize-tests && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
nw-optimize-tests
GitHub stars
617
Token cost
~1k tokens
SKILL.md length
384 words
Files
1
Skills in repo
106
Repo updated
First seen
Licence
MIT

At a glance

Minimizes test count while preserving coverage. An agent skill from nWave-ai/nWave.

  • Works in 4 steps: APPROVE — full plan, all rows → APPROVE WITH EXCLUSIONS — list row IDs… → REJECT — abort, return findings as… → …
  • SKILL.md covers Overview, Context Files Required, Timing Baseline and Agent Invocation, plus 6 more sections
  • Calls git

What it does

Nw Optimize Tests is an agent skill from nWave-ai/nWave. 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.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: AI agents that guide you from idea to working code, with you in control at every step. The licence is MIT.

Example prompts

  • “Use the nw-optimize-tests skill to minimiz test count while preserving coverage. An agent skill from nWave-ai/nWave”
  • “/nw-optimize-tests”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. APPROVE — full plan, all rows
  2. APPROVE WITH EXCLUSIONS — list row IDs to skip
  3. REJECT — abort, return findings as deferred report
  4. REPLAN — provide new scope or constraint

What it can do on your machine

Read from SKILL.md and the folder at commit da401a8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Nw Optimize Tests loads about 1k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 384 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from nWave-ai/nWave at commit da401a8, republished under its MIT licence (© nWave-ai). 384 words, ~1,005 tokens.

Download SKILL.mdSave it as .claude/skills/nw-optimize-tests/SKILL.md (or your agent's skills folder).
name
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:

  1. APPROVE — full plan, all rows
  2. APPROVE WITH EXCLUSIONS — list row IDs to skip
  3. REJECT — abort, return findings as deferred report
  4. 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.

Show full SKILL.md (157 more words)Show less

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)

© nWave-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in nWave/skills/nw-optimize-tests of nWave-ai/nWave.

Open the folder on GitHubat commit da401a8

Compare with similar skills

Nw Optimize Tests next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Nw Optimize Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nw Optimize Tests this skillnWave-ai/nWave617—~1kAutomated safety check: PassMIT
Detection Engineering Coverage Evaluationgoogle/skills21k—~3.3kAutomated safety check: PassApache-2.0
Coveragealirezarezvani/claude-skills28k2 repos~669Automated safety check: PassMIT
SQL Optimizationgithub/awesome-copilot40k2 repos~2.3kAutomated safety check: PassMIT
Caveman Optimization EvaluatorJuliusBrussee/caveman110k1 repos~1.2kAutomated safety check: PassApache-2.0
Test Coveragethedaviddias/Front-End-Checklist74k—~407Automated safety check: PassMIT

Similar skills

  • Automates the end-to-end detection engineering workflow in Google SecOps using MCP tools.

    21k GitHub stars~3.3k tokensUpdated today
    SecurityAuto-check passed
  • Coverage

    alirezarezvani/claude-skills

    Analyze test coverage gaps. An agent skill from alirezarezvani/claude-skills.

    28k GitHub starsUsed in 2 repos~669 tokens
    Testing & QAAuto-check passed
  • SQL Optimization

    github/awesome-copilot

    Official

    Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server…

    40k GitHub starsUsed in 2 repos~2.3k tokens
    DatabasesAuto-check passed
  • Caveman Optimization Evaluator

    JuliusBrussee/caveman

    Turns a Caveman report-only optimization observation into one minimal code change and a paired baseline evaluation, after the operator picks which to pursue.

    110k GitHub starsUsed in 1 repo~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Test Coverage

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing CI coverage, automated checks, or test strategy related to Maintain test coverage thresholds.

    74k GitHub stars~407 tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • Prompt Optimizer

    affaan-m/ECC

    Analyze draft prompts, detect intent and missing context, match ECC commands, skills, and agents, and output a ready-to-paste optimized prompt with diagnosis and rationale — advisory only, never…

    275k GitHub starsUsed in 5 repos~3.8k tokens
    AI & LLM EngineeringAuto-check passed

More from nWave-ai/nWave

All 106 skills in this repo
  • DELIVER wave orchestration workflow -- 9 phases from baseline to finalization.

    617 GitHub stars~974 tokensUpdated 22 days ago
    Auto-check passed
  • Nw Diagram

    nWave-ai/nWave

    Generates C4 architecture diagrams (context, container, component) in Mermaid or PlantUML.

    617 GitHub stars~640 tokensUpdated 22 days ago
    Auto-check passed
  • Nw Diverge

    nWave-ai/nWave

    Generates 3-5 divergent design directions through JTBD analysis, competitive research, structured brainstorming, and taste evaluation before convergence.

    617 GitHub stars~2.2k tokensUpdated 22 days ago
    Auto-check passed
  • Nw Document

    nWave-ai/nWave

    Creates evidence-based documentation following DIVIO/Diataxis principles.

    617 GitHub stars~1.4k tokensUpdated 22 days ago
    Auto-check passed
  • Nw Execute

    nWave-ai/nWave

    A skill your agent uses when a DELIVER roadmap already exists and you need to dispatch exactly one identified step through its TDD cycle.

    617 GitHub stars~3k tokensUpdated 22 days ago
    Auto-check passed
  • Nw Refactor

    nWave-ai/nWave

    Applies the Refactoring Priority Premise (RPP) levels L1-L6 for systematic code refactoring.

    617 GitHub stars~1.2k tokensUpdated 22 days ago
    Auto-check passed

Questions about Nw Optimize Tests

What does Nw Optimize Tests do?

Minimizes test count while preserving coverage. An agent skill from nWave-ai/nWave. Nw Optimize Tests is an agent skill from nWave-ai/nWave. Minimizes test count while preserving coverage.

How do I install Nw Optimize Tests in Claude Code?

Run `npx skills add nWave-ai/nWave --skill nw-optimize-tests -a claude-code`. Or copy the skill folder (nWave/skills/nw-optimize-tests in nWave-ai/nWave) into .claude/skills/nw-optimize-tests in your project. Claude Code loads it when a task matches its description.

How do I install Nw Optimize Tests in Codex?

Run `npx skills add nWave-ai/nWave --skill nw-optimize-tests -a codex`. Or copy the skill folder (nWave/skills/nw-optimize-tests in nWave-ai/nWave) into .agents/skills/nw-optimize-tests in your project. Codex loads it when a task matches its description.

Can I use Nw Optimize Tests in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nWave-ai/nWave --skill nw-optimize-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nw-optimize-tests, .gemini/skills/nw-optimize-tests, .github/skills/nw-optimize-tests and .opencode/skills/nw-optimize-tests in your project.

What does Nw Optimize Tests need to run?

Going by SKILL.md and its folder, Nw Optimize Tests needs the command-line tools its instructions call (git).

Does Nw Optimize Tests access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Nw Optimize Tests safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Nw Optimize Tests use?

Nw Optimize Tests is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Nw Optimize Tests use?

About 1k tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Nw Optimize Tests?

Skills that share tags, products or a category with Nw Optimize Tests: Detection Engineering Coverage Evaluation (google/skills, 21k stars), Coverage (alirezarezvani/claude-skills, 28k stars), SQL Optimization (github/awesome-copilot, 40k stars) and Caveman Optimization Evaluator (JuliusBrussee/caveman, 110k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nw Optimize Tests?

nWave-ai (a GitHub organization) maintains it in nWave-ai/nWave, which has 617 GitHub stars. The repository holds 106 skills in this directory. The repository was last updated on September 16, 2026.

Source: nWave-ai/nWave on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.