agentleFS
MrMarudiMrMarudi/claude-workflow-planner/SKILL.md

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

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. vredin/vredin-CC-Harness★ 9same name
    2. 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
  1. Distinctive:

    Read these three files before saying anything to the user:

    line 22
  2. Distinctive:

    Do not output anything yet.

    line 30
  3. Distinctive:

    Ask the user this question and wait for their answer:

    line 34
  4. Distinctive:

    Check each failure mode against the task:

    line 44
  5. Distinctive:

    If NONE of the above four checks apply — task is trivial, single-pass, <10 items, clear right answer, fits one context window:

    line 52
  6. Distinctive:

    Stop. Do not continue to Phase 4.

    line 56
  7. Distinctive:

    Ask follow-up questions only if a required plan field cannot be inferred.

    line 66
  8. Distinctive:

    Stop condition is missing → "What does 'done' look like — when can the workflow stop?"

    line 69
  9. Very specific:

    Read references/model-routing.md and references/token-budget.md.

    line 73
  10. Distinctive:

    After emitting the plan, ask:

    line 136
  11. Very specific:

    Read references/prompt-gallery.md for relevant example prompts

    line 144
  12. Distinctive:

    Workflow tool not available: If the Workflow tool is absent from allowed-tools, report this to the user and deliver the plan only — they …

    line 168
  13. Distinctive:

    User skips the intake question: If the user provides a task description without waiting for the intake question (e.g., they describe the …

    line 170
  14. Distinctive:

    All four checks are ambiguous: If the task description is too vague to assess failure modes, ask for more detail before attempting triage: …

    line 172

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

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

  1. references/failure-modes.md
  2. references/patterns.md
  3. references/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

  1. [Primary pattern] — [one-line rationale]
  2. [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 roleModelReason
[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):

  1. Read references/prompt-gallery.md for relevant example prompts
  2. Build the complete, runnable workflow script — replace all placeholder prompts in the outline with real prompts specific to the user's task
  3. Invoke the Workflow tool 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.