Skip to content
Development
Skill

/nw-optimize-tests

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.

From plugin
nwave
628151 skills34 agents27 commands

Claude Code

$ npx -y skills add nWave-ai/nWave --skill nw-optimize-tests --agent claude-code

SKILL.md

nw-optimize-tests.SKILL.md
name: nw-optimize-tests
description: 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.
user-invocable: true
argument-hint: '[scope] - a path, a feature-id (resolves to tests/<id>/), or omit for the full unit suite.'

NW-OPTIMIZE-TESTS

Act when invoked. Do not wait for approval, do not present a plan table, and do not produce a report artifact.

Dispatch `nw-test-optimizer` over `{scope}` (methodology: `nw-test-optimization`).

Invariants:

  • Run the exact project-declared command vector before and after, in the same

environment and over the same scope. Compare terminal process timing only.

  • Production files in the diff: zero.
  • Coverage and observed behavior preserved; any drop is justified in the reply.
  • Consolidate by deletion, never by adding a test to cover a removed one.
  • Tests must prove observable behavior, never source prose or AST shape.

After the mutation, always dispatch `nw-test-optimizer-reviewer` over the resulting diff. It reads only, and it holds veto: production drift, coverage or behavior loss, and any deletion not mapped to a stated pattern are refusals the optimizer must repair before the work is done. Its verdict is prose in the reply, not an artifact or a schema.

Out of scope: authoring new tests, production refactoring, test infrastructure.

Read more
@nwave-ai
Ships withnwave

AI agents that guide you from idea to working code, with human judgment at every gate. nWave runs inside Claude Code. It breaks feature delivery into seven waves (discover, diverge, discuss, design, devops, distill, deliver).

628151 skills34 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
628
Star history of nWave-ai/nWave on GitHub, a chart by star-history.com

Other skills on nwave.

nw-ad-critique-dimensions

nw-ad-critique-dimensi…

Review dimensions for acceptance test quality - happy path bias, GWT compliance, business language purity, coverage completeness,…

@nwave-ai@nwave-aiInstall Skill
nw-agent-testing

nw-agent-testing

5-layer testing approach for agent validation including adversarial testing, security validation, and prompt injection resistance

@nwave-ai@nwave-aiInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about nw-optimize-tests.

Which coding agents can use nw-optimize-tests?
nw-optimize-tests installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.