/nw-command-design-patterns
Best practices for command definition files - size targets, declarative template, anti-patterns, and canonical examples based on research evidence
Claude Code
$ npx -y skills add nWave-ai/nWave --skill nw-command-design-patterns --agent claude-code
Codex
$ npx skills add nWave-ai/nWave --skill nw-command-design-patterns -a codex -y
Cursor
$ npx skills add nWave-ai/nWave --skill nw-command-design-patterns -a cursor -y
Gemini CLI
$ npx skills add nWave-ai/nWave --skill nw-command-design-patterns -a gemini-cli -y
GitHub Copilot
$ npx skills add nWave-ai/nWave --skill nw-command-design-patterns -a github-copilot -y
OpenCode
$ npx skills add nWave-ai/nWave --skill nw-command-design-patterns -a opencode -y
Windsurf
$ npx skills add nWave-ai/nWave --skill nw-command-design-patterns -a windsurf -y
SKILL.md
nw-command-design-patterns.SKILL.mdname: nw-command-design-patterns
description: Best practices for command definition files - size targets, declarative template, anti-patterns, and canonical examples based on research evidence
user-invocable: false
disable-model-invocation: true
Command Design Patterns (composing core)
**Kind**: KNOWLEDGE (lean composing core). The command-design knowledge is decomposed into three one-trigger modules; this core holds the canonical examples and composes the modules by trigger. Load the module(s) for the question in play.
Composition
| Module | Load when the question is | Path | |--------|---------------------------|------| | `nw-command-design-patterns-classification` | what CATEGORY / what SIZE / what SHAPE (declarative template, WHAT-vs-HOW logic placement) | `~/.claude/skills/nw-command-design-patterns-classification/SKILL.md` | | `nw-command-design-patterns-reduction` | what is REDUCIBLE / what to REMOVE / how far to COMPRESS (duplication triangle, anti-patterns, compression rules) | `~/.claude/skills/nw-command-design-patterns-reduction/SKILL.md` | | `nw-command-design-patterns-authoring` | I am creating a NEW command — which FILES / what FORMAT (v2.8+ three-file install contract) | `~/.claude/skills/nw-command-design-patterns-authoring/SKILL.md` |
The three triggers partition the space: classification (size an existing command), reduction (trim a bloated one), authoring (lay out a new one). No overlap, no gap.
Canonical Examples
Example 1: Minimal Dispatcher (forge.md pattern, ~40 lines)
# DW-FORGE: Create Agent (V2)
**Wave**: CROSS_WAVE
**Agent**: Zeus (nw-agent-builder)
## Overview
Create a new agent using the research-validated v2 approach.
## Agent Invocation
@nw-agent-builder
Execute \*forge to create {agent-name} agent.
**Configuration:**
- agent_type: specialist | reviewer | orchestrator
## Success Criteria
- [ ] Agent definition under 400 lines
- [ ] Every `nw-ab-validation-checklist` item passes
- [ ] 3-5 canonical examples included
## Next Wave
**Handoff To**: Agent installation and deployment
**Deliverables**: Agent specification file + Skill filesExample 2: Medium Dispatcher with Context (~80 lines)
# DW-RESEARCH: Evidence-Driven Research
**Wave**: CROSS_WAVE
**Agent**: Nova (nw-researcher)
## Overview
Execute systematic evidence-based research with source verification.
## Orchestration: Trusted Source Config
Read .nwave/trusted-source-domains.yaml at orchestration time, embed inline in prompt.
## Agent Invocation
@nw-researcher
Execute \*research on {topic} [--embed-for={agent-name}].
**Configuration:**
- research_depth: detailed
- output_directory: docs/research/
## Success Criteria
- [ ] All sources from trusted domains
- [ ] Cross-reference performed (3+ sources per major claim)
- [ ] Research file created in docs/research/
## Next Wave
**Handoff To**: Invoking workflow
**Deliverables**: Research document + optional embed fileExample 3: Orchestrator (~200 lines)
Coordinates multiple phases without embedding agent knowledge:
# DW-DOCUMENT: Documentation Creation
**Wave**: CROSS_WAVE
**Agent**: Orchestrator (self)
## Overview
Create DIVIO-compliant documentation through research and writing phases.
## Phases
1. Research phase: @nw-researcher gathers domain knowledge
2. Writing phase: @nw-documentarist creates documentation
3. Review phase: @nw-reviewer validates quality
## Phase 1: Research
@nw-researcher - Execute \*research on {topic}
[Orchestrator reads and passes relevant context files]
## Phase 2: Writing
@nw-documentarist - Create {doc-type} documentation
[Orchestrator passes research output as context]
## Phase 3: Review
@nw-reviewer - Review documentation against DIVIO standards
[Orchestrator passes documentation for review]
## Success Criteria
[Per-phase and overall criteria]The orchestrator describes WHAT each phase does and WHO does it. The agents know HOW.
Read more
name: nw-command-design-patterns description: Best practices for command definition files - size targets, declarative template, anti-patterns, and canonical examples based on research evidence user-invocable: false disable-model-invocation: true
Command Design Patterns (composing core)
**Kind**: KNOWLEDGE (lean composing core). The command-design knowledge is decomposed into three one-trigger modules; this core holds the canonical examples and composes the modules by trigger. Load the module(s) for the question in play.
Composition
| Module | Load when the question is | Path | |--------|---------------------------|------| | `nw-command-design-patterns-classification` | what CATEGORY / what SIZE / what SHAPE (declarative template, WHAT-vs-HOW logic placement) | `~/.claude/skills/nw-command-design-patterns-classification/SKILL.md` | | `nw-command-design-patterns-reduction` | what is REDUCIBLE / what to REMOVE / how far to COMPRESS (duplication triangle, anti-patterns, compression rules) | `~/.claude/skills/nw-command-design-patterns-reduction/SKILL.md` | | `nw-command-design-patterns-authoring` | I am creating a NEW command — which FILES / what FORMAT (v2.8+ three-file install contract) | `~/.claude/skills/nw-command-design-patterns-authoring/SKILL.md` |
The three triggers partition the space: classification (size an existing command), reduction (trim a bloated one), authoring (lay out a new one). No overlap, no gap.
Canonical Examples
Example 1: Minimal Dispatcher (forge.md pattern, ~40 lines)
# DW-FORGE: Create Agent (V2)
**Wave**: CROSS_WAVE
**Agent**: Zeus (nw-agent-builder)
## Overview
Create a new agent using the research-validated v2 approach.
## Agent Invocation
@nw-agent-builder
Execute \*forge to create {agent-name} agent.
**Configuration:**
- agent_type: specialist | reviewer | orchestrator
## Success Criteria
- [ ] Agent definition under 400 lines
- [ ] Every `nw-ab-validation-checklist` item passes
- [ ] 3-5 canonical examples included
## Next Wave
**Handoff To**: Agent installation and deployment
**Deliverables**: Agent specification file + Skill filesExample 2: Medium Dispatcher with Context (~80 lines)
# DW-RESEARCH: Evidence-Driven Research
**Wave**: CROSS_WAVE
**Agent**: Nova (nw-researcher)
## Overview
Execute systematic evidence-based research with source verification.
## Orchestration: Trusted Source Config
Read .nwave/trusted-source-domains.yaml at orchestration time, embed inline in prompt.
## Agent Invocation
@nw-researcher
Execute \*research on {topic} [--embed-for={agent-name}].
**Configuration:**
- research_depth: detailed
- output_directory: docs/research/
## Success Criteria
- [ ] All sources from trusted domains
- [ ] Cross-reference performed (3+ sources per major claim)
- [ ] Research file created in docs/research/
## Next Wave
**Handoff To**: Invoking workflow
**Deliverables**: Research document + optional embed fileExample 3: Orchestrator (~200 lines)
Coordinates multiple phases without embedding agent knowledge:
# DW-DOCUMENT: Documentation Creation
**Wave**: CROSS_WAVE
**Agent**: Orchestrator (self)
## Overview
Create DIVIO-compliant documentation through research and writing phases.
## Phases
1. Research phase: @nw-researcher gathers domain knowledge
2. Writing phase: @nw-documentarist creates documentation
3. Review phase: @nw-reviewer validates quality
## Phase 1: Research
@nw-researcher - Execute \*research on {topic}
[Orchestrator reads and passes relevant context files]
## Phase 2: Writing
@nw-documentarist - Create {doc-type} documentation
[Orchestrator passes research output as context]
## Phase 3: Review
@nw-reviewer - Review documentation against DIVIO standards
[Orchestrator passes documentation for review]
## Success Criteria
[Per-phase and overall criteria]The orchestrator describes WHAT each phase does and WHO does it. The agents know HOW.
AI agents that guide you from idea to working code, with human judgment at every gate. nWave runs inside Claude Code. It breaks feature delivery into seven waves (discover, diverge, discuss, design, devops, distill, deliver).
Other skills on nwave.
More skills from other plugins.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
ask-matt
Ask which skill or flow fits your situation. A router over the skills in this repo.
Questions about nw-command-design-patterns.
- Which coding agents can use nw-command-design-patterns?
- nw-command-design-patterns installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

