npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

claude-workflows-viz

v0.1.2

Published

Render a Claude Code dynamic-workflow file as an SVG/PNG diagram — agent topology statically inferred from the body, never executed

Readme

The following is 100% written by a human.

claude-workflows-viz is a Node CLI that converts a Claude Code workflow .js file into a diagram with execution steps and agent topology.

Anatomy of a claude-workflows-viz diagram — the meta block, phase table, and inferred agent graph, keyed to an Anatomy legend

Install

npm install -g claude-workflows-viz

# run it without installing
npx claude-workflows-viz <workflow.js>

Dynamic workflows - Introduction

Dynamic workflows was introduced by Anthropic in May this year as a way to launch multiple agents in a structured, yet dynamic way. It is structured because unlike Agent Teams, the harness is defined in JavaScript. It is also dynamic, because the file only defines the topology and the execution steps, and delegates implementation details to the main agent. Dynamic workflows are clearly in the direction of the "thin harness" movement, but it also introduced a minimalistic way to define the structure of the harness. Overall it is quite clever, and I encourage you to read the official docs and blog post if you haven't already done so.

Dynamic workflows - Need for visualization

Dynamic workflows inherently have a graph formulation within, because it involves multiple agents working together. You can see this in the Claude blog where they visualize the workflow patterns, and also in the Bun blog post where they visualize via animation. If you work with dynamic workflows, it becomes immediately clear that a visual representation is needed.

Dynamic Workflows - Under the hood

So what is inside a workflow file? As we will later discuss in more detail, there is no formal spec for dynamic workflows, so all of this may change in the future. But as of now, we have the next best thing, which is the workflow tool description prompt that is provided to the main agent when executing workflow files. This is the plain text embedded inside the Claude Code binary (found by Claude Code). It is 159 lines and quite readable.

Claude Code also ships sdk-tools.d.ts next to the binary, and it contains the published type contract for WorkflowInput and WorkflowOutput.

Together with the prompt and the type contract, we have enough information to design a program that parses the workflow file into execution units and an agent topology graph.

Implementation - No LLM, static analysis only

There were two hard requirements of the project:

  1. Just compose the program with an AST parser and not rely on the LLM with a "skill"
  2. Don't execute the workflow file

The result is we use Acorn to parse the file, and use the keywords such as agent()/workflow() calls, parallel() fan-outs and barriers, pipeline() stages, loops, and branches to build a vertical graph. There are some elements that are runtime-decided, such as the labels, and the conditional logic, and in such cases it is written as is to preserve correctness.

Side note: I didn't put much thought into the style and relied on the default agent design skills, and if the project is used by other people it may be useful to add a way to inject different styles into the rendering.

Implementation - Locking in the spec via versioning

Using the plaintext prompt in the Claude Code binary, and the published type contract, we can create our own "version", and check if the captured spec is stale by checking the hash value of the two files. This is necessary if we want claude-workflows-viz to support multiple Claude Code versions that carry different dynamic workflow implementations.

Usage

Check docs/usage.md for the manual.

By default the workflow files are either saved in .claude/workflows or ~/.claude/workflows. The visual diagram can be used in PRs when adding a dynamic workflow to the repo, or in more public settings. For example use claude-workflows-viz <workflow.js> --share to upload the svg to a GitHub gist, with options to upload png or workflow files as well.

Examples

Check the example gallery for various examples.