Skip to main content

Workflow Visualizer

See what a Claude Code workflow script runs before you run it: every agent, what fans out, what waits, and where each phase starts. Edit the script and the diagram follows. Then export it as a Codex workflow.

Agent calls
4
agent() call sites. A loop or fan-out runs one many times.
Fan-outs
2
How many items each one runs is known only when it runs.
Phases
3
Progress groups in Claude Code.
Models named
haikusonnetopus
1 call on the session’s model.
Unreadable options
0
Calls whose options are set only when it runs, so the diagram can’t show them.

Checks

Ready to run

No errors or warnings.

Diagram

Top to bottom in the order it runs. Select an agent to find its line in the script.

Workflow

review-changed-files

Review each changed file for correctness bugs, try to disprove every finding, and write one ranked summary

When to use it: Before opening a pull request that touches more than a handful of files

  1. Code Lines 13–49

    • const FILES = {…}
    • const FINDINGS = {…}
    • const VERDICT = {…}
  2. Phase Line 51

    Collect

    Find the files that changed

    1. Branch Line 57

      • If !changed || changed.files.length === 0

        1. Log: No changed files to review. Line 58

        2. Returns Line 59

          { reviewed: 0, failed: 0, findings: [] }

      Otherwise, it carries on below.

  3. Phase Line 62

    Review

    One reviewer per file, then a skeptic per finding

    1. Each item in changed.files, no barrier between stages Line 63

      An item moves to the next stage as soon as it’s through this one. A stage that throws drops that item to null. Saved as reviews.

      1. Stage 1 (file)

      2. Stage 2 (review, file)

        1. × each item in review?.findings ?? [] Line 73

          One copy per item, all at once, then it waits for every one. How many is known only when it runs, and an item that throws comes back as null.

          For each finding

          1. Code Line 79

            • .then((verdict) => ({ file, ...finding, verdict }))
    2. Code Lines 84–85

      • const failed = reviews.filter((review) => review === null).length
      • const confirmed = reviews.flat().filter((finding) => finding?.verdict?.real)
    3. Log: ${confirmed.length} confirmed findings in ${changed.files.length} files (${failed} reviews failed) Line 86

  4. Phase Line 88

    Summarize

    Rank and merge what survived

    1. Returns Line 94

      { reviewed: changed.files.length, failed, findings: confirmed, summary }

Script

A workflow starts with export const meta = {…}, then calls agent(), parallel(), pipeline(), and phase() with top-level await.

Run it on Codex

Turn the script into one JavaScript file that runs the same body with Codex agents, then run it with node, passing args as JSON. The file’s header says what to install first and what works differently.

Loading the converter…

Load a workflow

A .js workflow script replaces the one above. Drop a whole workflows folder to pick one from it.

Drop a workflow script or folder here

Notes

  • The diagram reads the script without running it. How many items a fan-out gets, which way a branch goes, and any option computed at run time show as the code that decides them.
  • A helper function that calls agent() is drawn wherever it’s called. One that calls itself is drawn once. Plain code with no agents in it folds into a quiet “Code” row.
  • The counts are by call site, so an agent() inside a helper called twice counts once. A label built from a template, such as `Review ${file}`, isn’t counted as an unreadable option.
  • The checks cover what Claude Code refuses: a meta block that isn’t a plain literal or isn’t first, Date.now(), Math.random(), new Date(), and import(), and agent() options it doesn’t accept. They also flag phase() titles that don’t match meta.phases, and a fan-out’s results passed through .filter(Boolean), which hides the items that failed.
  • Files are read in your browser. Nothing is uploaded.