workflow-builder
Skill0 starsChanged 4 months agoMITView on GitHub
Use to design, build, optimize, or audit a SAVED DYNAMIC WORKFLOW — a JS orchestration file in `.claude/workflows/` that fans work out to N parallel sub-agents and merges results. Triggers — "build a workflow", "save this as a workflow", "make this rerunnable as a workflow", "workflow-builder", "turn this fan-out into a saved workflow", "audit my workflows", or `/workflow-builder`. Sibling of `/skill-builder`, `/agent-builder`, `/routines-builder`, `/agents-team-builder`, `/plugin-builder`, `/servy-routine` — that family picks the mechanism; this one is the width-orchestration specialist. Runs a decision gate (just-ask / skill / sub-agent / agent team / /goal / workflow ladder), a discovery interview (deliverable, fan-out unit, scope bounds, verify pass, cost ceiling), validates against red gates, then writes `.claude/workflows/<name>.js` with the house meta/phase/agent skeleton. Build = cheap, fire = expensive — it never fires the workflow for you. Source knowledge: `references/claude-code-workflows.md`; harness API: `reference.md`.
9 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- async-artisan/workflow-buildertheir own version, first seen Nov 1, 2026
- justEstif/pi-shelftheir own version, first seen Oct 13, 2026
- shreeve1/Claude-Coworktheir own version, first seen Oct 13, 2026
- tydm2/workflow-builder-skilltheir own version, first seen Sep 6, 2026
- Hassaan146/claude-skillstheir own version, first seen Jul 25, 2026
- mahiunfiltered/claude-code-skillstheir own version, first seen Jul 8, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- GerardoRdz96/aios-starter-kit★ 361% same
Wrote their own version · 8
- Hassaan146/claude-skills★ 18same name
- Hussain-Elfalah/Agentic-Skills★ 2same name
- tydm2/workflow-builder-skill★ 2same name
- async-artisan/workflow-builder★ 1same name
- mahiunfiltered/claude-code-skills★ 1same name
- justEstif/pi-shelf★ 0same name
- LuckyCody/workflow-builder★ 0same name
- shreeve1/Claude-Cowork★ 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.
In this repository50 other files it gives its agents.
- aegisSkill
- agent-builderSkill
- agents-team-builderSkill
- ai-applySkill
- auditSkill
- bottleneckSkill
- buildSkill
- capability-radarSkill
- clay-leadsSkill
- cowatchSkill
- deepforkSkill
- design-blueprintSkill
- evalSkill
- fable-modeSkill
- financesSkill
- forgeSkill
- framework-builderSkill
- grill-meSkill
- hooks-builderSkill
- level-upSkill
- loops-builderSkill
- meeting-hudSkill
- multi-brainSkill
- nate-watchSkill
- onboardSkill
- plugin-builderSkill
- ponytailSkill
- presentSkill
- prompt-evalSkill
- radar-harvestSkill
- rag-forgeSkill
- rlsgateSkill
- rnd-loopSkill
- rndSkill
- roastSkill
- routines-builderSkill
- servy-routineSkill
- session-handoffSkill
- skill-builderSkill
- skill-harvestSkill
- sparkSkill
- storm-researchSkill
- studySkill
- talkSkill
- taste-skillSkill
- verify-loopSkill
- verify-specificsSkill
- wheel-of-lifeSkill
- workanaSkill
- workaround-builderSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Don't ask "what workflow?" yet.
- Very specific: line 64
Write .claude/workflows/<name>.js using the house skeleton (full API + patterns in reference.md):
- Distinctive: line 90
Add the workflow to the CLAUDE.md "Saved workflows" bullet (stay within the 2-line cap — extend the existing list, don't add a new bullet).
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/workflow-builder
Builds saved dynamic workflows: JS files in .claude/workflows/ that orchestrate N parallel sub-agents deterministically (loops, fan-out, schemas, adversarial verify) and surface in the skill list by meta.name. The harness API lives in reference.md — read it before writing any JS. Doctrine: references/claude-code-workflows.md.
Phase 0 — Source check (silent)
Confirm references/claude-code-workflows.md and this skill's reference.md exist. If either is missing, stop and tell Gera which source to re-ingest. Don't build from memory — the harness API drifts.
Phase 1 — Decision gate (mandatory)
Don't ask "what workflow?" yet. First confirm the task is workflow-shaped. One AskUserQuestion summarizing the task, options:
- Saved workflow — the task splits into MANY pieces that run independently at the same time (width), AND it will recur (rerunnable). Proceed.
- Script — deterministic, no-judgment work (parse, transform, hit an API). House pre-check: that's
scripts/, not agents at all. Stop. - Just-ask — one Claude can do it in-session without fan-out. No artifact. Stop.
- One-off workflow (don't save) — width-shaped but probably never again. Tell Gera to ask for a one-off dynamic workflow with explicit scope + caps and review the generated JS before approving the run (NOT blanket "ultracode" — that flips expensive defaults session-wide). Stop.
- Sub-agents / agent team — a few specialized roles, maybe talking to each other, not a wide fan-out. Refer to
/agents-team-builder(or plain sub-agents). Stop. /goalloop — depth not width; run until criteria met. Refer there. Stop.- Skill — a reusable recipe Gera runs interactively, no parallelism needed. Refer to
/skill-builder. Stop.
The test (from the doctrine): "Does this break into many pieces that can run independently of each other at the same time?" No → not a workflow.
Phase 2 — Preflight
- Workflows are model-agnostic harness features of recent Claude Code builds; verify by running
/workflows(lists runs) rather than trusting version strings — wrapper installs can report stale numbers. They survive the 2026-06-22 Fable cliff. - Save location is in-project
.claude/workflows/— never the global default dir. - Remind Gera of the cost story ONCE here: a careless workflow burned half a $200/mo subscription in one run. Mitigations are designed in Phase 3 (bounded scope, named deliverable, worker model choice).
Phase 3 — Discovery Interview
AskUserQuestion, one round at a time; skip rounds already answered. Stop when 95% confident.
Round A — Deliverable + recurrence. (1) What does a successful run RETURN (one concrete artifact/answer — "a report of X with fields Y,Z", never "insights")? (2) When does this rerun (what trigger/occasion)? (3) kebab-case name.
Round B — Fan-out shape. (1) What is the UNIT of parallel work (a file, a wiki page, a finding, a URL)? (2) How does the run DISCOVER the unit list (glob, grep, args, fixed list)? (3) Expected batch size per run (10? 100?) and the cap if discovery explodes. (4) Single-pass, or loop-until-dry (keep spawning finders until K rounds return nothing new)?
Round C — Quality + structure. (1) Do workers return prose or a SCHEMA (almost always schema — define the fields)? (2) Is there a VERIFY pass (adversarial refuters / diverse lenses) before results count? For anything reporting "findings", default YES. (3) Dedupe key across rounds/workers?
Round D — Cost. (1) Worker model — DEFAULT Haiku for mechanical scan/extract, Sonnet for judgment work; inheriting the session model requires an explicit reason (on Opus/Fable sessions every worker inherits that cost). Synthesis stays on the session model. (2) Hard bounds: max items, max rounds, budget-guarded loops. (3) args parameterization so scope can be narrowed per-run.
Confirmation round — echo back a fenced summary (name, deliverable, unit + discovery, phases, schemas, verify strategy, model + bounds) and get explicit yes before writing the file.
Phase 4 — Validation gates
| Gate | Check | If red |
| Width test | Units genuinely independent (no ordering between them) | Block → refer back to the ladder |
| Bounded scope | Explicit cap on items AND rounds (or budget guard) | Block — this is the half-a-subscription gate |
| Concrete deliverable | Return value is a named artifact/structure, not "summary"/"ideas" | Block |
| Schema'd workers | Workers returning data use schema | Yellow — warn, prose merges badly |
| Verify pass | Finding-type outputs have adversarial/diverse-lens verification | Yellow — warn (doctrine default is verify) |
| Dedupe key | Loop-until-dry designs dedupe vs ALL seen, not vs confirmed | Block if looping |
| No wall-clock randomness | No Date.now() / Math.random() / argless new Date() (breaks resume) | Block — pass timestamps via args |
Phase 5 — Generate the artifact
- Write
.claude/workflows/<name>.jsusing the house skeleton (full API + patterns in reference.md):export const meta = { name, description, whenToUse, phases }— pure literal;namematches filename;description+whenToUsebecome the surfaced skill text.phase()per stage; workers viaagent(prompt, {label, phase, schema, model});pipeline()by default,parallel()only for true barriers;.filter(Boolean)after every parallel; bounds + dedupe from Phase 3/4.
- Self-check:
node --check .claude/workflows/<name>.js(syntax only — never execute it). - Do NOT fire it. Build = cheap (text); fire = expensive (N sessions). Gera invokes it by name when he wants a run.
Phase 6 — Output to chat
## Saved workflow ready: <name>
File: `.claude/workflows/<name>.js` — invoke by name in any session ("run the <name> workflow"),
or narrow scope with args.
### Cost reality
One run ≈ <estimate> sub-agents on <model>. Bounds: <caps>. Workflows can eat a Pro/Max session
limit fast — fire deliberately, not habitually.
### First run
Run it once SUPERVISED on a small scope (args-narrowed) and check the deliverable shape before
trusting it on full scope.Phase 7 — Log + register
- Append to
references/log.md:## [<date>] create | Workflow — <name>+ one detail line. - Add the workflow to the CLAUDE.md "Saved workflows" bullet (stay within the 2-line cap — extend the existing list, don't add a new bullet).
- New harness facts discovered while building → update
reference.mdhere, not scattered notes.
Mode 2 — Optimize / Mode 3 — Audit
Optimize (existing workflow misbehaving): read the JS first — never optimize unread code. Common symptoms → fixes: results vanish silently → missing .filter(Boolean); runs forever → no dry-counter/budget guard or dedupe vs wrong set; merge step starved → barrier parallel() where pipeline() belongs; bland findings → workers lack schemas or verify pass; cost spikes → no caps, workers on too-big a model.
Audit checklist (per file in .claude/workflows/): [ ] meta pure-literal, name==filename [ ] bounded (caps/budget) [ ] schemas on data-returning workers [ ] verify pass on findings [ ] dedupe key correct [ ] no Date.now/Math.random [ ] .filter(Boolean) after parallels [ ] description/whenToUse accurate for surfacing [ ] still matches its doctrine entry in CLAUDE.md.
Notes / discipline
- Don't fire it for him. Ever. Same rule as agents-team-builder.
- The prompt IS the workflow — workers' prompts carry all context; they inherit zero conversation history.
- Workers on the smallest model that survives the task; synthesis on the session model.
- Skill stays under 500 lines; harness detail lives in
reference.md. - Review of a built workflow file routes to Codex (No-Self-Review Law).
Related
references/claude-code-workflows.md— doctrine + ladder.- reference.md — harness JS API, verified shapes, house patterns.
.claude/workflows/exhaustive-review.js,wiki-audit.js— living examples.- Sibling builders:
/skill-builder,/agent-builder,/routines-builder,/agents-team-builder,/plugin-builder,/servy-routine.
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.

