mermaid-diagram

mermaid-diagram is a skill for Claude Code, Codex from wecode-ai/Wegent. It costs 102 tokens per session (2,099 once invoked), scanned A, original, Apache-2.0.

A workflow for writing Mermaid diagrams, which are text descriptions of diagrams such as flowcharts, sequence diagrams, and architecture maps. It validates the diagram before showing the Mermaid code.

In plain words
What is it for?
Use it to describe workflows, system architecture, data relationships, timelines, or other supported diagram types.
Why use it?
It catches diagram-syntax problems before the diagram is presented.

Skill for Claude CodeCodex

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

Good fit Use it to describe workflows, system architecture, data relationships, timelines, or other supported diagram types.

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

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-diagram

README.md
[![agentmods](https://agentmods.dev/badge/skills/wecode-ai/wegent/mermaid-diagram/github.svg)](https://agentmods.dev/skills/wecode-ai/wegent/mermaid-diagram)
Your own site
<a href="https://agentmods.dev/skills/wecode-ai/wegent/mermaid-diagram"><img src="https://agentmods.dev/badge/skills/wecode-ai/wegent/mermaid-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.

agentmods 80×15 button for mermaid-diagram

Your own site · 80×15
<a href="https://agentmods.dev/skills/wecode-ai/wegent/mermaid-diagram"><img src="https://agentmods.dev/badge/skills/wecode-ai/wegent/mermaid-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,099 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 YARA Match · line 135
    YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
    Fix: Remove offensive tool references and exploit code. Legitimate agent skills should not contain penetration testing tools, exploit frameworks, or reconnaissance utilities.
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.00102 $0.02099
Opus 5 $0.00051 $0.01050
Sonnet 5 $0.00020 $0.00420
Haiku 4.5 $0.00010 $0.00210

Measured 12d ago against content hash 8c35acb9943d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

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

The scan reads SKILL.md. This mod also ships 3 executable files (provider.py, read_reference.py, render_mermaid.py), 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.

backend/init_data/skills/mermaid-diagram/SKILL.md · 245 lines

How it starts

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

Diagram Visualization with Mermaid

When you need to visualize concepts, workflows, architectures, or relationships, use Mermaid diagram syntax.

IMPORTANT: Two-Step Workflow

To create mermaid diagrams, follow this two-step workflow:

  1. Step 1: Validate with render_mermaid tool - Use the tool to validate your mermaid syntax
  2. Step 2: Output mermaid code block - After successful validation, output the mermaid code block in your response

This ensures:

  • Syntax is validated before displaying to the user
  • The diagram is automatically saved in the conversation history
  • The diagram can be referenced later in the conversation

Step 1: Use render_mermaid Tool

Call the render_mermaid tool with the following parameters:

Parameter Type Required Description
code string Yes The mermaid diagram code (without the ```mermaid wrapper)
diagram_type string No Diagram type hint (flowchart, sequence, etc.)
title string No Optional title for the diagram

Example Tool Call

{
  "name": "render_mermaid",
  "arguments": {
    "code": "flowchart TD\n    A[Start] --> B{Decision}\n    B -->|Yes| C[Action 1]\n    B -->|No| D[Action 2]\n    C --> E[End]\n    D --> E",
    "title": "Decision Flow"
  }
}

Step 2: Output Mermaid Code Block

When the render_mermaid tool returns success, it will include the mermaid code that you should output. Simply include the mermaid code block in your response:

flowchart TD
    A[Start] --> B{Decision}
    B -->|Yes| C[Action 1]
    B -->|No| D[Action 2]
    C --> E[End]
    D --> E

This mermaid code block will be:

  • Rendered as a diagram for the user to see
  • Saved in the conversation history
  • Available for future reference

Error Handling and Retry

Read the full file on GitHub · 245 lines

Files

What ships with it

3 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 · 245 lines · 102 tokens per session scan A 8c35acb9943d

Subscribe to this mod's changes

mermaid-diagram is a skill published in the GitHub repository wecode-ai/Wegent (820 stars, last pushed today), licensed Apache-2.0. It adds 102 tokens to every session and 2,099 once invoked, about $0.0005 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

excalidraw

Export Excalidraw-compatible JSON diagrams from natural language descriptions.

furkangonel/cowrangler · 18 tokens

mermaid-diagram

A guide for writing Mermaid code for structured diagrams. Mermaid is a text format that can describe diagrams such as flowcharts, architecture diagrams and timelines.

PM-Shawn/Abu-Cowork · 104 tokens

diagram-creator

Create professional diagrams using Mermaid, PlantUML, and other text-based diagram tools. Generate flowcharts, sequence diagrams, architecture diagrams, and more.

claude-office-skills/skills · 34 tokens

tech-diagram

Use this skill when the user wants to turn a description into a technical diagram — architecture diagrams, flowcharts, sequence diagrams, state machines, ER diagrams, class diagrams, or mind maps. Generates brand-consistent Mermaid that the DesireCore chat renders inline as SVG, with a semantic shape/arrow vocabulary…

desirecore/market · 210 tokens

code-to-diagram

Analyze codebases and automatically generate architecture diagrams, flowcharts, and org charts. Uses AST parsing to map import dependencies for Python, JS/TS, Go, and Java, outputting Mermaid or SVG files. Triggered when users ask to visualize code architecture, understand dependencies, draw a flowchart, or create a…

serejaris/kimi-skills · 74 tokens

skin-creator

Create and apply a two-asset LobsterAI visual skin from the user's style description. Use only when the AI Skin Designer kit supplies the structured skinpack workflow marker; do not use for ordinary theme or image requests.

netease-youdao/LobsterAI · 48 tokens