Agent skill

Nw Command Optimization Workflow

by nWave-ai in nWave-ai/nWave

Step-by-step workflow for converting bloated command files to lean declarative definitions

MITAuto-check passedDevelopment

Install Nw Command Optimization Workflow

skills CLI
$ npx skills add nWave-ai/nWave --skill nw-command-optimization-workflow -a claude-code

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

GitHub CLI
$ gh skill install nWave-ai/nWave nw-command-optimization-workflow --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-command-optimization-workflow .claude/skills/nw-command-optimization-workflow && 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-command-optimization-workflow
GitHub stars
617
Token cost
~1.1k tokens
SKILL.md length
504 words
Files
1
Skills in repo
106
Repo updated
First seen
Licence
MIT

At a glance

Step-by-step workflow for converting bloated command files to lean declarative definitions

  • Works in 5 steps: Analyze → Extract → Restructure → …
  • Development work in your project
  • SKILL.md covers Overview, Phase 1: Analyze, Phase 2: Extract and Phase 3: Restructure, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Nw Command Optimization Workflow is an agent skill from nWave-ai/nWave. Step-by-step workflow for converting bloated command files to lean declarative definitions

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

It sits in Development. 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.

When your agent uses it

  • Development work in your project

Example prompts

  • “/nw-command-optimization-workflow”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Analyze
  2. Extract
  3. Restructure
  4. Validate
  5. Measure and Report

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

    No scripts in the folder and no shell commands in SKILL.md.

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

  • Network

    No URLs in SKILL.md.

    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 Command Optimization Workflow loads about 1.1k tokens when it runs. Until then it costs about 31 tokens; SKILL.md has 504 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~31
When it runs · the whole SKILL.md, loaded when a task matches
~1.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). 504 words, ~1,132 tokens.

