workflow-planner
Skill0 starsChanged 5 months agoMITView on GitHub
Plan and define Claude Code multi-agent workflows. Use when the user wants to build a workflow, asks "what pattern should I use", says "ultracode", or has a task that risks agentic laziness, self-preferential bias, goal drift, or heterogeneous input routing. Diagnoses failure modes, selects and composes patterns from the 6 core workflow patterns, produces a structured plan with model routing and token budget, then invokes the Workflow tool on approval. Not for simple single-step tasks that fit in one context window.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- vredin/vredin-CC-Harnesstheir own version, first seen Nov 1, 2026
- zhouey314-cloud/ai-agent-skillstheir own version, first seen Oct 20, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- vredin/vredin-CC-Harness★ 9same name
- zhouey314-cloud/ai-agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 12 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Read these three files before saying anything to the user:
- Distinctive: line 30
Do not output anything yet.
- Distinctive: line 34
Ask the user this question and wait for their answer:
- Distinctive: line 44
Check each failure mode against the task:
- Distinctive: line 52
If NONE of the above four checks apply — task is trivial, single-pass, <10 items, clear right answer, fits one context window:
- Distinctive: line 56
Stop. Do not continue to Phase 4.
- Distinctive: line 66
Ask follow-up questions only if a required plan field cannot be inferred.
- Distinctive: line 69
Stop condition is missing → "What does 'done' look like — when can the workflow stop?"
- Very specific: line 73
Read references/model-routing.md and references/token-budget.md.
- Distinctive: line 136
After emitting the plan, ask:
- Very specific: line 144
Read references/prompt-gallery.md for relevant example prompts
- Distinctive: line 168
Workflow tool not available: If the Workflow tool is absent from allowed-tools, report this to the user and deliver the plan only — they …
- Distinctive: line 170
User skips the intake question: If the user provides a task description without waiting for the intake question (e.g., they describe the …
- Distinctive: line 172
All four checks are ambiguous: If the task description is too vague to assess failure modes, ask for more detail before attempting triage: …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Workflow Planner
Plan and define multi-agent Claude Code workflows using the 6 core patterns.
Phase 1 — Startup (silent)
Read these three files before saying anything to the user:
references/failure-modes.mdreferences/patterns.mdreferences/pattern-selection.md
(Paths are relative to this skill's directory — the same folder that contains this SKILL.md file.)
Do not output anything yet.
Phase 2 — Intake
Ask the user this question and wait for their answer:
"Describe the task you want to build a workflow for. Include what it needs to accomplish, roughly how many items or steps are involved, and what 'done' looks like — the more detail the better."
Phase 3 — Triage
Using the references loaded in Phase 1, silently analyze the task description:
3a. Detect failure modes
Check each failure mode against the task:
- Agentic laziness: Does the task have 10+ items, an open-ended scope, or unbounded work-list?
- Self-preferential bias: Does the task involve an agent checking its own output, or any self-evaluation step?
- Goal drift: Does the task involve multiple turns, invariants ("don't touch X"), or work that will span compaction?
- Heterogeneous input / creative selection: Does the task involve routing different types of inputs differently (→ Classify-and-Act), or generating many candidate options to pick the best from (→ Generate-and-Filter or Tournament)?
3b. Early exit check
If NONE of the above four checks apply — task is trivial, single-pass, <10 items, clear right answer, fits one context window:
Output exactly: "A single-agent approach is sufficient here — no workflow needed. [One sentence explaining why no failure mode applies.]"
Stop. Do not continue to Phase 4.
3c. Map patterns
Using the pattern-selection reference loaded in Phase 1, map detected failure modes to patterns. Identify:
- Primary pattern (addresses the dominant failure mode)
- Secondary pattern if composition is needed
3d. Adaptive follow-ups
Ask follow-up questions only if a required plan field cannot be inferred. Maximum 3 questions. Ask one at a time, in this priority order:
- Scale is missing → "How many items / files / records does this involve?"
- Quality bar is unclear → "Is adversarial verification required, or is a sampling approach acceptable?"
- Stop condition is missing → "What does 'done' look like — when can the workflow stop?"
3e. Load plan details
Read references/model-routing.md and references/token-budget.md.
Phase 4 — Generate Plan
Emit the workflow plan in this format:
Workflow Plan: [descriptive task name]
Failure Modes Detected
- or [ ] Agentic laziness — [reason: detected / not detected]
- or [ ] Self-preferential bias — [reason: detected / not detected]
- or [ ] Goal drift — [reason: detected / not detected]
Recommended Patterns
- [Primary pattern] — [one-line rationale]
- [Secondary pattern] — [one-line rationale] (omit this line entirely if no secondary pattern is needed)
Composition Rationale
[2–4 sentences: how the patterns interlock, which wraps which, where the barrier or pipeline boundary is]
Model Routing
| Agent role | Model | Reason |
| [role] | [Haiku / Sonnet / Opus] | [one-line reason] |
Stop Condition
[Explicit, measurable condition — e.g. "zero items remaining in queue", "no new findings in 2 consecutive rounds"]
Token Budget Estimate
[Range from token-budget.md] — [one-line justification]
Workflow Script Outline
(Adapt the structure below to the recommended patterns — the pipeline/verifier shape shown is for Fan-Out + Adversarial; use parallel() for fan-out-only, a while loop for Loop Until Done, pairwise agent calls for Tournament.)
export const meta = {
name: '[kebab-case-name]',
description: '[one-line description of what this workflow does]',
phases: [
{ title: '[Phase name]', detail: '[what this phase does]' },
],
}
// Define output schemas matching your task's shape — e.g.:
// const RESULT_SCHEMA = { type: 'object', properties: { id: { type: 'string' }, result: { type: 'string' } }, required: ['id', 'result'] }
// const VERDICT_SCHEMA = { type: 'object', properties: { isReal: { type: 'boolean' }, reason: { type: 'string' } }, required: ['isReal', 'reason'] }
phase('[Phase name]')
// [comment: describe what this phase does]
const results = await pipeline(
items,
item => agent(`[Worker prompt for: ${item}]`, { label: `work:${item}`, phase: '[Phase name]', schema: RESULT_SCHEMA }),
result => agent(`[Verifier prompt]`, { label: `verify:${result.id}`, phase: '[Phase name]', schema: VERDICT_SCHEMA })
)
const confirmed = results.flat().filter(Boolean).filter(r => r.verdict?.isReal)
return { confirmed }After emitting the plan, ask:
"Ready to run this workflow? Reply yes to proceed, or describe any changes to make first."
Phase 5 — Approval Gate
On approval (yes / go / run / proceed):
- Read
references/prompt-gallery.mdfor relevant example prompts - Build the complete, runnable workflow script — replace all placeholder prompts in the outline with real prompts specific to the user's task
- Invoke the
Workflowtool with the complete script
On change request:
Revise the plan, re-emit the Phase 4 output, then ask the approval question again.
Examples
Triggers correctly — workflow warranted:
- "Use a workflow to review all 80 pull requests from last quarter and tag them by type, then identify the top 20 most impactful" → agentic laziness (80 PRs) + self-preferential bias (tagging accuracy)
- "I need to rename the User model to Account everywhere in the codebase" → agentic laziness (unknown scope) + goal drift (invariants across many files)
- "Run a tournament to pick the best name for our new CLI tool" → heterogeneous/creative selection → Generate-and-Filter + Tournament
- "ultracode audit the entire test suite for flakiness" → ultracode trigger word guarantees workflow path
- "Go through my last 50 sessions and mine them for CLAUDE.md rules" → agentic laziness (50 sessions) + self-preferential bias (judging own corrections)
Skips correctly — single-agent sufficient:
- "Write a function that reverses a string" → trivial, no failure mode applies
- "Fix the typo in this comment" → single-pass, clear right answer
- "Explain how the auth module works" → fits one context window, no self-evaluation step
Troubleshooting
Workflow tool not available: If the Workflow tool is absent from allowed-tools, report this to the user and deliver the plan only — they can manually invoke the workflow from the script outline.
User skips the intake question: If the user provides a task description without waiting for the intake question (e.g., they describe the task in the same message that invokes the skill), treat that description as the Phase 2 answer and proceed to Phase 3 directly.
All four checks are ambiguous: If the task description is too vague to assess failure modes, ask for more detail before attempting triage: "Can you tell me roughly how many items this involves and whether you need the results verified independently?"
User requests a pattern not in the library: Map their description to the closest of the 6 core patterns and explain the mapping. Do not invent new patterns.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

