mermaid

mermaid is a skill for Claude Code from rp1-run/rp1. It costs 36 tokens per session (3,799 once invoked), scanned A, original, Apache-2.0.

A tool for creating, checking, and repairing Mermaid diagrams, which are diagrams written as text, including flowcharts, sequence diagrams, class diagrams, and timelines.

In plain words
What is it for?
Use it to create or validate Mermaid diagrams and troubleshoot invalid diagram code.
Why use it?
It catches diagram syntax problems and provides repair guidance before the diagram is used in documentation.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code; mentions Codex; mentions OpenCode.

Part of the rp1-base plugin — 20 skills, 17 agents, 1 hook shipped together

Good fit Use it to create or validate Mermaid diagrams and troubleshoot invalid diagram code.

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

Made for: Claude Code.

Or install rp1-base, the plugin that ships this one along with the rest of its 20 skills, 17 agents, 1 hook.

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/rp1-run/rp1/mermaid/github.svg)](https://agentmods.dev/skills/rp1-run/rp1/mermaid)
Your own site
<a href="https://agentmods.dev/skills/rp1-run/rp1/mermaid"><img src="https://agentmods.dev/badge/skills/rp1-run/rp1/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/rp1-run/rp1/mermaid"><img src="https://agentmods.dev/badge/skills/rp1-run/rp1/mermaid.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,799 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 233
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
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.00036 $0.03799
Opus 5 $0.00018 $0.01899
Sonnet 5 $0.00007 $0.00760
Haiku 4.5 $0.00004 $0.00380

Measured 12d ago against content hash 7eb3a9e2d7de, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 12d 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.

plugins/base/skills/mermaid/SKILL.md · 432 lines

How it starts

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

Mermaid Diagrams Skill

Create valid, well-formed Mermaid.js diagrams with automatic validation and error repair guidance.

Requirement: rp1 CLI v0.3.0 or later (includes agent-tools mmd-validate command)

What This Skill Does

  • Creates diagrams: Flowcharts, sequence diagrams, class diagrams, ER diagrams, state diagrams, Gantt charts, and more
  • Validates syntax: Uses rp1 agent-tools mmd-validate CLI tool for verification
  • Troubleshoots errors: Categorizes validation errors and guides repairs
  • Integrates with fixer agent: Supports bulk validation and automatic repair workflows

When to Use

Activate this skill when:

  • User requests any diagram, chart, or visualization
  • Creating flowcharts, sequence diagrams, class diagrams, ER diagrams, state diagrams, Gantt charts
  • Validating existing mermaid code blocks
  • Debugging diagram syntax errors
  • Working with markdown files containing mermaid blocks

Trigger phrases: "create a diagram", "draw a flowchart", "visualize this process", "sequence diagram for", "ER diagram", "class diagram", "fix this mermaid", "validate diagram"

Validation Workflow

CRITICAL: Every diagram MUST be validated before being considered complete.

Step 1: Create the Diagram

  1. Consult reference.md for syntax
  2. Choose the appropriate diagram type
  3. Follow proper syntax conventions:
    • Start with diagram type declaration
    • Use consistent indentation
    • Quote labels with special characters
    • Use correct arrow types for the diagram

Step 2: Validate Using CLI Tool

# Validate markdown file (all embedded diagrams)
rp1 agent-tools mmd-validate path/to/document.md

# Validate standalone mermaid file
rp1 agent-tools mmd-validate path/to/diagram.mmd

# Validate from stdin (for inline diagrams)
echo 'flowchart TD
    A --> B' | rp1 agent-tools mmd-validate

Step 3: Handle Validation Results

The CLI tool outputs structured JSON in a ToolResult envelope:

Read the full file on GitHub · 432 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. 12d ago First seen · 432 lines · 36 tokens per session scan A 7eb3a9e2d7de

Subscribe to this mod's changes

mermaid is a skill published in the GitHub repository rp1-run/rp1 (38 stars, last pushed 5d ago), licensed Apache-2.0. It adds 36 tokens to every session and 3,799 once invoked, about $0.0002 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

at-vision

Inspect screenshots, photos, diagrams, image paths, and image URLs when the task depends on visible content. Use when the prompt lacks actual image content, native inspection fails, or the user requests inspectimage; prefer the MCP tool, then the installed CLI.

kairyou/agent-tools · 55 tokens

c4-diagrams

Use when explaining existing code architecture, visualizing a new system before detailed design, mapping software boundaries, or creating C4-style diagrams in ASCII or Mermaid.

intent-driven-dev/intent-driven-template · 36 tokens

lfe-visual-check

Inspector sub-skill. Renders the changed UI surface, reasons over the result, and writes a text findings record with a human-action instruction and sign-off token — so a human visual sign-off can close a UI change. Artifact-free (saves no image files). Auto-arms on a visual-file touch; written by the Inspector at…

StChiotis/Library-First-Engineering · 90 tokens

archify

Create polished, validated architecture, workflow, sequence, data-flow, and lifecycle/state diagrams as explorable standalone HTML with inline SVG, dark/light themes, semantic navigation, optional trace motion, an optional 1200×630 Share Card PNG, and PNG/JPEG/WebP/SVG/WebM export. Accept plain-language requirements…

HK-hub/AgentSkills · 187 tokens

original-design

Facilitates an interactive session that turns a product or subject into an original, internally consistent visual design language for any artifact — infographics, video storyboards, websites, or mobile app UI/UX. Use when the user wants an original design language, identity, or art direction, or when a design feels…

sanky369/vibe-building-skills · 153 tokens

design-engineer-mindset

Translate a design (Figma mockup, spec, screenshot, or verbal description) into code with pixel- and motion-level fidelity, using the browser's rendering pipeline as a constraint: exact spacing/timing via tokens, GPU-safe animations, no layout thrashing, 60fps interactions. Use when the user says 'implement this…

sanky369/vibe-building-skills · 145 tokens