Skip to main content
skill Claude Code

workflow-builder — Claude Code skill: what it does, how to install

Creates deterministic multi-agent workflow scripts in JavaScript for Claude Code. Useful for coordinating sub-agents in fresh contexts with budget limits and resume support.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add alirezarezvani/claude-skills
/plugin install workflow-builder@claude-code-skills
Open on GitHub

What workflow-builder does

This skill authors orchestration scripts (.js) under .claude/workflows/ for the Claude Code Workflow tool. Instead of packing everything into a single prompt session, it splits steps across fresh-context sub-agents. Only individual agent() calls spend tokens, keeping the main context clean and runs resumable.

Three helper scripts handle the lifecycle. workflow_intake.py recommends a topology (pipeline, fan-out, loop, judge panel), scaffold_workflow.py generates starter code, and validate_workflow.py lints the output. The validator enforces strict constraints: the meta block must be a pure literal at the top, Node APIs like fs and non-deterministic calls like Math.random() are forbidden, and open-ended loops must check budget limits before hitting the 1000-agent ceiling.

For simple one-off tasks, a standard Claude session is enough. Choose this workflow approach when a multi-stage task repeats often and needs reproducibility after partial failures.

What it helps with

  • Scaffold multi-agent workflow files for the Claude Code Workflow engine
  • Verify workflow scripts against parsing and determinism rules
  • Configure isolated sub-agent pipelines with token budget controls
  • Structure fan-out and judge-panel patterns across fresh context windows

Example prompts for the agent

  • Build a pipeline workflow to triage and summarize open PRs
  • Create a fan-out workflow script in .claude/workflows/ for parallel linting
  • Run the validator on .claude/workflows/pr-triage.js

How to install workflow-builder

1Plugin marketplace

/plugin marketplace add alirezarezvani/claude-skills
/plugin install workflow-builder@claude-code-skills

This installs the whole workflow-builder plugin with all its skills

2Skills CLI (Vercel)

npx skills add alirezarezvani/claude-skills --skill workflow-builder -a claude-code

3Manually: put the files in place

~/.claude/skills/workflow-builder/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/workflow-builder/

From the same set349

The whole set →
engineering-skills Alireza Rezvani An engineering skill index for Claude Code that helps you select one specialist SKILL.md for the task at hand. It covers architecture, testing, DevOps, and data work. Claude Code 2,387installs finance-skills Alireza Rezvani Routes ambiguous finance prompts to the right bundled skill: financial-analyst, saas-metrics-coach, or month-end-close. Claude Code 2,312installs marketing-skills Alireza Rezvani A directory and router for marketing skills in Claude Code. It picks the right specialist skill for SEO, content, CRO, channels, and related tasks. Claude Code 2,264installs business-growth-skills Alireza Rezvani Routes growth and revenue prompts to the right specialized skill across customer success, sales engineering, RevOps, and proposals in Claude Code. Claude Code 2,189installs engineering-advanced-skills Alireza Rezvani An index of 37 engineering skills for architecture, automation, reliability, and platform work. Use it when a project needs task-specific engineering workflows. Claude Code 2,019installs product-skills Alireza Rezvani Product work orchestrator for Claude Code. Routes queries across 16 domain lanes and validates discovery trees with deterministic scripts. Claude Code 1,994installs pm-skills Alireza Rezvani Routes project-delivery requests across 8 PM sub-skills for Jira, Confluence, sprints, reporting, and team communication. Useful for controlled delivery work. Claude Code 1,975installs senior-backend Alireza Rezvani Scaffolds backend APIs, detects database bottlenecks, and runs load tests. Useful when designing Express routes, optimizing PostgreSQL, or preparing for production. Claude Code 1,674installs

Similar

