mermaid

mermaid is a skill for Claude Code from tslateman/duet. It costs 67 tokens per session (775 once invoked), scanned A, original, MIT.

A format and toolset for creating diagrams from text, including flowcharts, sequence diagrams, class diagrams, and timelines.

In plain words
What is it for?
Use it to write Mermaid diagrams in Markdown and render them as SVG, PNG, or PDF when needed.
Why use it?
Diagrams can make processes, relationships, and dependencies easier to understand and maintain in project documentation.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the duet plugin — 25 skills, 6 commands, 1 agent shipped together

Good fit Use it to write Mermaid diagrams in Markdown and render them as SVG, PNG, or PDF when needed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tslateman/duet/mermaid
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 tslateman/duet --skill mermaid
Clone the repo
git clone --depth 1 https://github.com/tslateman/duet

Made for: Claude Code.

Or install duet, the plugin that ships this one along with the rest of its 25 skills, 6 commands, 1 agent.

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/tslateman/duet/mermaid.svg)](https://agentmods.dev/skills/tslateman/duet/mermaid)
Your own site
<a href="https://agentmods.dev/skills/tslateman/duet/mermaid"><img src="https://agentmods.dev/badge/skills/tslateman/duet/mermaid.svg" alt="Measured on agentmods" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 775 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.00067 $0.00775
Opus 5 $0.00034 $0.00387
Sonnet 5 $0.00013 $0.00155
Haiku 4.5 $0.00007 $0.00077

Measured 7d ago against content hash 1cd6bb816eb8, 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.

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.

skills/mermaid/SKILL.md · 118 lines

How it starts

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

Mermaid.js v11

Overview

Mermaid is the only diagram format that renders natively in GitHub markdown: no exported images to commit.

Quick Start

Basic Diagram Structure:

{diagram-type}
  {diagram-content}

Common Diagram Types:

  • flowchart - Process flows, decision trees
  • sequenceDiagram - Actor interactions, API flows
  • classDiagram - OOP structures, data models
  • stateDiagram - State machines, workflows
  • erDiagram - Database relationships
  • gantt - Project timelines
  • journey - User experience flows

WARNING: references/diagram-types.md covers all 24+ diagram types with full syntax. Load only when you need a specific type's syntax.

Creating Diagrams

Inline Markdown Code Blocks:

```mermaid
flowchart TD
    A[Start] --> B{Decision}
    B -->|Yes| C[Action]
    B -->|No| D[End]
```

Configuration via Frontmatter:

```mermaid
---
theme: dark
---
flowchart LR
    A --> B
```

Comments: Use %% prefix for single-line comments.

Syntax Rules

Follow these to avoid parse errors:

  • Indentation: Use consistent 4-space indentation
  • Node IDs: Short unique identifiers (A, B, node1). Avoid reserved words
  • Special characters: Wrap text with special characters in quotes
  • Subgraphs: Must close with end keyword
  • Whitespace: No trailing whitespace (causes parsing failures)
  • Complexity: Break diagrams at 15+ elements into multiple focused diagrams

CLI Usage

Convert .mmd files to images:

# Installation
npm install -g @mermaid-js/mermaid-cli

# Basic conversion
mmdc -i diagram.mmd -o diagram.svg

# With theme and background
mmdc -i input.mmd -o output.png -t dark -b transparent

# Custom styling
mmdc -i diagram.mmd --cssFile style.css -o output.svg

See references/cli-usage.md for Docker, batch processing, and advanced workflows. To render from JavaScript instead of the CLI, see references/integration.md for the API and embedding.

Read the full file on GitHub · 118 lines

Files

What ships with it

5 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 · 118 lines · 67 tokens per session scan A 1cd6bb816eb8

Subscribe to this mod's changes

mermaid is a skill published in the GitHub repository tslateman/duet (1 stars, last pushed 11d ago), licensed MIT. It adds 67 tokens to every session and 775 once invoked, about $0.0003 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 skills, from other repositories

designer

Settle the look before the pixels — audience and context first, then the base and the delta, taste settled by looking at real states, accessibility as the floor, one design language committed to DESIGN.md as tokens with roles. A command the user types, for work with an interface someone will see; standalone, no other…

donald-ada/workinggenius · 69 tokens

customer-journey-map

Visualize every touchpoint a customer has with a product or service — stages, actions, emotions, pain points, opportunities.

tupe12334/instinct · 31 tokens

double-diamond

Design problems with two diamond phases: Discover/Define (right problem), Develop/Deliver (right solution).

tupe12334/instinct · 25 tokens

liquid-glass

Apple Liquid Glass design system. Use when building UI with translucent, depth-aware glass morphism following Apple's design language. Provides CSS tokens, component patterns, dark/light mode, and animation specs.

fengshao1227/ccg-workflow · 43 tokens

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

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