claude-workflows-viz

I was interested visualizing execution graphs that involves many agents for some time, but couldn't get the form factor right. Then with the release of dynamic workflows, I finally have something to anchor into. This project had many iterations and I am glad that I could release something publicly. Below is what I wrote in X to promote it.


There are so many posts in X talking about dynamic workflows, but nobody talks about how it's implemented. I read all the related docs, blog posts, and even went through the Claude Code package and now I have a pretty good understanding of how it works.

Besides the available public material, the biggest win came from reading the 159-line plaintext prompt Claude Code feeds to the agent to execute the workflow file.

The second biggest win came from reading the published type contract WorkflowInput, WorkflowOutput, defined in sdk-tools.d.ts. This file is distributed alongside the Claude Code binary.

At its essence the workflow file defines the high level execution steps, alongside keywords such as pipeline and parallel to define the structure of the execution graph. It delegates a huge part of the logic to the executing agent, leaving just the minimal amount of logic to define the topology.

It will almost always be the case that the workflow file is written by an agent, and I needed a better way to read and understand the written file, so I wrote claude-workflows-viz.

The idea is simple: a program converts a workflow js file into a diagram with execution steps and agent topology. No "skills" (honestly kind of tired of skills), just an AST parser.

With one command the workflow file is converted into a visual diagram, so that it can be easily shared.