# Create Workflow Command

Create a workflow command that orchestrates multi-step execution through sub-agents...

- Repository: https://github.com/NeoLabHQ/context-engineering-kit (1797 stars)
- Category: AI and agents
- License: GPL-3.0
- Last updated: 2026-08-26
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add NeoLabHQ/context-engineering-kit --skill create-workflow-command -g -a claude-code -y`
Codex: `npx skills add NeoLabHQ/context-engineering-kit --skill create-workflow-command -g -a codex -y`
Cursor: `npx skills add NeoLabHQ/context-engineering-kit --skill create-workflow-command -g -a cursor -y`
Gemini CLI: `npx skills add NeoLabHQ/context-engineering-kit --skill create-workflow-command -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add NeoLabHQ/context-engineering-kit`

## Description

Create a workflow command that orchestrates multi-step execution through sub-agents with file-based task prompts

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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

```text
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:

The rest: https://github.com/NeoLabHQ/context-engineering-kit/blob/HEAD/antigravity/skills/create-workflow-command/SKILL.md
