mermaid

mermaid is a skill for Claude Code, Codex from peintune/runjam. It costs 51 tokens per session (808 once invoked), scanned C, original, MIT.

A tool for rendering Mermaid diagrams as SVG images or terminal-friendly text. Mermaid is a text format for describing diagrams such as flowcharts and sequence diagrams.

In plain words
What is it for?
Use it to render flowcharts, sequence diagrams, state diagrams, class diagrams, and entity-relationship diagrams.
Why use it?
It turns diagram definitions into visuals that can be viewed in a browser or directly in a terminal.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to render flowcharts, sequence diagrams, state diagrams, class diagrams, and entity-relationship diagrams.

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

Made for: Claude Code, Codex.

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/peintune/runjam/mermaid/github.svg)](https://agentmods.dev/skills/peintune/runjam/mermaid)
Your own site
<a href="https://agentmods.dev/skills/peintune/runjam/mermaid"><img src="https://agentmods.dev/badge/skills/peintune/runjam/mermaid/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.

agentmods 80×15 button for mermaid

Your own site · 80×15
<a href="https://agentmods.dev/skills/peintune/runjam/mermaid"><img src="https://agentmods.dev/badge/skills/peintune/runjam/mermaid.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 808 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00051 $0.00808
Opus 5.5 $0.00020 $0.00323
Sonnet 5.5 $0.00010 $0.00162
Haiku 4.5 $0.00005 $0.00081

Measured 3mo ago against content hash 60b67348d3af, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

mermaid scanned grade C with 1 finding 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 3mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/render.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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

> | `cp` / `mkdir -p` / `rm -rf` | `Copy-Item` / `New-Item -ItemType Directory -Force` / `Remove-Item -Recurse -Force` |
src-tauri/builtin-skills/mermaid/SKILL.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.

⚠️ Platform note — read before running any command. The shell snippets in this skill are written for macOS / Linux (bash/zsh). Always check which OS you are on first. On Windows do not run them verbatim — the underlying tool/CLI commands are usually cross-platform, but the surrounding shell syntax is not. Translate it to PowerShell before running:

bash (macOS / Linux) PowerShell (Windows)
a && b run as two steps, or a; if ($?) { b }
cat <<'EOF' | tool … (heredoc) write the text to a temp file, then pipe/pass that file to the tool
VAR=$(cmd) … $VAR $VAR = cmd … $VAR
cmd > /dev/null cmd > $null
… | grep PAT … | Select-String PAT
… | jq … … | ConvertFrom-Json, then read the fields
python3 x.py python x.py (or py x.py)
~/dir, /tmp $env:USERPROFILE\dir, $env:TEMP
cp / mkdir -p / rm -rf Copy-Item / New-Item -ItemType Directory -Force / Remove-Item -Recurse -Force

If a command has no obvious Windows equivalent, prefer the built-in file/HTTP tools over raw shell.

Mermaid Diagram Renderer

Render Mermaid diagrams using beautiful-mermaid library. Supports 5 diagram types with dual output modes.

Quick Start

Dependencies (beautiful-mermaid) auto-install on first run.

SVG Output (Default)

# From file
npx tsx scripts/render.ts diagram.mmd --output diagram.svg

# From stdin
echo "graph LR; A-->B-->C" | npx tsx scripts/render.ts --stdin --output flow.svg

ASCII Output (Terminal)

# ASCII art for terminal display
npx tsx scripts/render.ts diagram.mmd --ascii

# Pipe directly
echo "graph TD; Start-->End" | npx tsx scripts/render.ts --stdin --ascii

Output example:

┌───────┐     ┌─────┐
│ Start │────▶│ End │
└───────┘     └─────┘

Supported Diagrams

Type Syntax Best For
Flowchart graph TD/LR Processes, decisions
Sequence sequenceDiagram API calls, interactions
State stateDiagram-v2 State machines
Class classDiagram OOP design
ER erDiagram Database schemas

Read the full file on GitHub · 80 lines

Files

What ships with it

2 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. 3mo ago First seen · 80 lines · 51 tokens per session scan C 60b67348d3af

Subscribe to this mod's changes

mermaid is a skill published in the GitHub repository peintune/runjam (221 stars, last pushed 1mo ago), licensed MIT. It adds 51 tokens to every session and 808 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

mermaid compared with skills from other repositories

mermaid next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mermaidpeintune/runjamSkill2211mo agoMITC51Claude Code, Codex
maintaining-macos-healthCodeAlive-AI/ai-driven-developmentSkill1942d agoMITA157Claude Code
maintaining-windows-healthCodeAlive-AI/ai-driven-developmentSkill1942d agoMITA191Claude Code
prompt-engineeringCodeAlive-AI/ai-driven-developmentSkill1942d agoMITA76Claude Code
installing-cli-toolsCodeAlive-AI/ai-driven-developmentSkill1942d agoMITA94Claude Code, Codex
windows-qa-engineerCodeAlive-AI/ai-driven-developmentSkill1942d agoMITA107Claude Code
fetch-url-as-markdownCodeAlive-AI/ai-driven-developmentSkill1942d agoMITA90Claude Code