mermaid

mermaid is a skill for Claude Code from bendrucker/claude. It costs 23 tokens per session (310 once invoked), scanned A, original, MIT.

A skill for creating and checking Mermaid diagrams, which are text-based diagrams used in Markdown.

In plain words
What is it for?
Making flowcharts, sequence diagrams, state diagrams, and database relationship diagrams, then validating them with the supplied script.
Why use it?
It provides guidance for choosing diagram types and checking their syntax, reducing errors in diagrams stored as text.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the mermaid plugin — 1 skill shipped together

Good fit Making flowcharts, sequence diagrams, state diagrams, and database relationship diagrams, then validating them with the supplied script.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bendrucker/claude/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.

Any agent
npx skills add bendrucker/claude --skill diagram
Clone the repo
git clone --depth 1 https://github.com/bendrucker/claude

Made for: Claude Code.

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

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 mermaid

README.md
[![agentmods](https://agentmods.dev/badge/skills/bendrucker/claude/diagram.svg)](https://agentmods.dev/skills/bendrucker/claude/diagram)
Your own site
<a href="https://agentmods.dev/skills/bendrucker/claude/diagram"><img src="https://agentmods.dev/badge/skills/bendrucker/claude/diagram.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 310 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00023 $0.00310
Opus 5 $0.00012 $0.00155
Sonnet 5 $0.00005 $0.00062
Haiku 4.5 $0.00002 $0.00031

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

Security

Grade A, and why

mermaid 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 7d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/validate.test.ts, scripts/validate.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/mermaid/skills/diagram/SKILL.md · 41 lines

What it actually says

Mermaid Diagrams

Create and validate Mermaid diagrams with syntax checking.

Diagram Types

Type Directive Use For
Flowchart flowchart TB Process flows, decision trees, system architecture
Sequence sequenceDiagram API interactions, message passing, protocols
State stateDiagram-v2 State machines, lifecycles, status transitions
ER erDiagram Database schemas, entity relationships

Validation

Validate mermaid syntax in markdown files:

bun ${CLAUDE_SKILL_DIR}/scripts/validate.ts <file.md>

References

  • Flowchart — Nodes, edges, subgraphs, layout direction
  • Sequence — Participants, messages, activations, loops
  • State — States, transitions, composite states
  • ER — Entities, relationships, cardinality

Best Practices

  • Keep labels concise—use full descriptions in surrounding prose
  • Use subgraphs to group related nodes visually
  • Order participants/nodes to minimize edge crossings
  • Prefer left-to-right (LR) for timelines, top-to-bottom (TB) for hierarchies
Files

What ships with it

10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 41 lines · 23 tokens per session scan A e3aa7db0de78

Subscribe to this mod's changes

mermaid is a skill published in the GitHub repository bendrucker/claude (16 stars, last pushed yesterday), licensed MIT. It adds 23 tokens to every session and 310 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-30.

Related

Other skills, from other repositories

top-design

Create award-winning, immersive web experiences at the level of Awwwards-featured agencies. Use when the user mentions "Awwwards quality", "make my site stunning", "scroll animations", "parallax storytelling", "cinematic web design", "portfolio site", or "brand experience". Also trigger when elevating a standard…

wondelai/skills · 113 tokens

design-everyday-things

Apply foundational design principles: affordances, signifiers, constraints, feedback, and conceptual models. Use when the user mentions "why is this confusing", "affordance", "error prevention", "discoverability", "human-centered design", "mental model", "mapping", "seven stages of action", "users keep making…

wondelai/skills · 132 tokens

sxo

Search Experience Optimization (SXO) — the bridge between SEO and UX/CRO. Audits the full journey from the SERP click to the on-page goal: SERP click-through factors (title/meta/rich results that win the click), then post-click experience signals that keep users and drive conversions — above-the-fold relevance and…

nowork-studio/notfair-plugin · 235 tokens

influence-psychology

Apply the seven principles of ethical persuasion (reciprocity, commitment, social proof, authority, liking, scarcity, unity) to product design, copy, and sales. Use when the user mentions "social proof", "persuasive copy", "why users dont convert", "ethical persuasion", "reciprocity", "scarcity tactics", "commitment…

wondelai/skills · 156 tokens

refactoring-ui

Audit and fix visual hierarchy, spacing, color, and depth in web UIs. Use when the user mentions "my UI looks off" (or amateur/unprofessional), "fix the design", "Tailwind styling", "color palette", "visual hierarchy", "design system", "spacing scale", or "component styling". Also trigger when building consistent…

wondelai/skills · 132 tokens

ux-heuristics

Evaluate and improve interface usability using heuristic analysis. Use when the user mentions "usability audit", "users are confused", "form usability", "navigation problems", "Nielsen heuristics", "cognitive walkthrough", or "is this easy to use". Also trigger when reviewing a design for usability issues, improving…

wondelai/skills · 122 tokens