setup-my-iq official github Builds and updates a personal context portfolio across structured markdown files. It helps configure developer profiles and team setups for AI coding sessions. GitHub Copilot 35installs vardoger-analyze official github Analyzes your local Copilot CLI history and writes tailored instructions. It helps when you want the CLI assistant to remember your coding style automatically. GitHub Copilot 33installs steno-mode official github Compresses assistant responses by ~40% tokens using shorthand and symbols while preserving exact code, identifiers, and paths. GitHub Copilot 32installs bench-read official github Reads shared bench artifacts and summarizes their state for the operator. Use it when desks exchange findings through workspace files. GitHub Copilot 28installs find-skills vercel-labs Discovers and installs agent skills from skills.sh directly inside your coding assistant. Handy when you need domain-specific workflows for a project. Claude Code CX Codex Cursor +1 4,000,000installs grill-me Matt Pocock grill-me interviews you about a plan or design to expose gaps and sharpen decisions. Use it before implementation starts. Claude Code 1,424,476installs grill-with-docs Matt Pocock This skill interviews you about a plan or design and creates ADRs and a glossary along the way. Use it when decisions need sharper definition. Claude Code 1,219,756installs handoff Matt Pocock Creates a handoff document from the current conversation so another agent can continue the work. Use it when a task moves to a new session or agent. Claude Code 1,038,491installs

Questions about workflow-builder

How do I install workflow-builder in Claude Code?

Add the repository via /plugin marketplace add alirezarezvani/claude-skills and install it with /plugin install workflow-builder@claude-code-skills. Alternatively, run npx skills add alirezarezvani/claude-skills --skill workflow-builder -a claude-code.

What does workflow-builder do?

It creates and validates JavaScript workflow scripts for Claude Code's /workflows command. It coordinates sub-agents using patterns like fan-out, pipeline, or loops while isolating token consumption.

What rules does validate_workflow.py enforce?

It requires meta to be a pure literal at the start of the script and bans Node APIs like fs or require. It also blocks non-deterministic calls like Date.now() and requires bounds on loops to avoid the 1000-agent limit.

Source text

SKILL.md · MIT
---
name: workflow-builder
description: Design and write deterministic multi-agent workflow scripts (.js files in .claude/workflows/) for Claude Code's Workflow tool. Use when a user wants to build, create, author, scaffold, or run a custom Claude Code workflow, orchestrate sub-agents (fan-out, pipeline, loop, judge-panel), or automate a repeatable multi-step task across fresh-context agents.
license: MIT
metadata:
  inspired_by: "https://github.com/ray-amjad/claude-code-workflow-creator (Ray Amjad)"
  targets: "Claude Code Workflow tool (CLAUDE_CODE_WORKFLOWS=1, /workflows)"
  version: 1.0.0
---

# Workflow 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.

1. **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?

2. **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*:
   ```bash
   python scripts/workflow_intake.py --task "their description" \
     --units unknown --stages unknown --needs-all unknown --structured unknown
   ```
   The 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.

3. **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](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

1. **Scaffold** a starter from the confirmed topology:
   ```bash
   python scripts/scaffold_workflow.py --topology pipeline --name pr-triage \
     --description "Triage open PRs" > .claude/workflows/pr-triage.js
   ```
2. **Edit** the file: `meta` block 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](references/api_reference.md); copy-paste shapes in [references/orchestration_patterns.md](references/orchestration_patterns.md).
3. **Validate** before running — catches the parser-fatal mistakes:
   ```bash
   python scripts/validate_workflow.py .claude/workflows/pr-triage.js
   ```
4. **Run** it: enable the feature with `export CLAUDE_CODE_WORKFLOWS=1`, save the file under `.claude/workflows/`, then use `/workflows` to 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)

- `meta` is a **pure literal** and the **first statement** — no variables, spreads, template strings, or function calls inside it.
- **No non-determinism:** `Date.now()`, `Math.random()`, argless `new Date()` break resume — pass timestamps via `args`.
- **No filesystem / Node APIs** (`require`, `fs`, `process`, network) in the orchestrator — that work belongs *inside* `agent()` prompts.
- `parallel()` takes **thunks** (`() => agent(...)`), not bare promises. Default to `pipeline()` 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 `.js` for 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`.

© Alireza Rezvani · MIT · alirezarezvani/claude-skills

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor