Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Design and create an orchestration agent that autonomously executes a multi-skill workflow. Use when asked to create an orchestrator, build a pipeline agent, design a workflow agent, automate a skill sequence, or produce an ORCHESTRATOR_CREATOR.md.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 217% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 114% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 79% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 807% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 420% | 0% |
Given a set of skills and a workflow describing how they connect, produce an orchestration agent as a single flat markdown file — agents/{agent-name}.md — that can autonomously execute the workflow end-to-end by authoring dynamic workflows that spawn a subagent per skill, reading their output files, making decisions, and managing feedback loops. The agent never does the skill's job. It invokes, inspects, decides, and proceeds.
Agent creation follows four phases: map, design, write, and validate.
Analyze the skills and workflow to build a complete picture. For each skill, identify:
| Property | Question to answer | |---|---| | Inputs | What files does this skill read? User-provided or from earlier skills? | | Output | What file does it produce? Exact filename? | | Dependencies | Which skills must complete first? | | Parallelism | Can multiple instances run concurrently? Under what conditions? | | Success criteria | How do you know the output is good? Verdicts, section checks, test results? | | Failure modes | What goes wrong? What does bad output look like? | | Feedback target | If problems surface, which earlier skill gets re-run? |
Draw the workflow as a directed graph (ASCII art). Mark feedback loops explicitly. This becomes the skeleton of the agent's decision logic.
Example:
ANALYZE.md → DESIGN.md → BUILD.md → TEST.md → DEPLOY.md
^ ^
| |
TEST.md TEST.md
(design (build
flaws) bugs)Divide the workflow into phases:
parallel() workflow (a barrier over an array of () => agent(...) thunks). Common pattern: generating the same document type for multiple independent items.Rules of thumb:
Before writing, make four key design decisions:
1. File organization. Design a directory structure for all output:
{output_dir}/{item_id}/{SKILL_OUTPUT.md}{output_dir}/
{phase_1_output}.md # Top-level outputs
{item_id}/
{skill_1_output}.md # Per-item outputs
{skill_2_output}.md
BLOCKED.md # Created if item hits retry limit
{item_id}/
...2. Decision tree. For every skill output, write a decision table:
After SKILL_X produces OUTPUT_X.md:
1. Read OUTPUT_X.md
2. Check: file exists and is non-empty?
- No → retry once, then mark failed
3. Check: Open Questions with unresolved items?
- Yes → resolve by editing, then proceed or re-run
4. Check: skill-specific success criteria?
- Success → proceed to SKILL_Y
- Failure type A → go back to SKILL_W with context
- Failure type B → go back to SKILL_V with contextBe explicit about what success looks like (a verdict, an empty issues section, all tests passing), what failure looks like, and where to route each failure type.
3. Feedback loop bounds. Every feedback loop needs a limit:
4. Prompt patterns. Design the prompt template for each skill invocation. Every prompt needs three things:
/{SKILL_NAME}.md {Input references — file paths to read} {Additional context — feedback from previous phases, constraints} Write the output to {output_path}.Keep prompts focused. Reference file paths rather than embedding content — the skill agent has filesystem access. Embed inline only when content is short (<50 lines), is feedback that doesn't exist as a file, or is a specific excerpt from a larger file.
For feedback loops, include failure context inline using XML tags on the same line:
/{SKILL_NAME}.md The previous implementation was reviewed and these issues were found: <issues>{paste from the review output}</issues> Read the plan from {path}. Fix the issues and write to {output_path}.Create a single flat file at agents/{agent-name}.md with YAML frontmatter and system prompt. Agents are single markdown files directly in the agents/ directory — the filename (minus .md) becomes the agent name. There is no subdirectory and no separate references/ folder. All reference material (the dynamic-workflow invocation patterns) must be inlined directly in the agent's body.
Read references/dynamic-workflows.md from this skill's directory — it contains the invocation patterns to inline into the agent.
Frontmatter:
yaml--- name: {agent-name} description: {Action phrase}. Use when asked to "{trigger 1}", "{trigger 2}", "{trigger 3}". model: opus ---
name — lowercase, hyphenated identifier. Must match the filename: agents/{name}.mddescription — action verb + 3-5 trigger phrases. This is how the plugin matches user intent.model — opus for orchestration agents (strong reasoning for decisions); use opus[1m] when the orchestrator juggles many artifacts.System prompt structure:
The body follows this structure. Every section is important — omitting one produces an incomplete agent.
markdown# {Agent Name} — Autonomous Skill Execution Agent {One paragraph: who this agent is, what it does, what it never does.} --- ## Workflow Overview {ASCII diagram of the full workflow with feedback loops.} --- ## File Organization {Directory structure. Exact paths.} --- ## How to Invoke Skills {Dynamic-workflow patterns — inlined from `references/dynamic-workflows.md`: the `meta` block, `agent()` for one skill, `parallel()`/`pipeline()` for fan-out (with `pipeline()`'s gated-use caveat), single-workflow patterns for mechanical stretches (loop-until-pass, fan-out-then-verify), regeneration/resume, and failure handling.} --- ## Phase N: {Phase Name} {For each phase: - Goal (one line) - Exact `agent()` / `parallel()` / `pipeline()` call - Output inspection (what to check, what success/failure looks like) - Decision logic (proceed, retry, go back) - Open question resolution} --- ## Feedback Loop Rules {When to go back to which phase. How to include context. Retry limits. What happens when blocked.} --- ## Open Question Resolution {Universal process for resolving open questions.} --- ## Output Inspection Checklist {Universal checks plus per-skill checks.} --- ## Error Handling {Process failures, missing output, infinite loop detection.} --- ## Complete Execution Flow {Full algorithm as pseudocode — the definitive reference.} --- ## What You Never Do {Hard constraints the orchestrator must never violate.}
Include these universal patterns in every agent:
Workflow invocation (one skill):
javascriptexport const meta = { name: '<step>', description: '<what it does>' } await agent(`/SKILL_NAME.md Read <inputs>. Write the output to <output_path>.`)
Skill tool — begin with /SKILL_NAME.md and keep the instructions on the same line; use the plugin-qualified id if a bare name doesn't resolve.agent()/parallel()/pipeline() calls and add one sentence telling the reader to wrap each in a Workflow script that begins with a meta block (as above).Fan-out (parallel siblings): wrap the per-item () => agent(...) thunks in one parallel() — a barrier that returns results with failures as null (.filter(Boolean)). Use pipeline() only for a gate-free multi-stage stretch. Pass every item; the runtime caps concurrency at min(16, cores−2).
Mechanical stretches (loop-until-pass, fan-out-then-verify): when a stretch has a mechanical pass/fail check — a lint/test-fix loop, or fanning out then adversarially verifying each finding — codify it inside a single workflow instead of an orchestrator turn. Reserve this for success criteria checkable without the orchestrator's judgment; anything needing the orchestrator to read and decide stays its own workflow.
Output inspection (after every workflow):
agent() onceOpen question resolution:
Retry limits:
BLOCKED.md, skip to next itemRegeneration and resume:
agent() with corrected context pointed at the same output path — subagents are always fresh.Error handling:
| Error | Action | |---|---| | agent() returns null / artifact missing | Retries were exhausted. Re-author that single agent() in a fresh workflow with sharper context. Context too long → summarize inputs / reduce read set. | | Output file at wrong path | Glob for *.md nearby. Found elsewhere → move. Not found → re-author with explicit path. | | Infinite loop (3 cycles same two phases) | Create BLOCKED.md, move on. |
Verify the agent file is at the correct location:
agents/
{agent-name}.md # Single flat file, no subdirectoryVerify that the dynamic-workflow invocation patterns are fully inlined in the "How to Invoke Skills" section — the agent must be self-contained with no external reference dependencies.
Then validate the agent against the quality checklist.
Testing recommendations (not mandatory, but strongly recommended):
BLOCKED.md after 3 attempts.The skill produces a single flat file at agents/{agent-name}.md. The filename (minus .md) is the agent name. No subdirectory, no separate reference files — everything is inlined.
markdown--- name: {agent-name} description: {Action phrase}. Use when asked to "{trigger 1}", "{trigger 2}", "{trigger 3}". model: opus --- # {Agent Name} — Autonomous Skill Execution Agent {Identity paragraph: who, what it does, what it never does.} --- ## Workflow Overview {ASCII workflow diagram with feedback loops} --- ## File Organization {Directory structure with exact paths} --- ## How to Invoke Skills {Dynamic-workflow patterns — inlined from `references/dynamic-workflows.md`: the `meta` block, `agent()` for one skill, `parallel()`/`pipeline()` for fan-out (with `pipeline()`'s gated-use caveat), single-workflow patterns for mechanical stretches (loop-until-pass, fan-out-then-verify), regeneration/resume, and failure handling.} --- ## Phase 1: {Name} {Goal, invocation, inspection, decision logic} (Repeat for each phase.) --- ## Feedback Loop Rules {Triggers, targets, context to carry, retry limits, blocked behavior} --- ## Open Question Resolution {Universal resolution process} --- ## Output Inspection Checklist {Universal checks + per-skill checks} --- ## Error Handling {Process failures, missing output, infinite loops} --- ## Complete Execution Flow {Full pseudocode algorithm} --- ## What You Never Do {Hard constraints}
agents/{name}.md)references/dynamic-workflows.md into the agent/SKILL_CREATOR.md) for thatBefore the agent is ready, verify:
agents/{name}.md — no subdirectory, no separate reference files.md) matches the name field in frontmattername, description (action verb + 3-5 triggers) and modelagent() / parallel() / pipeline())null/missing artifact), wrong output path, infinite loopsOther measured skills in the registry, with their headline benchmark lift.