Skills

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
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.

ComponentContext CostPurpose
Orchestrator command~50-100 tokens/stepDispatch and coordinate
Task file~500+ tokensDetailed step instructions
Sub-agent base~294 tokensSystem prompt overhead

2. Sub-Agent Capabilities

Sub-agents spawned via Task tool:

CapabilityAvailableNotes
Read tool✅ YesCan read any file
Write tool✅ YesIf not restricted
Grep/Glob✅ YesFor code search
Skills loading❌ NoSkills don't auto-load in sub-agents
Spawn sub-agents❌ NoCannot nest Task tool
Resume context✅ YesVia resume parameter

3. File Reference Pattern

Use ${CLAUDE_PLUGIN_ROOT} for portable paths within plugin:

Read the whole SKILL.md on GitHub

More in AI and agents