nWave/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
Scala 3 language-specific patterns with ZIO, Cats Effect, and opaque types
testing
Kotlin language-specific patterns with Arrow, Raise DSL, and coroutine-based effects
testing
Haskell language-specific patterns, GADTs, type classes, and effect systems
testing
F# language-specific patterns, Railway-Oriented Programming, and Computation Expressions