Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/nwave-ai/nwave/nw-command-optimization-workflownpx skills add nWave-ai/nWave --skill nw-command-optimization-workflowgit clone --depth 1 https://github.com/nWave-ai/nWaveWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/nwave-ai/nwave/nw-command-optimization-workflow)<a href="https://agentmods.dev/skills/nwave-ai/nwave/nw-command-optimization-workflow"><img src="https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-command-optimization-workflow.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00022 | $0.01038 |
| Opus 5 | $0.00011 | $0.00519 |
| Sonnet 5 | $0.00004 | $0.00208 |
| Haiku 4.5 | $0.00002 | $0.00104 |
Grade A, and why
nw-command-optimization-workflow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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
- Classify: dispatcher, orchestrator, or simple
- Measure:
wc -lthe file - Identify content categories (approximate %): parameter parsing/validation | Workflow/orchestration logic | Agent prompt templates | Examples/documentation | Error handling | Boilerplate (orchestrator briefing, agent registry)
- 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
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- today First seen · 99 lines · 22 tokens per session scan A 360652060579
nw-command-optimization-workflow is a skill published in the GitHub repository nWave-ai/nWave (603 stars, last pushed 4d ago), licensed MIT. It adds 22 tokens to every session and 1,038 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
agent-crdt-synchronizer
Agent skill for crdt-synchronizer - invoke with $agent-crdt-synchronizer.
agent-code-review-swarm
Agent skill for code-review-swarm - invoke with $agent-code-review-swarm.
agent-release-manager
Agent skill for release-manager - invoke with $agent-release-manager.
agent-release-swarm
Agent skill for release-swarm - invoke with $agent-release-swarm.
agent-pagerank-analyzer
Agent skill for pagerank-analyzer - invoke with $agent-pagerank-analyzer.
agent-agentic-payments
Agent skill for agentic-payments - invoke with $agent-agentic-payments.