nWave-ai/nWave / nWave/skills/nw-ab-optimize-command
nw-ab-optimize-command
UnverifiedPROCEDURE — optimize a bloated command file to a lean declarative definition (forge.md pattern). Trigger: a command file over its size target with reducible content.
nw-ab-optimize-command (PROCEDURE)
Kind: PROCEDURE | One job: optimize one command file | One trigger: a command file exceeds its size target (dispatchers 40-150L, orchestrators 100-300L) or carries reducible duplication.
Deterministic step-sequence (run every time, in order)
Run these steps in order:
- CLASSIFY — Apply
nw-command-design-patterns, supplied by the selected command route's generated trigger under the canonical Skill addressing procedure. Classify dispatcher | orchestrator. Gate: classification chosen. - MEASURE + FLAG — Apply
nw-command-optimization-workflowsupplied through that same generated route, without a second load directive.wc -l; flag reducible content (the duplication triangle: command-to-command, command-to-agent, command-to-self). Gate: before-count + reducible-list recorded. - EXTRACT — Remove boilerplate, move domain knowledge to the owning agent/skill, delete dead/deprecated references. Gate: extractions listed.
- RESTRUCTURE — Rewrite as a declarative dispatcher/orchestrator (forge.md 40-line gold standard for dispatchers). Gate: declarative structure, size within target.
- VALIDATE — Confirm the command keeps its invocation contract + success criteria; numbered-task-list workflow, checkbox success criteria. Gate: structure confirmed.
- REPORT — before/after line counts. Gate: both numbers reported.
Composition
- COMPOSES (KNOWLEDGE):
nw-command-design-patterns,nw-command-optimization-workflow. - Note: this procedure restructures a command DEFINITION; it does not execute the command.
Success Criteria
- Command classified, reducible content flagged
- Size within target (dispatcher 40-150L / orchestrator 100-300L)
- Before/after line counts reported; invocation contract preserved
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 195k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |