wf-diagram

wf-diagram is a command for coding agents from hesreallyhim/ultracode-workflows. It costs 19 tokens per session (442 once invoked), scanned A, original, MIT.

A command that renders a diagram showing the phases and control flow of a workflow script. It can show parallel work, repeated phases, nested workflows, and synchronization points.

In plain words
What is it for?
Use it to inspect a workflow file or create a Mermaid diagram for GitHub, pull requests, or documentation.
Why use it?
It makes a multi-step workflow easier to understand before running or documenting it.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the ultracode-workflows plugin — 1 skill, 7 commands, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/hesreallyhim/ultracode-workflows/wf-diagram
Clone the repo
git clone --depth 1 https://github.com/hesreallyhim/ultracode-workflows

Or install ultracode-workflows, the plugin that ships this one along with the rest of its 1 skill, 7 commands, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wf-diagram

README.md
[![agentmods](https://agentmods.dev/badge/commands/hesreallyhim/ultracode-workflows/wf-diagram.svg)](https://agentmods.dev/commands/hesreallyhim/ultracode-workflows/wf-diagram)
Your own site
<a href="https://agentmods.dev/commands/hesreallyhim/ultracode-workflows/wf-diagram"><img src="https://agentmods.dev/badge/commands/hesreallyhim/ultracode-workflows/wf-diagram.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 442 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00019 $0.00442
Opus 5 $0.00010 $0.00221
Sonnet 5 $0.00004 $0.00088
Haiku 4.5 $0.00002 $0.00044

Measured 5d ago against content hash 16c6da440950, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

wf-diagram scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ultracode-workflows/commands/wf-diagram.md · 30 lines

What it actually says

/wf-diagram

Diagram the workflow the user named in $ARGUMENTS.

Resolve the target: if $ARGUMENTS is a path to a .js file, use it; if it's a bare name, use ${CLAUDE_PLUGIN_ROOT}/workflows/<name>.js; if it names a file in this project's .claude/workflows/, use that.

Then run:

node "${CLAUDE_PLUGIN_ROOT}/scripts/diagram-workflow.mjs" <resolved-path>

This prints a terminal rendering — one bounding card per phase, edges between cards, loops as a rail in the left margin. Relay it to the user inside a fenced code block so the monospace alignment survives; the box-drawing columns break if it is emitted as prose.

Add --md instead when the user wants Mermaid to paste into GitHub, a PR, or docs. Do not print both.

Reading the output:

  • · one agent, a parallel fan-out, a nested sub-workflow, a loop.
  • ×4 is an exact width; ×0–3 ⁇ and ×N ⁇ mean the count is runtime-dependent or could not be resolved statically.
  • inherited in the effort column means the call site sets no effort and takes the session's.
  • A phase that appears twice with (revisit) is the same phase re-entered, not a new stage.

The tool statically parses the script's AST and never evaluates the workflow body, so do not supply runtime args. If the tool reports a dynamic dispatcher, explain that it can show the statically discoverable targets but the target selected for a particular run is decided at runtime. An unknown upper bound means only that static analysis could not prove a cap; do not call it an infinite or unbounded run.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 30 lines · 19 tokens per session scan A 16c6da440950

Subscribe to this mod's changes

wf-diagram is a command published in the GitHub repository hesreallyhim/ultracode-workflows (3 stars, last pushed 29d ago), licensed MIT. It adds 19 tokens to every session and 442 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other commands, from other repositories

diagnose-underperformer

Diagnose why a specific Google Ads or Meta Ads campaign / ad set / ad is underperforming and prescribe the next concrete action. Use when the user says something like "why is X not converting?", "this campaign is wasting money", or "why are impressions so low?". Read-only — no changes are made.

markifact/markifact-mcp · 64 tokens

edit-meta-creative

Edit a Meta ad's creative content — landing page URL, primary text, headline, description, CTA, link description — across one ad or many. Use when the user says "change the URL on my ads", "update the copy", "swap the CTA", or anything that changes what an existing Meta ad shows. Meta does not allow in-place creative…

markifact/markifact-mcp · 88 tokens

save

Save this conversation as a new or existing reusable context.

XTSoftwareLabs/neatcontext-plugins · 10 tokens

launch-meta-campaign

Launch a complete Meta Ads campaign — campaign, ad set, and ad(s) — built paused and ready to review. Use when the user wants a new Facebook/Instagram campaign.

markifact/markifact-mcp · 36 tokens

launch-pmax

Launch a Google Ads Performance Max campaign with a complete asset group, audience signals, and (for ecom) listing groups. Built paused for review. Use when the user wants a new PMax campaign.

markifact/markifact-mcp · 41 tokens

negative-keyword-sweep

Find wasted spend in Google Ads search terms and add negatives at the right scope (account list, campaign, or ad group). Use when the user says "find junk keywords", "stop wasting on bad searches", or wants a search-terms cleanup.

markifact/markifact-mcp · 50 tokens