nw-command-optimization-workflow

Convert oversized command files into lean declarative definitions.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/StudentCristian/nWave-github --skill nw-command-optimization-workflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nw-command-optimization-workflow
Source: https://github.com/StudentCristian/nWave-github/tree/main/.github/skills/nw-command-optimization-workflow
Command: npx skills add https://github.com/StudentCristian/nWave-github --skill nw-command-optimization-workflow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convert oversized command files (500-2400 lines) into lean declarative definitions (40-300 lines) by removing duplication, extracting domain knowledge to agents, and adopting the forge.md pattern.

Core Features & Use Cases

  • Phase-based workflow covering Analyze, Extract, Restructure, Validate, and Measure to systematically reduce command size and complexity.
  • Extracts shared boilerplate and moves domain knowledge to agents, enabling reusable, composable command definitions.
  • Use Case: Refactor a large command repository into modular, testable commands with clear agent invocations and measurable size reductions.

Quick Start

Feed an oversized command file (500–2400 lines) into this workflow to generate a lean declarative definition (40–300 lines) and improve maintainability.

Frequently Asked Questions about nw-command-optimization-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor oversized command files into lean declarative definitions?

To refactor oversized command files into lean declarative definitions, use a multi-phase workflow covering Analyze, Extract, Restructure, Validate, and Measure to systematically remove duplication and extract domain knowledge to agents.

What is the best way to modularize a large command repository?

The best way to modularize a large command repository is by adopting the forge.md pattern, which extracts shared boilerplate and moves domain knowledge to agents to enable reusable, composable command definitions with clear agent invocations.

When do I need to extract domain knowledge to agents from command files?

You need to extract domain knowledge to agents when command files reach 500-2400 lines and require modularization, orchestration, and declarative templates to reduce command size and complexity for improved maintainability.

Can I reduce command file size from 2000 lines to under 300 lines?

Yes, you can reduce command file size from 2000 lines to under 300 lines by feeding the oversized command file into this workflow to generate a lean declarative definition and improve maintainability.

How does the command optimization workflow validate refactored declarative templates?

The command optimization workflow validates refactored declarative templates through a defined Validate phase, ensuring modular, testable commands maintain clear agent invocations and produce measurable size reductions during the orchestration process.

What are the limitations of refactoring commands into declarative definitions?

Refactoring commands into declarative definitions is limited to large repositories where oversized command files require modularization, orchestration, and declarative templates to achieve measurable size reductions and improve maintainability through a multi-phase, auditable workflow.