/nw-ab-examples
KNOWLEDGE — canonical worked examples for agent creation, migration, and command optimization. Reference for the relevant procedures; no sequence.
Claude Code
$ npx -y skills add nWave-ai/nWave --skill nw-ab-examples --agent claude-code
Codex
$ npx skills add nWave-ai/nWave --skill nw-ab-examples -a codex -y
Cursor
$ npx skills add nWave-ai/nWave --skill nw-ab-examples -a cursor -y
Gemini CLI
$ npx skills add nWave-ai/nWave --skill nw-ab-examples -a gemini-cli -y
GitHub Copilot
$ npx skills add nWave-ai/nWave --skill nw-ab-examples -a github-copilot -y
OpenCode
$ npx skills add nWave-ai/nWave --skill nw-ab-examples -a opencode -y
Windsurf
$ npx skills add nWave-ai/nWave --skill nw-ab-examples -a windsurf -y
SKILL.md
nw-ab-examples.SKILL.mdname: nw-ab-examples
description: "KNOWLEDGE — canonical worked examples for agent creation, migration, and command optimization. Reference for the relevant procedures; no sequence."
user-invocable: false
nw-ab-examples (KNOWLEDGE)
**Kind**: KNOWLEDGE (reference). Loaded on demand by the procedure whose example it carries. No forced sequence.
Example 1: Good V2 Agent (Specialist)
User requests agent for database migration planning.
---
name: nw-db-migrator
description: Use for database migration planning. Designs migration strategies with rollback safety.
model: inherit
tools: Read, Glob, Grep, Bash
maxTurns: 40
skills:
- nw-deployment-strategies
---
Core definition: ~150 lines (role, 5 divergent principles, 4-phase workflow, 4 critical rules, 3 examples). Domain knowledge extracted to the `nw-deployment-strategies` skill (rollback planning, ~200 lines). Total always-loaded: ~150 lines. With skill: ~350 lines.
Example 2: Bad Monolithic Agent
2,400-line spec with embedded YAML config, 17 commands, 7-layer enterprise security framework, aggressive language.
Action: Apply migration path: 1. Extract YAML config -> frontmatter (5 lines) 2. Remove 5 "production frameworks" duplicating platform features (~400 lines saved) 3. Remove default behavior specifications (~500 lines saved) 4. Extract domain knowledge to 2-3 Skills (~800 lines moved) 5. Replace aggressive language with direct statements 6. Result: ~250 line core + 3 Skills
Example 3: Skill Extraction Decision
Agent at 380 lines — within 400-line target. Extract Skills?
Decision tree:
- Functional and passing validation? Yes -> Ship as-is
- Clearly separable knowledge domains (>100 lines each)? Yes -> Extract for reusability
- Will grow as domain knowledge expands? Yes -> Extract now to prevent bloat
- Knowledge useful to other agents? Yes -> Extract as shared skill
Default: under 400 lines and passing validation -> do not over-engineer with premature extraction.
Example 4: Command Optimization (Dispatcher)
User asks to optimize execute.md (1,051 lines). It's a dispatcher command.
Analysis: ~35% reducible (300 lines JSON state examples contradicting v2.0 format|200 lines duplicated parameter parsing|100 lines agent registry|deprecated references).
Action: 1. Remove JSON state examples (v2.0 uses pipe-delimited, not JSON) -- 300 lines saved 2. Extract parameter parsing to shared preamble -- 200 lines saved 3. Remove agent registry duplication -- 100 lines saved 4. Move TDD phase details to nw-software-crafter agent -- 200 lines saved 5. Restructure as declarative dispatcher using forge.md pattern 6. Result: ~120 lines (agent invocation + context extraction pattern + success criteria)
Example 5: Command Optimization (Orchestrator)
develop.md at 2,394 lines embeds 6 sub-command workflows inline.
Action: Replace embedded workflows with phase references. Keep orchestration logic (phase sequencing, resume handling). Remove all embedded agent prompt templates. Target: 200-300 lines of pure orchestration.
Read more
name: nw-ab-examples description: "KNOWLEDGE — canonical worked examples for agent creation, migration, and command optimization. Reference for the relevant procedures; no sequence." user-invocable: false
nw-ab-examples (KNOWLEDGE)
**Kind**: KNOWLEDGE (reference). Loaded on demand by the procedure whose example it carries. No forced sequence.
Example 1: Good V2 Agent (Specialist)
User requests agent for database migration planning.
--- name: nw-db-migrator description: Use for database migration planning. Designs migration strategies with rollback safety. model: inherit tools: Read, Glob, Grep, Bash maxTurns: 40 skills: - nw-deployment-strategies ---
Core definition: ~150 lines (role, 5 divergent principles, 4-phase workflow, 4 critical rules, 3 examples). Domain knowledge extracted to the `nw-deployment-strategies` skill (rollback planning, ~200 lines). Total always-loaded: ~150 lines. With skill: ~350 lines.
Example 2: Bad Monolithic Agent
2,400-line spec with embedded YAML config, 17 commands, 7-layer enterprise security framework, aggressive language.
Action: Apply migration path: 1. Extract YAML config -> frontmatter (5 lines) 2. Remove 5 "production frameworks" duplicating platform features (~400 lines saved) 3. Remove default behavior specifications (~500 lines saved) 4. Extract domain knowledge to 2-3 Skills (~800 lines moved) 5. Replace aggressive language with direct statements 6. Result: ~250 line core + 3 Skills
Example 3: Skill Extraction Decision
Agent at 380 lines — within 400-line target. Extract Skills?
Decision tree:
- Functional and passing validation? Yes -> Ship as-is
- Clearly separable knowledge domains (>100 lines each)? Yes -> Extract for reusability
- Will grow as domain knowledge expands? Yes -> Extract now to prevent bloat
- Knowledge useful to other agents? Yes -> Extract as shared skill
Default: under 400 lines and passing validation -> do not over-engineer with premature extraction.
Example 4: Command Optimization (Dispatcher)
User asks to optimize execute.md (1,051 lines). It's a dispatcher command.
Analysis: ~35% reducible (300 lines JSON state examples contradicting v2.0 format|200 lines duplicated parameter parsing|100 lines agent registry|deprecated references).
Action: 1. Remove JSON state examples (v2.0 uses pipe-delimited, not JSON) -- 300 lines saved 2. Extract parameter parsing to shared preamble -- 200 lines saved 3. Remove agent registry duplication -- 100 lines saved 4. Move TDD phase details to nw-software-crafter agent -- 200 lines saved 5. Restructure as declarative dispatcher using forge.md pattern 6. Result: ~120 lines (agent invocation + context extraction pattern + success criteria)
Example 5: Command Optimization (Orchestrator)
develop.md at 2,394 lines embeds 6 sub-command workflows inline.
Action: Replace embedded workflows with phase references. Keep orchestration logic (phase sequencing, resume handling). Remove all embedded agent prompt templates. Target: 200-300 lines of pure orchestration.
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-ab-examples.
- Which coding agents can use nw-ab-examples?
- nw-ab-examples 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.

