
create-workflow-command
Create a workflow command that orchestrates multi-step execution through sub-agents with file-based task prompts
- Installs
- 1.2K
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/neolabhq/context-engineering-kit --skill create-workflow-command- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads create-workflow-command automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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:
Read ${CLAUDE_PLUGIN_ROOT}/tasks/step-1-workflow-name.md and execute.
Sub-agent will use Read tool to fetch the file content.
Implementation Process
Step 1: Gather Requirements
Ask user (if not provided):
- Workflow name: kebab-case identifier (e.g.,
feature-implementation) - Description: What the workflow accomplishes
- Steps: List of discrete steps with:
- Step name
- Step goal
- Required tools
- Expected output
- Execution mode: Sequential or parallel steps
- Agent type:
general-purposeor custom agent
Step 2: Create Directory Structure
# Create tasks directory (if it doesn't exist)
mkdir -p ${CLAUDE_PLUGIN_ROOT}/tasks
# Optional: Create agents directory (if using custom agents)
mkdir -p ${CLAUDE_PLUGIN_ROOT}/agents
Note: All task files (both workflow-specific steps and shared context) are placed directly in tasks/ without subdirectories.
Step 3: Create Task Files
For each step, create a task file with this structure:
# Step N: <Step Name>
## Context
You are executing step N of the <workflow-name> workflow.
## Goal
<Clear, specific goal for this step>
## Input
<What this step receives from previous steps or user>
## Instructions
1. <Specific action>
2. <Specific action>
3. <Specific action>
## Constraints
- <Limitation or boundary>
- <What NOT to do>
## Expected Output
<What to return to orchestrator>
## Success Criteria
- [ ] <Measurable outcome>
- [ ] <Measurable outcome>
Step 4: Create Orchestrator Command
Create the main command file with this pattern:
---
description: <Workflow description>
argument-hint: <Required arguments>
allowed-tools: Task, Read
model: sonnet
---
# <Workflow Name>
## User Input
\`\`\`text
$ARGUMENTS
\`\`\`
## Workflow Execution
### Step 1: <Step Name>
Launch general-purpose agent:
- **Description**: "<3-5 word summary>"
- **Prompt**:
\`\`\`
Read ${CLAUDE_PLUGIN_ROOT}/tasks/step-1-<workflow>-<name>.md and execute.
Context:
- TARGET: $1
- MODE: $2
\`\`\`
**Capture**: <What to extract from result>
### Step 2: <Step Name>
Launch general-purpose agent:
- **Description**: "<3-5 word summary>"
- **Prompt**:
\`\`\`
Read ${CLAUDE_PLUGIN_ROOT}/tasks/step-2-<workflow>-<name>.md and execute.
Context from Step 1:
- <Key data from previous step>
\`\`\`
### Step 3: <Step Name>
[Continue pattern...]
## Completion
Summarize workflow results:
1. <What was accomplished>
2. <Key outputs>
3. <Next steps if any>
Frontmatter Options
| Field | Purpose | Default |
|---|---|---|
description | Brief description of workflow purpose | Required |
argument-hint | Expected arguments description | None |
allowed-tools | Tools the command can use | Inherits from conversation |
model | Specific Claude model (sonnet, opus, haiku) | Inherits from conversation |
Model selection:
haiku- Fast, efficient for simple workflowssonnet- Balanced performance (recommended default)opus- Maximum capability for complex orchestration
Execution Patterns
Pattern A: Sequential Steps (Default)
Each step depends on previous step's output:
### Step 1: Analyze
Launch agent → Get analysis result
### Step 2: Plan (uses Step 1 result)
Launch agent with Step 1 context → Get plan
### Step 3: Execute (uses Step 2 result)
Launch agent with Step 2 context → Complete
Pattern B: Parallel Independent Steps
Steps can run concurrently:
### Analysis Phase (Parallel)
Launch 3 agents simultaneously:
1. Agent 1: Security analysis → Read ${CLAUDE_PLUGIN_ROOT}/tasks/step-1a-security.md
2. Agent 2: Performance analysis → Read ${CLAUDE_PLUGIN_ROOT}/tasks/step-1b-performance.md
3. Agent 3: Code quality analysis → Read ${CLAUDE_PLUGIN_ROOT}/tasks/step-1c-quality.md
**Wait for all**, then consolidate results.
### Synthesis Phase
Launch agent with all analysis results...
Pattern C: Stateful Multi-Step (Resume)
When steps need shared context:
### Step 1: Initialize
Launch agent, **capture agent_id**
### Step 2: Continue (same context)
Resume agent using agent_id:
- **resume**: <agent_id from Step 1>
- **prompt**: "Proceed to phase 2: <additional instructions>"
Example: Feature Implementation Workflow
Orchestrator Command
---
description: Execute feature implementation through research, planning, and coding phases
argument-hint: [feature-description]
allowed-tools: Task, Read, TodoWrite
model: sonnet
---
# Implement Feature
## User Input
\`\`\`text
$ARGUMENTS
\`\`\`
Create TodoWrite with workflow steps.
## Phase 1: Research
Launch general-purpose agent:
- **Description**: "Research feature requirements"
- **Prompt**:
\`\`\`
Read ${CLAUDE_PLUGIN_ROOT}/tasks/step-1-feature-impl-research.md
Feature: $ARGUMENTS
\`\`\`
**Extract**: Key findings, constraints, existing patterns
## Phase 2: Architecture
Launch general-purpose agent:
- **Description**: "Design feature architecture"
- **Prompt**:
\`\`\`
Read ${CLAUDE_PLUGIN_ROOT}/tasks/step-2-feature-impl-architecture.md
Feature: $ARGUMENTS
Research findings: <summary from Phase 1>
\`\`\`
**Extract**: File structure, components, interfaces
## Phase 3: Implementation
Launch developer agent:
- **Description**: "Implement feature code"
- **Prompt**:
\`\`\`
Read ${CLAUDE_PLUGIN_ROOT}/tasks/step-3-feature-impl-implement.md
Architecture: <summary from Phase 2>
\`\`\`
## Completion
Mark todos complete. Report:
1. Files created/modified
2. Tests added
3. Remaining work
Task File Example (step-1-feature-impl-research.md)
# Step 1: Feature Research
## Context
You are the research phase of a feature implementation workflow.
## Goal
Thoroughly understand the feature requirements and existing codebase context before any implementation begins.
## Instructions
1. **Parse Feature Request**
- Extract core requirements
- Identify acceptance criteria
- Note any constraints mentioned
2. **Codebase Analysis**
- Search for similar existing features
- Identify relevant patterns and conventions
- Find reusable components/utilities
3. **Dependency Check**
- What existing code will this feature interact with?
- Are there breaking change risks?
- What tests exist for related functionality?
4. **Gap Analysis**
- What's missing from the request?
- What clarifications might be needed?
- What edge cases should be considered?
## Constraints
- Do NOT write any implementation code
- Do NOT modify any files
- Focus purely on research and analysis
## Expected Output
Return a structured research summary:
\`\`\`markdown
## Feature Understanding
- Core requirement: <summary>
- Acceptance criteria: <list>
## Codebase Context
- Similar features: <list with file paths>
- Patterns to follow: <list>
- Reusable code: <list with file paths>
## Dependencies
- Files affected: <list>
- Tests to consider: <list>
## Open Questions
- <Question 1>
- <Question 2>
## Recommendation
<Brief recommendation for architecture phase>
\`\`\`
## Success Criteria
- [ ] Feature requirements clearly articulated
- [ ] Relevant existing code identified
- [ ] No implementation attempted
- [ ] Clear handoff to architecture phase
Known Limitations
| Limitation | Impact | Workaround |
|---|---|---|
| No nested sub-agents | Sub-agents can't spawn Task tool | Keep all orchestration in main command |
| No skill auto-loading | Sub-agents don't trigger skills | Pass explicit file paths or inline context |
| Fresh context per agent | Each dispatch starts empty | Use resume pattern OR pass summaries |
| File read latency | Extra tool call per step | Acceptable trade-off for context savings |
Validation Checklist
Before finalizing workflow command:
- Each step has clear, specific goal
- Task files are self-contained (sub-agent doesn't need external context)
- File paths use
${CLAUDE_PLUGIN_ROOT}for portability - Context passed between steps is minimal (summaries, not full data)
- Orchestrator command stays lean (<100 tokens per step dispatch)
- Error handling defined for step failures
- Success criteria measurable for each step
Create the Workflow
Based on user input, create:
-
Directories:
${CLAUDE_PLUGIN_ROOT}/tasks/- All task files directly here${CLAUDE_PLUGIN_ROOT}/agents/- (Optional) Custom agent definitions
-
Task files: Create in
tasks/directory with naming patternstep-N-<workflow>-<name>.md- Example:
step-1-feature-impl-research.md - Example:
step-2-feature-impl-architecture.md - Shared context:
common-context.mddirectly intasks/
- Example:
-
Orchestrator command: Lean dispatch logic in
commands/<workflow-name>.md -
Custom agents (Optional): If workflow needs specialized agent behavior in
agents/ -
Update plugin.json: Add command to plugin manifest if needed
After creation, suggest testing with /customaize-agent:test-prompt command.
FAQ
What does the create-workflow-command skill do?
Create a workflow command that orchestrates multi-step execution through sub-agents with file-based task prompts
How do I install create-workflow-command?
Run npx skills add https://github.com/neolabhq/context-engineering-kit --skill create-workflow-command in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/create-workflow-command/ (personal) or .claude/skills/create-workflow-command/ (project).
Which AI agents can use create-workflow-command?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is create-workflow-command safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains create-workflow-command?
It is published by neolabhq in neolabhq/context-engineering-kit. It has 1,152 recorded installs.
More from neolabhq/context-engineering-kit
prompt-engineering
neolabhq/context-engineering-kit
Use this skill when you writing commands, hooks, skills for Agent, or prompts for sub agents or any other LLM interaction, including optimizing prompts, improving LLM outputs, or designing production prompt templates.
thought-based-reasoning
neolabhq/context-engineering-kit
Use when tackling complex reasoning tasks requiring step-by-step logic, multi-step arithmetic, commonsense reasoning, symbolic manipulation, or problems where simple prompting fails - provides comprehensive guide to Chain-of-Thought and related prompting techniques (Zero-shot CoT, Self-Consistency, Tree of Thoughts, Least-to-Most, ReAct, PAL, Reflexion) with templates, decision matrices, and research-backed patterns
context-engineering
neolabhq/context-engineering-kit
Understand the components, mechanics, and constraints of context in agent systems. Use when writing, editing, or optimizing commands, skills, or sub-agents prompts.
reflect
neolabhq/context-engineering-kit
Reflect on previus response and output, based on Self-refinement framework for iterative improvement with complexity triage and verification
write-concisely
neolabhq/context-engineering-kit
Apply writing rules to any documentation that humans will read. Makes your writing clearer, stronger, and more professional.
kaizen
neolabhq/context-engineering-kit
Use when Code implementation and refactoring, architecturing or designing systems, process and workflow improvements, error handling and validation. Provide tehniquest to avoid over-engineering and apply iterative improvements.
Popular productivity & automation skills
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
lark-doc
open.feishu.cn
飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。
lark-base
open.feishu.cn
飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。
lark-drive
open.feishu.cn
飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。
lark-shared
open.feishu.cn
Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.
lark-im
open.feishu.cn
飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。