mermaid

Create syntax-verified Mermaid architecture diagrams for systems and dependency flows.

275|32|Updated Oct 2, 2020
One-click install
npx skills add https://github.com/bex-co/beancount-io --skill mermaid-bex-co
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mermaid
Source: https://github.com/bex-co/beancount-io/tree/main/.agents/skills/mermaid
Command: npx skills add https://github.com/bex-co/beancount-io --skill mermaid-bex-co

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @mermaid-js/mermaid-cli.

What problem does it solve? Hand-written Mermaid diagrams often contain syntax errors that break rendering, and architecture diagrams drawn from guesswork misrepresent how a system actually works. This Skill produces concise Mermaid diagrams whose syntax is verified with the official mermaid-cli before delivery. ## Core Features & Use Cases - Verified Syntax: Every diagram is written to a scratch file and validated with @mermaid-js/mermaid-cli before being returned, so broken syntax never reaches the user. - Architecture Conventions: Enforces consistent notation — boxes for services, cylinders for datastores, triangles for humans, arrows showing dependency direction, and subgraphs for real boundaries like clusters or trust zones. - Repo-Grounded Diagrams: When diagramming the current repository, it reads AGENTS.md, package docs, and ADRs first instead of guessing. - Use Case: Ask for a diagram of your deployment pipeline, and receive a verified Mermaid flowchart showing services, datastores, and dependency edges that renders correctly in any Markdown viewer. ## Quick Start Ask the agent to draw a Mermaid architecture diagram of a specific component or system, for example: diagram the request flow between the web app, API, and database.

Frequently Asked Questions about mermaid

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Mermaid architecture diagram for my repository?

Describe the component or system you want diagrammed and the Skill reads the repo's AGENTS.md, package docs, and ADRs first, then produces a verified Mermaid flowchart. Boxes represent services, cylinders datastores, and arrows show dependency direction.

How do I validate Mermaid diagram syntax before rendering?

Write the diagram body to a .mmd file and run npx -y @mermaid-js/[email protected] -i file.mmd -o file.svg. An exit code of 0 confirms the syntax is valid; parse errors indicate what to fix.

Why does my Mermaid diagram fail to render?

Common causes are unquoted labels containing parentheses, brackets, or arrow-like text, naming a node bare 'end' or 'graph', and subgraph titles with spaces lacking quotes. Quote such labels and titles to fix parsing.

What Mermaid diagram type should I use for system architecture?

Use flowchart TB (top-bottom) by default, switching to LR only when the graph is much wider than deep. Use subgraphs only for real boundaries like clusters, networks, or trust zones, and label edges only when the relationship is not obvious.

Can Mermaid diagrams show manual processes alongside running services?

Yes, but never draw a manual procedure as a peer box of running infrastructure. Give runbook or recovery flows their own subgraph whose title states it is manual and where it runs, with the human actor drawn as a triangle inside.