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
-
Code Lines 13–49
const FILES = {…}const FINDINGS = {…}const VERDICT = {…}
-
Phase Line 51
Collect
Find the files that changed
-
Branch Line 57
If
!changed || changed.files.length === 0-
Log: No changed files to review. Line 58
-
Returns Line 59
{ reviewed: 0, failed: 0, findings: [] }
-
Otherwise, it carries on below.
-
Phase Line 62
Review
One reviewer per file, then a skeptic per finding
-
Each item in
changed.files, no barrier between stages Line 63An item moves to the next stage as soon as it’s through this one. A stage that throws drops that item to
null. Saved asreviews.-
Stage 1
(file) -
Stage 2
(review, file)-
× each item in
review?.findings ?? []Line 73One 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-
Code Line 79
.then((verdict) => ({ file, ...finding, verdict }))
-
-
-
Code Lines 84–85
const failed = reviews.filter((review) => review === null).lengthconst confirmed = reviews.flat().filter((finding) => finding?.verdict?.real)
-
Log:
${confirmed.length}confirmed findings in${changed.files.length}files (${failed}reviews failed) Line 86
-
-
Phase Line 88
Summarize
Rank and merge what survived
-
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. Alabelbuilt from a template, such as`Review ${file}`, isn’t counted as an unreadable option. - The checks cover what Claude Code refuses: a
metablock that isn’t a plain literal or isn’t first,Date.now(),Math.random(),new Date(), andimport(), andagent()options it doesn’t accept. They also flagphase()titles that don’t matchmeta.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.