Learn-skills.dev mermaid
Generate Mermaid diagrams for chatbot flows that render in Markdown, including choosing diagram types, producing valid Mermaid code blocks, and validating or rendering diagrams locally via the bundled scripts. Use when a user asks for chatbot flowcharts/sequence/state diagrams, wants Mermaid syntax, or needs to verify/render Mermaid without a web service.
install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/ahgraber/skills/mermaid" ~/.claude/skills/neversight-learn-skills-dev-mermaid && rm -rf "$T"
manifest:
data/skills-md/ahgraber/skills/mermaid/SKILL.mdsource content
Mermaid Diagrams for Chatbots
Use this skill to create Mermaid diagrams that render well in Markdown chat interfaces, validate their syntax locally, and render images without calling a web service.
Workflow
- Identify the diagram type (flowchart, sequenceDiagram, stateDiagram-v2) based on the request.
- Draft Mermaid code in a fenced Markdown block using
.mermaid - Follow formatting conventions in
.references/chatbot-mermaid-guidelines.md - Validate the diagram using
.scripts/validate_mermaid.py - If the user wants an image file, render with
.scripts/render_mermaid.py
Scripts
scripts/validate_mermaid.py- Validate Mermaid code by invoking the local Mermaid CLI (
).mmdc - Use when you need to check whether Mermaid parses without errors.
- Validate Mermaid code by invoking the local Mermaid CLI (
scripts/render_mermaid.py- Render Mermaid to SVG/PNG/PDF using the local Mermaid CLI (
).mmdc - Prefer SVG for Markdown renderers when image embedding is required.
- Render Mermaid to SVG/PNG/PDF using the local Mermaid CLI (
Notes
- These scripts expect
to be available on PATH (Mermaid CLI). If missing, instruct the user to install it locally; do not use the Mermaid web service.mmdc - Dependencies are managed via inline
script metadata in each Python script. Useuv
to bootstrap the Chromium binary via pyppeteer when needed.--install-chromium - Keep diagrams compact and readable in chat: avoid overly wide graphs, use short labels, and group related states.
- If the user asks for raw Markdown, return only the fenced
block unless they ask for extra explanation.mermaid