Skip to content
Back to skills

Claude Code Mermaid

ASecurity

Draw or preview Mermaid diagrams (flowchart, sequence, state, class, ER) as Unicode art in the terminal. Use when explaining architecture, flows, state machines or data models, or when the user asks to render, preview or check a Mermaid diagram or a .mmd/.md file containing one.

  • 2 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added October 12, 2026
ai-agentsbashnode

Works with

  • claude code
  • terminal

Security analysis

A100/100

Scanned October 12, 2026

npx -y skills add gecm0/claude-code-mermaid --skill claude-code-mermaid --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Claude Code Mermaid?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Claude Code Mermaid
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gecm0-claude-code-mermaid/badge)](https://www.skillsdirectory.com/skills/gecm0-claude-code-mermaid)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: claude-code-mermaid
description: Draw or preview Mermaid diagrams (flowchart, sequence, state, class, ER) as Unicode art in the terminal. Use when explaining architecture, flows, state machines or data models, or when the user asks to render, preview or check a Mermaid diagram or a .mmd/.md file containing one.
allowed-tools: Bash(node ${CLAUDE_PLUGIN_ROOT}/scripts/claude-code-mermaid.mjs *)
---

# Claude Code Mermaid

Any ```` ```mermaid ```` block you write in a reply is replaced on the user's screen by its drawing (this plugin's MessageDisplay hook). To show a diagram, write the fence. Nothing else is needed. You keep seeing the source; the user sees the art.

Supported: `graph`/`flowchart` (TD, BT, LR, RL, subgraphs), `sequenceDiagram`, `stateDiagram`/`stateDiagram-v2`, `classDiagram`, `erDiagram`. Other types (gantt, pie, mindmap, …) are not drawn; do not pick them for terminal output.

The terminal is narrow. Prefer `TD` over `LR` for long chains and keep labels short, otherwise the user gets the source plus "wider than N columns" instead of a drawing.

To check a diagram before sending it, pipe it on stdin. To render a saved diagram or Markdown file, pass its path:

```bash
node ${CLAUDE_PLUGIN_ROOT}/scripts/claude-code-mermaid.mjs <<'EOF'
graph TD
A[Start] --> B[End]
EOF
node ${CLAUDE_PLUGIN_ROOT}/scripts/claude-code-mermaid.mjs path/to/file.md   # or a bare .mmd file
```

Exit code 1 plus `not rendered: <reason>` on stderr means the bundled renderer rejected the diagram or its output is too wide; in a reply, it remains source. Rendering is a preview, not strict Mermaid syntax validation: malformed or unsupported constructs may be partially ignored.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.