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
Runs feature-scoped mutation testing to validate test suite quality. Use after implementation to verify tests catch real bugs (kill rate >= 80%).
development
Canonical AT completeness gate — research-anchored 7-category taxonomy (C1-C7) + 15-item mechanical checklist. Paradigm-neutral. Drives acceptance-designer reviewer verdict deterministically.
development
Canonical AT completeness gate — research-anchored 7-category taxonomy (C1-C7) + 15-item mechanical checklist. Paradigm-neutral. Drives acceptance-designer reviewer verdict deterministically.
testing
Methodology for minimizing test count while maximizing behavioral coverage - behavior definition, anti-pattern catalog, consolidation patterns, stopping criterion, coverage-preserving validation