Download SKILL.mdSave it as .claude/skills/nw-command-optimization-workflow/SKILL.md (or your agent's skills folder).
name
nw-command-optimization-workflow
description
Step-by-step workflow for converting bloated command files to lean declarative definitions
user-invocable
false
disable-model-invocation
true

Command Optimization Workflow

Overview

Convert oversized commands (500-2400 lines) to lean declarative definitions (40-300 lines) by removing duplication, extracting domain knowledge to agents, and adopting the forge.md pattern.

Phase 1: Analyze

  1. Classify: dispatcher, orchestrator, or simple
  2. Measure: wc -l the file
  3. Identify content categories (approximate %): parameter parsing/validation | Workflow/orchestration logic | Agent prompt templates | Examples/documentation | Error handling | Boilerplate (orchestrator briefing, agent registry)
  4. Flag reducible content: Duplication from other commands (orchestrator briefing, agent registry, parameter parsing) | Domain knowledge belonging in agents (TDD phases, review criteria, methodology) | Dead code (deprecated formats, aspirational features, old signatures) | Verbose examples (JSON blocks exceeding 3 examples) | Aggressive language (count CRITICAL/MANDATORY/MUST)

Phase 2: Extract

2a: Remove shared boilerplate

These blocks appear in 5-12 commands, extract to shared orchestrator preamble skill:

  • "Sub-agents have NO ACCESS to Skill tool" briefing (~20-30 lines/file)
  • Agent registry with capabilities (~15-20 lines/file)
  • Parameter parsing rules (~10-15 lines/file)
  • Pre-invocation validation checklist (~10-15 lines/file)
  • "What NOT to include" blocks (~8-12 lines/file)

After extraction, command references preamble.

2b: Move domain knowledge to agents

If command contains HOW the agent works, move to agent definition or skill:

  • TDD phase details -> nw-software-crafter | DIVIO templates -> nw-documentarist | Refactoring hierarchies -> nw-software-crafter | BDD/Gherkin -> nw-acceptance-designer | Review criteria -> reviewer agent | Mutation testing config -> nw-software-crafter

Command retains WHAT and success criteria. Agent owns HOW.

2c: Delete dead content

Remove: deprecated format references | Aspirational unimplemented features | Verbose JSON contradicting current format | BUILD:INJECT placeholders | Mixed-language comments

2d: Reduce aggressive language
  • "CRITICAL: You MUST extract..." -> "Extract..."
  • "MANDATORY: Use the Task tool" -> "Use the Task tool"
  • "NON-NEGOTIABLE requirement" -> Remove adjective entirely
2e: Condense examples

Keep 2-3 canonical examples max. Each demonstrates distinct pattern (correct usage, edge case, common mistake).

Phase 3: Restructure

Apply declarative command template (load command-design-patterns skill):

  1. Header: wave, agent, overview
  2. Context files required
  3. Agent invocation with configuration
  4. Success criteria
  5. Next wave handoff
  6. Expected outputs

For orchestrators, add Phases section between overview and agent invocation.

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

Phase 4: Validate

  • Under size target (dispatchers: 40-150, orchestrators: 100-300)
  • No duplicated boilerplate
  • No domain knowledge belonging in agents
  • No aggressive language (CRITICAL/MANDATORY/MUST count = 0)
  • 2-3 examples max
  • No dead code or deprecated references
  • Declarative structure (WHAT not HOW)
  • Measurable success criteria
  • Clear agent invocation pattern

Phase 5: Measure and Report

Report before/after: Line count (target 60-80% reduction for large files) | Content categories removed/moved | Aggressive language removed | Dependencies created (shared preamble, agent skill additions)

Special Case: develop.md (Mega-Orchestrator)

develop.md at 2,394 lines requires special handling:

  1. Embeds 6+ sub-command workflows inline
  2. Should reference sub-commands, not embed them
  3. Orchestration logic (phase sequencing, resume) is legitimate -- keep it
  4. Agent prompt templates for sub-commands -> replace with references
  5. Target: 200-300 lines of pure orchestration

Approach: extract orchestration phases as lean sequence (which agent, which command, what context, what gate), remove all embedded sub-command content.

Shared Orchestrator Preamble

Extract common orchestrator knowledge to single shared skill:

  • Architectural constraint about sub-agent tool access
  • Valid agent list with brief capabilities
  • Standard parameter parsing rules
  • Pre-invocation validation pattern
  • Correct/wrong invocation examples (2 each)

Estimated: ~60-80 lines. Replaces ~620 lines duplicated across commands.

© 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-command-optimization-workflow of nWave-ai/nWave.

Open the folder on GitHubat commit da401a8

Compare with similar skills

Nw Command Optimization Workflow 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 Command Optimization Workflow compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nw Command Optimization Workflow this skillnWave-ai/nWave617—~1.1kAutomated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Mailspring App ScreenshotsFoundry376/Mailspring18k—~1.5kAutomated safety check: PassGPL-3.0
Merge Dependabot PRsonyx-dot-app/onyx32k1 repos~2.2kAutomated safety check: PassMIT
Android UI Visual Reviewpermissionlesstech/bitchat-android7.8k—~2.6kAutomated safety check: PassGPL-3.0
Constraint-Driven Developmentaddyosmani/agent-skills103k2 repos~5.2kAutomated safety check: PassMIT

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Mailspring App Screenshots

    Foundry376/Mailspring

    Captures screenshots of the running Mailspring dev app for docs, PRs or visual checks by launching it with a debugging port, driving the UI and clipping to an element.

    18k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Merge Dependabot PRs

    onyx-dot-app/onyx

    Triages and lands a batch of open Dependabot PRs in the Onyx repo, where main is gated exclusively by GitHub's merge queue: approves and enqueues green PRs, closes superseded duplicates, fixes…

    32k GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • Android UI Visual Review

    permissionlesstech/bitchat-android

    Analyze an Android pull request, branch, commit, or patch for user-visible changes and produce reproducible before/after screenshots from isolated builds.

    7.8k GitHub stars~2.6k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Constraint-Driven Development

    addyosmani/agent-skills

    Records a project's quality bar in CONSTRAINTS.md and watches diffs for signs an agent quietly weakened it, such as suppressions, skipped tests or lowered thresholds.

    103k GitHub starsUsed in 2 repos~5.2k tokens
    DevelopmentAuto-check passed
  • Go Pedantry

    chromedp/chromedp

    This skill should be used when the user is writing Go code and needs guidance on Go-specific pedantry: error wrapping with fmt.Errorf and %w, interface design (accept interfaces return structs)…

    13k GitHub stars~3.7k tokensUpdated 2 days ago
    DevelopmentAuto-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 Command Optimization Workflow

What does Nw Command Optimization Workflow do?

Step-by-step workflow for converting bloated command files to lean declarative definitions. Nw Command Optimization Workflow is an agent skill from nWave-ai/nWave.

When should I use Nw Command Optimization Workflow?

Nw Command Optimization Workflow fits situations like: development work in your project.

How do I install Nw Command Optimization Workflow in Claude Code?

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

How do I install Nw Command Optimization Workflow in Codex?

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

Can I use Nw Command Optimization Workflow 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-command-optimization-workflow -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-command-optimization-workflow, .gemini/skills/nw-command-optimization-workflow, .github/skills/nw-command-optimization-workflow and .opencode/skills/nw-command-optimization-workflow in your project.

What does Nw Command Optimization Workflow need to run?

SKILL.md names no scripts, command-line tools or credentials: Nw Command Optimization Workflow is instructions for the agent only.

Does Nw Command Optimization Workflow access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Nw Command Optimization Workflow 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 Command Optimization Workflow use?

Nw Command Optimization Workflow 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 Command Optimization Workflow use?

About 1.1k tokens (SKILL.md is roughly 4.5k 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 Command Optimization Workflow?

Skills that share tags, products or a category with Nw Command Optimization Workflow: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Mailspring App Screenshots (Foundry376/Mailspring, 18k stars), Merge Dependabot PRs (onyx-dot-app/onyx, 32k stars) and Android UI Visual Review (permissionlesstech/bitchat-android, 7.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nw Command Optimization Workflow?

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.