flow

flow is a command for Claude Code from sjungling/sjungling-claude-plugins. It costs 17 tokens per session (948 once invoked), scanned B, original, MIT.

A local interactive viewer for diagrams described in JSON, a plain-text data format. Users can move and edit diagram items in a browser, with those changes written back to the JSON file.

In plain words
What is it for?
Use it to start or stop a diagram viewer, create an empty diagram file, and collaborate on node-and-connection diagrams.
Why use it?
It provides a visual way to inspect and adjust diagrams while keeping the diagram data available to scripts and the coding agent.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the flow plugin — 1 command shipped together

Good fit Use it to start or stop a diagram viewer, create an empty diagram file, and collaborate on node-and-connection diagrams.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add sjungling/sjungling-claude-plugins
Claude Code
/plugin install flow

Made for: Claude Code.

Or install flow, the plugin that ships this one along with the rest of its 1 command.

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 flow

README.md
[![agentmods](https://agentmods.dev/badge/commands/sjungling/sjungling-claude-plugins/flow.svg)](https://agentmods.dev/commands/sjungling/sjungling-claude-plugins/flow)
Your own site
<a href="https://agentmods.dev/commands/sjungling/sjungling-claude-plugins/flow"><img src="https://agentmods.dev/badge/commands/sjungling/sjungling-claude-plugins/flow.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 948 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00017 $0.00948
Opus 5 $0.00009 $0.00474
Sonnet 5 $0.00003 $0.00190
Haiku 4.5 $0.00002 $0.00095

Measured 7d ago against content hash 8e38c406adf6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade B, and why

flow scanned grade B with 2 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 7d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

kill "$(cat .claude/diagrams/.server.pid)" 2>/dev/null || true

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- The command uses `Bash` (node, kill, mkdir, git) and `Write` (JSON seeding). No `curl` required.
plugins/flow/commands/flow.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/flow

Spin up a local React Flow viewer so the user can see — and interactively edit — a diagram described as JSON in .claude/diagrams/<name>.json. The LLM and the browser share the file: you write JSON, the user drags / edits nodes in the browser, and the file updates so you can read their changes on the next turn.

Arguments

$ARGUMENTS — one of:

  • (empty) or <name> → start the server for diagram <name> (default: diagram).
  • stop → shut down the running server.
  • Append --port N to override the default port 4173.

Behavior

Starting

  1. Parse $ARGUMENTS → diagram <name> (default diagram), optional --port <N> (default 4173).
  2. Project root: git rev-parse --show-toplevel (fall back to cwd if not a git repo).
  3. If .claude/diagrams/.server.pid exists and that PID is alive (kill -0 <pid>), tell the user the server is already running and print the URL. Do not start a second one. If the PID is stale, delete the file.
  4. Use the Write tool to ensure .claude/diagrams/<name>.json exists. If missing, seed it with {"nodes": [], "edges": []}. If the user described a diagram in this conversation, write an initial graph (nodes + edges) to that file before launching so the viewer opens populated.
  5. Launch the server in the background via Bash:
    FLOW_PORT=<port> FLOW_PROJECT_ROOT=<project-root> FLOW_DIAGRAM=<name> \
      nohup node "${CLAUDE_PLUGIN_ROOT}/server/server.mjs" \
      > .claude/diagrams/.server.log 2>&1 &
    disown
    
  6. Print the URL (http://localhost:<port>) and the diagram file path. Tell the user: "Say done (or run /flow:flow stop) when you're finished and I'll tear it down."

Stopping

  1. Read PID from .claude/diagrams/.server.pid.
  2. Send SIGTERM — the server traps it and exits cleanly:
    kill "$(cat .claude/diagrams/.server.pid)" 2>/dev/null || true
    rm -f .claude/diagrams/.server.pid
    
  3. Confirm shutdown to the user.

Graph JSON shape

Native React Flow. Nodes default to a custom editable type if type is omitted:

Read the full file on GitHub · 80 lines

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. 7d ago First seen · 80 lines · 17 tokens per session scan B 8e38c406adf6

Subscribe to this mod's changes

flow is a command published in the GitHub repository sjungling/sjungling-claude-plugins (13 stars, last pushed 24d ago), licensed MIT. It adds 17 tokens to every session and 948 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.