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.
/plugin marketplace add wrxck/diagram-expert/plugin install diagram-expertWrote 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.
[](https://agentmods.dev/commands/wrxck/diagram-expert/diagram)<a href="https://agentmods.dev/commands/wrxck/diagram-expert/diagram"><img src="https://agentmods.dev/badge/commands/wrxck/diagram-expert/diagram/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/wrxck/diagram-expert/diagram"><img src="https://agentmods.dev/badge/commands/wrxck/diagram-expert/diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00649 |
| Opus 5 | $0.00000 | $0.00324 |
| Sonnet 5 | $0.00000 | $0.00130 |
| Haiku 4.5 | $0.00000 | $0.00065 |
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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/diagram
Generate a Mermaid diagram from a description or by analysing the current codebase.
Usage
/diagram <description or type>
Examples:
/diagram architecture— Architecture overview of the current project/diagram sequence for the auth flow— Sequence diagram for authentication/diagram erd— Entity-relationship diagram from database models/diagram deployment— Deployment/infrastructure diagram/diagram data flow from API to UI— Data flow for a specific path
Flow
1. Determine diagram type
If the user specified a type, use it. Otherwise, infer from context:
| Context clue | Suggested type |
|---|---|
| Database models, schemas, Prisma/Drizzle/TypeORM files | Entity-Relationship (erDiagram) |
| API endpoints, request handling | Sequence diagram |
| Component hierarchy, imports | Class or flowchart |
| Docker, nginx, deployment configs | Deployment/architecture (C4 or flowchart) |
| State machines, status fields | State diagram |
| CI/CD, pipelines | Flowchart (LR) |
| Git branching strategy | Gitgraph |
| Timeline, roadmap | Timeline or Gantt |
2. Detect git provider
git remote get-url origin 2>/dev/null
github.com/gitlab/dev.azure.com→ Use fenced Mermaid blocksbitbucket.org→ Warn user that Bitbucket doesn't render Mermaid natively; offer to generate a mermaid.live link or SVG alternative- No remote → Default to fenced Mermaid blocks
3. Analyse the codebase
Use the codebase-analyzer agent to:
- Read relevant source files (models, routes, components, configs)
- Extract relationships, dependencies, and flows
- Build a mental model of the system
Do NOT read the entire codebase. Target files relevant to the requested diagram type.
4. Generate the diagram
Read ${CLAUDE_PLUGIN_ROOT}/skills/diagram-expert/references/mermaid-patterns.md for syntax patterns.
Rules:
- Use descriptive node IDs, not single letters (e.g.,
AuthServicenotA) - Add meaningful labels on edges
- Group related nodes with subgraphs where it helps clarity
- Keep diagrams readable — split into multiple diagrams if >30 nodes
- Use appropriate direction: TD for hierarchies, LR for flows/sequences
- Include a title using
---frontmatter oraccTitle
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.
- 10d ago First seen · 85 lines · 0 tokens per session scan A c159bac6d8ac
diagram is a command published in the GitHub repository wrxck/diagram-expert (6 stars, last pushed 29d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 649 tokens. 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.
Other commands, from other repositories
profile
Save, load, inspect, update, reset, or delete diagram-design client profiles.
ui-flow-review
Review menus, HUD, navigation, and player flow from a UX perspective.
ppt-image2-editable-rebuild
Rebuild image2 or imagegen reference slides as editable PowerPoint decks.
responsive-design-specialist
Use when a layout breaks between sizes. Arbitrary breakpoints, type that does not scale, images that blow out the grid, or a desktop design retrofitted onto mobile.
team-ui
Orchestrate UI/UX design team.
p3-ux-wireframes
Creates wireframes (ASCII art) for the most important screens with interaction descriptions.