plugins/nw/skills/nw-command-optimization-workflow/SKILL.md
Step-by-step workflow for converting bloated command files to lean declarative definitions
npx skillsauth add nwave-ai/nwave nw-command-optimization-workflowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
wc -l the fileThese blocks appear in 5-12 commands, extract to shared orchestrator preamble skill:
After extraction, command references preamble.
If command contains HOW the agent works, move to agent definition or skill:
Command retains WHAT and success criteria. Agent owns HOW.
Remove: deprecated format references | Aspirational unimplemented features | Verbose JSON contradicting current format | BUILD:INJECT placeholders | Mixed-language comments
Keep 2-3 canonical examples max. Each demonstrates distinct pattern (correct usage, edge case, common mistake).
Apply declarative command template (load command-design-patterns skill):
For orchestrators, add Phases section between overview and agent invocation.
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)
develop.md at 2,394 lines requires special handling:
Approach: extract orchestration phases as lean sequence (which agent, which command, what context, what gate), remove all embedded sub-command content.
Extract common orchestrator knowledge to single shared skill:
Estimated: ~60-80 lines. Replaces ~620 lines duplicated across commands.
testing
Acceptance test creation methodology for the DISTILL wave. Domain knowledge for the acceptance designer agent: port-to-port principle, prior wave reading, wave-decision reconciliation, graceful degradation, and document back-propagation.
development
Cross-agent collaboration protocols, workflow handoff patterns, and commit message formats for TDD/Mikado/refactoring workflows
development
Creates a phased roadmap.json for a feature goal with acceptance criteria and TDD steps. Use when planning implementation steps before execution.
testing
Acceptance test creation methodology for the DISTILL wave. Domain knowledge for the acceptance designer agent: port-to-port principle, prior wave reading, wave-decision reconciliation, graceful degradation, and document back-propagation.