diagram

diagram is a command for Claude Code from tjboudreaux/cc-plugin-text-visualizations. It costs 18 tokens per session (1,426 once invoked), scanned A, original, MIT.

A command for creating diagrams such as flowcharts, architecture views, state machines, timelines, and Mermaid diagrams. Mermaid is a text format that describes diagrams so they can be rendered visually.

In plain words
What is it for?
Use it to map workflows, show system components, describe state transitions, create timelines, or produce ASCII and Mermaid versions of diagrams.
Why use it?
It gives you a repeatable way to explain processes, system parts, state changes, or project phases without drawing them manually.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the text-visualizations plugin — 5 skills, 3 commands shipped together

Good fit Use it to map workflows, show system components, describe state transitions, create timelines, or produce ASCII and Mermaid versions of diagrams.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/tjboudreaux/cc-plugin-text-visualizations/diagram
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.

Clone the repo
git clone --depth 1 https://github.com/tjboudreaux/cc-plugin-text-visualizations

Made for: Claude Code.

Or install text-visualizations, the plugin that ships this one along with the rest of its 5 skills, 3 commands.

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 diagram

README.md
[![agentmods](https://agentmods.dev/badge/commands/tjboudreaux/cc-plugin-text-visualizations/diagram.svg)](https://agentmods.dev/commands/tjboudreaux/cc-plugin-text-visualizations/diagram)
Your own site
<a href="https://agentmods.dev/commands/tjboudreaux/cc-plugin-text-visualizations/diagram"><img src="https://agentmods.dev/badge/commands/tjboudreaux/cc-plugin-text-visualizations/diagram.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,426 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00018 $0.01426
Opus 5 $0.00009 $0.00713
Sonnet 5 $0.00004 $0.00285
Haiku 4.5 $0.00002 $0.00143

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

Security

Grade A, and why

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 6d 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.

commands/diagram.md · 194 lines

How it starts

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

Diagram Generation

Create diagram: $ARGUMENTS

Instructions

Parse the arguments to determine diagram type and subject, then generate appropriate visualization.

Diagram Types

1. Flowchart

Trigger: "flow", "flowchart", "process", "workflow"

/diagram flow <process to visualize>
  • Apply tools-visual-workflows for ASCII flowcharts
  • Apply tools-mermaid for rendered diagrams
  • Output: Both ASCII and Mermaid versions
2. Architecture

Trigger: "arch", "architecture", "system", "components"

/diagram arch <system to visualize>
  • Apply tools-visual-ascii-arch for ASCII architecture
  • Apply tools-mermaid for rendered diagrams
  • Output: Layered architecture diagram
3. State Machine

Trigger: "state", "states", "transitions", "fsm"

/diagram state <entity and states>
  • Apply tools-visual-state-machines for state diagrams
  • Apply tools-mermaid for rendered version
  • Output: State transition diagram
4. Timeline

Trigger: "timeline", "sequence", "time", "phases"

/diagram timeline <process with phases>
  • Apply tools-visual-workflows for timeline
  • Output: ASCII timeline diagram
5. Mermaid Only

Trigger: "mermaid", "md", "markdown"

/diagram mermaid <diagram description>
  • Apply tools-mermaid for Mermaid syntax
  • Output: Mermaid code block for markdown
6. Retrospective

Trigger: "retro", "retrospective", "review"

/diagram retro <what to review>
  • Apply tools-visual-retro for retro grids
  • Output: Retrospective visualization
7. Cheatsheet

Trigger: "cheat", "cheatsheet", "reference", "commands"

/diagram cheat <tool or topic>
  • Apply tools-visual-cheatsheets for command panels
  • Output: ASCII command reference

Output Formats

ASCII Flowchart

┌─────────────────┐
│     Start       │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│   Process A     │
└────────┬────────┘
         │
    ┌────┴────┐
    │ Decision │
    └────┬────┘
    ┌────┴────┐
   yes       no
    │         │
    ▼         ▼
┌───────┐ ┌───────┐
│ Path A│ │ Path B│
└───────┘ └───────┘

Read the full file on GitHub · 194 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. 6d ago First seen · 194 lines · 0 tokens per session scan A 7591f954503c

Subscribe to this mod's changes

diagram is a command published in the GitHub repository tjboudreaux/cc-plugin-text-visualizations (2 stars, last pushed 7mo ago), licensed MIT. It adds 18 tokens to every session and 1,426 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.