
Workflow Builder
FreeCreate and manage multi-agent workflows for Claude Code.
Free · Opens the source repo
What Workflow Builder does
Workflow Builder allows developers to design and implement deterministic multi-agent workflows for Claude Code's Workflow tool. This skill is particularly useful for orchestrating sub-agents in various configurations, such as fan-out, pipelines, or loops. By generating JavaScript files that control the flow of these agents, users can automate complex, repeatable tasks across fresh-context agents while ensuring that the main session remains clean and resumable.
Before creating any workflow, it's essential to conduct an intake session to clarify the user's needs. This involves asking targeted questions about the task to be automated, the structure of the workflow, and the expected outcomes. The intake process is supported by a recommendation engine that helps transform vague inputs into concrete proposals, ensuring users are guided through the workflow design process effectively.
Once the workflow shape is confirmed, users can scaffold a starter script, edit it to fit their requirements, validate it for compliance with the established rules, and finally run it. The skill emphasizes the importance of maintaining determinism and avoiding non-deterministic elements, ensuring that workflows can be resumed reliably if interrupted. With built-in validation tools and templates, Workflow Builder streamlines the process of creating complex workflows, making it an essential tool for developers looking to leverage Claude Code's capabilities.
When to use it
Use Workflow Builder when you need to automate multi-step tasks involving multiple agents and require reproducibility and control over the workflow execution.
When not to use it
This skill is not suitable for one-off tasks or simple agent interactions, where direct use of Claude would be more efficient.
What you can build with it
Automating PR Reviews
Create a workflow that triages open pull requests by orchestrating multiple sub-agents to review and categorize them efficiently.
Running Data Processing Pipelines
Design a workflow that automates data processing tasks by utilizing a series of agents that handle different stages of data transformation.
Managing User Onboarding
Implement a multi-step user onboarding process that involves various agents to guide new users through setup and training.
How to install Workflow Builder
View source1. Install with the skills CLI
npx skills add alirezarezvani/claude-skills/workflow-builder --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by alirezarezvaniWorkflow Builder
Author runnable workflow scripts for Claude Code's Workflow tool: deterministic multi-agent orchestration files (.js) that fan work out to fresh-context sub-agents under plain JavaScript control flow. Only leaf agent() calls spend tokens, so the main session stays clean and the whole run is resumable.
ALWAYS start every session with intake (non-negotiable)
Before proposing or writing any workflow, run the intake. Do not skip to code.
-
Ask what kind of workflow they want. Use this opening question set:
- What repeatable, multi-step task do you want to automate?
- What is the one unit of work a single sub-agent does once?
- How many units — a known list, or discovered by looping?
- Do later steps need all prior results at once, or can each item flow on its own?
- Does any step need structured data back (a verdict, a list, scores)?
- Roughly how many tokens / how deep should it go?
-
If the user is vague, do NOT stall. Run the recommendation engine to turn whatever you have into 1-2 concrete proposals, then present them with the reasoning:
python scripts/workflow_intake.py --task "their description" \ --units unknown --stages unknown --needs-all unknown --structured unknownThe engine returns a recommended topology (fan-out / pipeline / loop / barrier / judge-panel), model picks, a budget guard, and a one-line rationale per choice. Present those as "Here's what I'd build and why" — never ask the user to re-answer questions they already half-answered.
-
Confirm the shape with the user (topology + phases + parallel-vs-pipeline) before writing the file. This is the only approval gate.
See references/decision_and_intake_guide.md for the full question framework, the vague-input playbook, and worked recommendation examples.
Decide if a workflow is even the right tool
| Scenario | Use |
|---|---|
| Single sub-agent, one task | plain Agent tool |
| Reusable procedure, Claude picks steps dynamically | a Skill |
| Many sub-agents in a fixed topology, deterministic + resumable | Workflow ✓ |
Workflows earn their cost when work is parallel or multi-stage, must be reproducible, long enough to fail halfway (so resume matters), or benefits from isolating each step in its own context window. For one-off tasks, just use Claude directly.
Build → validate → run loop
- Scaffold a starter from the confirmed topology:
python scripts/scaffold_workflow.py --topology pipeline --name pr-triage \ --description "Triage open PRs" > .claude/workflows/pr-triage.js - Edit the file:
metablock first (pure literal, first statement), then the async body using the injected globals —agent(),pipeline(),parallel(),phase(),log(),budget,args,workflow(). Full surface in references/api_reference.md; copy-paste shapes in references/orchestration_patterns.md. - Validate before running — catches the parser-fatal mistakes:
python scripts/validate_workflow.py .claude/workflows/pr-triage.js - Run it: enable the feature with
export CLAUDE_CODE_WORKFLOWS=1, save the file under.claude/workflows/, then use/workflowsto launch and watch it live. Press P to pause/resume, X to skip a sub-agent. Failed agents retry automatically.
Hard rules (validator enforces these)
metais a pure literal and the first statement — no variables, spreads, template strings, or function calls inside it.- No non-determinism:
Date.now(),Math.random(), arglessnew Date()break resume — pass timestamps viaargs. - No filesystem / Node APIs (
require,fs,process, network) in the orchestrator — that work belongs insideagent()prompts. parallel()takes thunks (() => agent(...)), not bare promises. Default topipeline()unless a stage needs the whole prior result set.- Guard every open-ended loop with a counter or
budget.remaining()check — unguarded loops hit the 1000-agent cap. - Filter skipped/failed agents:
results.filter(Boolean).
Tooling
scripts/workflow_intake.py— intake recommendation engine (topology + model + budget + rationale from vague input).scripts/validate_workflow.py— stdlib linter for the rules above; PASS / WARN / FAIL with line numbers.scripts/scaffold_workflow.py— generate a starter.jsfor any topology.assets/templates/— fan-out, pipeline, loop-until-budget starters.assets/examples/— a complete runnable workflow.
All scripts run with --sample (no args) and --help.
Frequently asked questions about Workflow Builder
Similar skills
Agent Skill Stack
Assemble compatible AI Agent Skills for workflows.
AI Team Orchestration
Streamline multi-agent development workflows.
Advisor Orchestrator Worker
Efficiently manage complex tasks with multiple AI models.
Agent Orchestrator
Automate multi-agent workflows with zero manual intervention.
Agent Governance
Implement safety and trust controls for AI agents.
Microsoft Foundry
End-to-end management for Microsoft Foundry agents.
