mermaid-diagrams
Skill223 starsChanged 43 days agoMITView on GitHub
Creating and refining Mermaid diagrams with live reload or as shareable Claude artifacts. Use when users want flowcharts, sequence diagrams, class diagrams, ER diagrams, state diagrams, or any other Mermaid visualization, and when writing, editing, restyling, or reviewing a Mermaid block in a Markdown file. Provides best practices for syntax, styling, and the iterative workflow using mermaid_preview and mermaid_save tools.
69 other projects use a version of this.
Adopted by
Most recently taken up by
- vjrivmon/Setup-Software-IAtheir own version, first seen Nov 29, 2026
- Dannykkh/skill-olympustheir own version, first seen Nov 29, 2026
- jae-labs/skillstheir own version, first seen Nov 28, 2026
- compozy/compozytheir own version, first seen Nov 28, 2026
- flopperj/dotfiles-coretheir own version, first seen Nov 23, 2026
- radiovisual/claude-skillstheir own version, first seen Nov 16, 2026
Used with
Projects with it also use analytics-metrics, aws-account-management and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
hoodiniSkillanalytics-metrics
Build data visualization and analytics dashboards. Use when creating charts, KPI displays, metrics dashboards, or data visualization components. Triggers on analytics, dashboard, charts, metrics, KPI, data visualization, Recharts.
Also in 3 projects that use this
hoodiniSkillaws-account-management
Manage AWS accounts, organizations, IAM, and billing. Use when setting up AWS Organizations, managing IAM policies, controlling costs, or implementing multi-account strategies. Triggers on AWS Organizations, AWS IAM, AWS billing, Cost Explorer, SCPs, multi-account, AWS SSO, Identity Center.
Also in 3 projects that use this
MongoDBSkillmongodb
Front door for MongoDB and MongoDB Atlas. Use it before answering which database, MongoDB deployment, Atlas tier, or database hosting to use, even for advice-only questions. MongoDB updates frequently, so check this skill first. Also use it before setting up, provisioning, or connecting to MongoDB or Atlas, or creating a throwaway or prototype database. Also use when the user mentions "MongoDB", "Atlas", "MongoDB quickstart", "document database", "NoSQL", "BSON", "Mongoose", "PyMongo", "RAG", "Vector Search", "aggregation pipeline", "change streams", or "backend", and for general MongoDB development questions (CRUD, transactions, drivers and ODMs, server versions) from current docs. If a more specific MongoDB skill is installed and matches the task (schema design, query writing or optimization, search and vector search, stream processing, connection tuning, MCP server setup, queryable encryption sizing), load that instead; if it isn't installed, use this skill, which routes to it.
Also in 4 projects that use this
lmuntaner-bahSkillprofessional-communication
Guide technical communication for software developers. Covers email structure, team messaging etiquette, meeting agendas, and adapting messages for technical vs non-technical audiences. Use when drafting professional messages, preparing meeting communications, or improving written communication.
Also in 3 projects that use this
imehrSkillrailway
Railway.com deployment and management - deployment, logs, migrations, troubleshooting, monorepo strategies, security, and CLI reference. Use when deploying to Railway, configuring services, managing environment variables, or debugging deployment issues.
Also in 3 projects that use this
- +7 more from hoodini
Other versions69 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 69
- QuivrHQ/quivr★ 40ksame name
- The-Vibe-Company/quivr★ 40ksame name
- langchain-ai/openwiki★ 18ksame name
- compozy/compozy★ 2.9ksame name
- pedronauck/skills★ 659same name
- openclaw/openclaw-enterprise★ 493same name
- hoodini/ai-agents-skills★ 303same name
- shep-ai/shep★ 291same name
- magnus919/agent-skills★ 197same name
- sammcj/agentic-coding★ 174same name
59 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- docs/llms.txtllms.txt
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. 0 are common, 12 are distinctive, and 12 are very specific to this project.
0
Common
Most of the 65 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Create Initial Diagram: Use mermaid_preview to render and open the diagram with live reload
- Very specific: line 15
Save Final Version: Use mermaid_save when satisfied
- Distinctive: line 21
Always use this when creating or updating diagrams:
- Distinctive: line 33
Use different IDs for multiple simultaneous diagrams
- Distinctive: line 38
Use after the diagram is finalized:
- Very specific: line 46
When the user asks for an artifact or a shareable page, call mermaid_preview with mode: "artifact".
- Very specific: line 49
Keep passing mode: "artifact" on every later call for that diagram
- Very specific: line 50
After every refinement, call mermaid_preview with the same preview_id, then republish the same path so the existing artifact URL is updated …
- Distinctive: line 51
Never publish a different path for the same diagram.
- Very specific: line 140
Use descriptive names: architecture, auth-flow, data-model
- Distinctive: line 141
Keep the same ID during refinements
- Distinctive: line 142
Use different IDs for concurrent diagrams
- Very specific: line 151
Use transparent background for docs, white for standalone
- Distinctive: line 178
When a user requests a diagram:
- Very specific: line 187
Create with preview: Use descriptive preview_id, start with good defaults
- Very specific: line 188
Iterate: Keep same preview_id, explain changes
- Very specific: line 189
Save: Ask where/what format, use mermaid_save
- Distinctive: line 193
Always preview diagrams, don't just generate code
- Distinctive: line 194
Use sensible defaults without asking
- Distinctive: line 201
Syntax errors: Check quotes, arrow syntax, keywords
- Distinctive: line 204
Colors not working: Verify CSS color format; remember sequence diagrams don't support styles
- Very specific: line 212
Keep each <br/> line short, about 25 characters.
- Very specific: line 213
When the diagram grows too wide, switch the direction (LR or TB) before shortening labels
- Distinctive: line 214
Keep edges off subgraph titles: link a whole subgraph once instead of each node inside it
“Common” is measured: kept by at least 6 in 10 of the 65 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Mermaid Diagram Expert
You are an expert at creating, refining, and optimizing Mermaid diagrams using the MCP server tools.
Core Workflow
- Create Initial Diagram: Use
mermaid_previewto render and open the diagram with live reload - Iterative Refinement: Make improvements - the browser will auto-refresh
- Save Final Version: Use
mermaid_savewhen satisfied
Tool Usage
mermaid_preview
Always use this when creating or updating diagrams:
diagram: The Mermaid codepreview_id: Descriptive kebab-case ID (e.g.,auth-flow,architecture)format: Usesvgfor live reload (default)theme:default,forest,dark, orneutralbackground:white,transparent, or hex colorssize,scale: Adjust for quality/size
Key Points:
- Reuse the same
preview_idfor refinements to update the same browser tab - Use different IDs for multiple simultaneous diagrams
- Live reload only works with SVG format
mermaid_save
Use after the diagram is finalized:
save_path: Where to save (e.g.,./docs/diagram.svg)preview_id: Must match the preview ID used earlierformat: Must match format from preview
Artifact mode
When the user asks for an artifact or a shareable page, call mermaid_preview with mode: "artifact". It does not open a browser. Instead its response contains an Artifact page: path.
- Publish that path with the Artifact tool right away
- Keep passing
mode: "artifact"on every later call for that diagram - After every refinement, call
mermaid_previewwith the samepreview_id, then republish the same path so the existing artifact URL is updated in place - Never publish a different path for the same diagram; that would create a new artifact
- Share the artifact URL with the user once, and mention that later updates appear at the same URL
Diagram Types
Flowcharts (graph or flowchart)
Direction: LR, TB, RL, BT
graph LR
A[Start] --> B{Decision}
B -->|Yes| C[Action]
B -->|No| D[End]
style A fill:#e1f5ff
style C fill:#d4eddaSequence Diagrams (sequenceDiagram)
⚠️ Do NOT use style statements - not supported
sequenceDiagram
participant User
participant App
participant API
User->>App: Login
App->>API: Authenticate
API-->>App: Token
App-->>User: SuccessClass Diagrams (classDiagram)
classDiagram
class User {
+String name
+String email
+login()
}
class Order {
+int id
+Date created
}
User "1" --> "*" OrderEntity Relationship (erDiagram)
erDiagram
USER ||--o{ ORDER : places
ORDER ||--|{ LINE_ITEM : contains
USER {
int id PK
string email
string name
}State Diagrams (stateDiagram-v2)
stateDiagram-v2
[*] --> Idle
Idle --> Processing : start
Processing --> Complete : finish
Complete --> [*]Gantt Charts (gantt)
gantt
title Project Timeline
section Phase 1
Task 1 :a1, 2024-01-01, 30d
Task 2 :after a1, 20dBest Practices
Preview IDs
- Use descriptive names:
architecture,auth-flow,data-model - Keep the same ID during refinements
- Use different IDs for concurrent diagrams
Themes & Styling
default: Clean, professionalforest: Green tonesdark: Dark backgroundneutral: Grayscale
Use transparent background for docs, white for standalone
Common Patterns
System Architecture:
graph TB
Client[Web App]
API[API Gateway]
DB[(Database)]
Client --> API --> DBAuthentication Flow:
sequenceDiagram
User->>App: Login Request
App->>Auth: Validate
Auth-->>App: JWT Token
App-->>User: Access GrantedUser Interaction
When a user requests a diagram:
- Clarify if needed: What type? What level of detail?
- Choose diagram type:
- Process/workflow → Flowchart
- System interactions → Sequence
- Code structure → Class
- Database → ER
- Timeline → Gantt
- Create with preview: Use descriptive
preview_id, start with good defaults - Iterate: Keep same
preview_id, explain changes - Save: Ask where/what format, use
mermaid_save
Proactive Behavior
- Always preview diagrams, don't just generate code
- Use sensible defaults without asking
- Reuse preview_id for refinements
- Suggest improvements when you see opportunities
- Explain your diagram type choice briefly
Common Issues
Syntax errors: Check quotes, arrow syntax, keywords Layout issues: Try different directions (LR vs TB) Text overlap: Increase dimensions or shorten labels Colors not working: Verify CSS color format; remember sequence diagrams don't support styles
Diagrams in Markdown Files
A mermaid code block inside a document follows the same workflow:
- Preview the block with
mermaid_previewafter every change, and look at the result before reporting - On light fills, set a dark text color in
classDeforstyle(for examplecolor:#0f172a), so labels stay readable - Keep each
<br/>line short, about 25 characters. A longer line wraps again and leaves orphan words - When the diagram grows too wide, switch the direction (
LRorTB) before shortening labels - Keep edges off subgraph titles: link a whole subgraph once instead of each node inside it
Example Interaction
User: "Create an auth flow diagram"
You: "I'll create a sequence diagram showing the authentication flow." [Use mermaid_preview with preview_id="auth-flow"]
User: "Add database and error handling"
You: "I'll add database interaction and error paths." [Use mermaid_preview with same preview_id - browser auto-refreshes, or republish the artifact page in artifact mode]
User: "Save it"
You: "Saving to ./docs/auth-flow.svg" [Use mermaid_save]
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

