
Create Workflow Command
Create a workflow command that orchestrates multi-step execution through sub-agents...
Install
npx skills add NeoLabHQ/context-engineering-kit --skill create-workflow-command -g -a claude-code -y- Repository
- NeoLabHQ/context-engineering-kit1.8k
- Category
- AI and agents
- Updated
- 2mo ago
- License
- GPL-3.0
- Context cost
- Mediumabout 2,775 tokens
- Runs scripts
- No, instructions only
What it does
Create a workflow command that orchestrates multi-step execution through sub-agents with file-based task prompts
Create Workflow Command
Create a command that orchestrates multi-step workflows by dispatching sub-agents with task-specific instructions stored in separate files.
User Input
Workflow Name: $1
Description: $2
Architecture Overview
Workflow commands solve the context bloat problem: instead of embedding detailed step instructions in the main command (polluting orchestrator context), store them in separate task files that sub-agents read on-demand.
plugins/<plugin-name>/
├── commands/
│ └── <workflow>.md # Lean orchestrator (~50-100 tokens per step)
├── agents/ # Optional: reusable executor agents
│ └── step-executor.md # Custom agent with specific tools/behavior
└── tasks/ # All task instructions directly here
├── step-1-<name>.md # Full instructions (~500+ tokens each)
├── step-2-<name>.md
├── step-3-<name>.md
└── common-context.md # Shared context across workflows
Key Principles
1. Context Isolation
Each sub-agent gets its own isolated context window. The main orchestrator stays lean while sub-agents load detailed instructions from files.
| Component | Context Cost | Purpose |
|---|---|---|
| Orchestrator command | ~50-100 tokens/step | Dispatch and coordinate |
| Task file | ~500+ tokens | Detailed step instructions |
| Sub-agent base | ~294 tokens | System prompt overhead |
2. Sub-Agent Capabilities
Sub-agents spawned via Task tool:
| Capability | Available | Notes |
|---|---|---|
| Read tool | ✅ Yes | Can read any file |
| Write tool | ✅ Yes | If not restricted |
| Grep/Glob | ✅ Yes | For code search |
| Skills loading | ❌ No | Skills don't auto-load in sub-agents |
| Spawn sub-agents | ❌ No | Cannot nest Task tool |
| Resume context | ✅ Yes | Via resume parameter |
3. File Reference Pattern
Use ${CLAUDE_PLUGIN_ROOT} for portable paths within plugin:

