Workflow Builder skill for Claude

Use when writing or running a Claude Code Workflow-tool script (.js in .claude/workflows/) for fan-out, pipeline, loop or judge-panel sub-agents. Gathers intent with workflow_intake.py, scaffolds with scaffold_workflow.py and validates with validate_workflow.py.

Workflow Builder SKILL.md

The full skill file from alirezarezvani/claude-skills (MIT).

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:

    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 for the full question framework, the vague-input playbook, and worked recommendation examples.

Decide if a workflow is even the right tool

ScenarioUse
Single sub-agent, one taskplain Agent tool
Reusable procedure, Claude picks steps dynamicallya Skill
Many sub-agents in a fixed topology, deterministic + resumableWorkflow ✓

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:
    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; copy-paste shapes in references/orchestration_patterns.md.
  3. Validate before running — catches the parser-fatal mistakes:
    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.

How to install Workflow Builder

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit alirezarezvani/claude-skills/engineering/workflow-builder/skills/workflow-builder#main ~/.claude/skills/workflow-builder

Codex

npx degit alirezarezvani/claude-skills/engineering/workflow-builder/skills/workflow-builder#main ~/.codex/skills/workflow-builder

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Workflow Builder skill do?

Use when writing or running a Claude Code Workflow-tool script (.js in .claude/workflows/) for fan-out, pipeline, loop or judge-panel sub-agents. Gathers intent with workflow_intake.py, scaffolds with scaffold_workflow.py and validates with validate_workflow.py.

+How do I install Workflow Builder in Claude Code?

Copy the skill folder into ~/.claude/skills/workflow-builder, for example with "npx degit alirezarezvani/claude-skills/engineering/workflow-builder/skills/workflow-builder#main ~/.claude/skills/workflow-builder". Claude Code loads it automatically and uses it when a task matches.

+Does Workflow Builder work with ChatGPT or Codex?

Yes. Workflow Builder uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/workflow-builder. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Workflow Builder free?

Workflow Builder is published on GitHub by alirezarezvani under the MIT license, which allows free use.

Related writing & editing skills

  1. Humanizer

    Rewrite AI-sounding text so it reads like the writer without changing what it says.

    blader/humanizer★ 70k
  2. Stop Slop

    Remove AI writing patterns from prose. Use when drafting, editing, or reviewing text to eliminate predictable AI tells.

    hardikpandya/stop-slop★ 19k
  3. Writing Skills

    Use when creating new skills, editing existing skills, or verifying skills work before deployment

    obra/superpowers★ 319k
  4. Write A Skill

    Create new agent skills with proper structure, progressive disclosure, and bundled resources.

    alirezarezvani/claude-skills★ 30k
  5. Harness Writing

    Official

    Designs and improves fuzzing harnesses for C/C++ and Rust. Covers mapping raw bytes onto a target API, generating structured inputs,…

    trailofbits/skills★ 8.3k
  6. Writing Lean Proofs

    Official

    Writes and reviews structured Lean 4 proofs and designs Lean libraries following Mathlib conventions.

    trailofbits/skills★ 8.3k
  7. Workers Best Practices

    Official

    Cloudflare Workers best practices for production applications. Use when writing, reviewing, or configuring Workers.

    cloudflare/skills★ 3.4k
  8. Cold Email Writer

    Write personalized cold outreach emails to hiring managers and founders — specific, human, not a pitch deck

    Paramchoudhary/ResumeSkills★ 3.2k
  9. Portfolio Case Study Writer

    Transform resume bullets into detailed portfolio case studies

    Paramchoudhary/ResumeSkills★ 3.2k

See all writing & editing skills →

More skills from alirezarezvani

  1. Wrap Up

    Use when closing out a launched managed agent ('wrap up', 'what do I own now').

    alirezarezvani/claude-skills★ 30k
  2. X Twitter Growth

    Use for growing on X/Twitter: tweets, threads, profile audit, competitors or posting plan.

    alirezarezvani/claude-skills★ 30k

All skills by alirezarezvani →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.