mermaid-diagrams
Skill214 starsChanged 6 months agoMITView on GitHub
Creating and refining Mermaid diagrams with live reload. Use when users want flowcharts, sequence diagrams, class diagrams, ER diagrams, state diagrams, or any other Mermaid visualization. Provides best practices for syntax, styling, and the iterative workflow using mermaid_preview and mermaid_save tools.
41 other projects use a version of this.
Adopted by
Most recently taken up by
- KarhouTam/agent-skillstheir own version, first seen Oct 5, 2026
- compozy/compozytheir own version, first seen Oct 1, 2026
- gigio1023/agent-skillstheir own version, first seen Sep 29, 2026
- transon-top/skillstheir own version, first seen Sep 28, 2026
- langchain-ai/openwikitheir own version, first seen Sep 23, 2026
- ZeroTokenClaw/agents-skillstheir own version, first seen Sep 21, 2026
Used with
Projects with it also use backend-to-frontend-handoff-docs, lesson-learned 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.
softaworksSkillbackend-to-frontend-handoff-docs
Create API handoff documentation for frontend developers. Use when backend work is complete and needs to be documented for frontend integration, or user says 'create handoff', 'document API', 'frontend handoff', or 'API documentation'.
Also in 3 projects that use this
softaworksSkilllesson-learned
Analyze recent code changes via git history and extract software engineering lessons. Use when the user asks 'what is the lesson here?', 'what can I learn from this?', 'engineering takeaway', 'what did I just learn?', 'reflect on this code', or wants to extract principles from recent work.
Also in 3 projects that use this
SupabaseSkillcopywriting
Write or audit UI copy (buttons, labels, empty states, error messages, tooltips, form text) anywhere in the monorepo. Load it before shipping or reviewing any user-facing text — including when copy is incidental to the task, like a new feature that adds buttons, toasts, dialogs, or validation messages.
Also in 5 projects that use this
MicrosoftSkillskill-creator
Guide for creating effective GitHub Copilot skills (.github/skills/) in this repository. Use when creating a new skill, updating an existing skill, or when asked about skill structure, format, or best practices for the vscode-documentdb project.
Also in 7 projects that use this
VercelSkillagent-browser
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.
Also in 3 projects that use this
VercelSkillvercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Also in 3 projects that use this
- +2 more from softaworks
- +1 more from vercel-labs
Other versions41 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 41
- langchain-ai/openwiki★ 17ksame name
- compozy/compozy★ 2.8ksame name
- softaworks/agent-toolkit★ 2.5ksame name
- pedronauck/skills★ 633same name
- hoodini/ai-agents-skills★ 281same name
- shep-ai/shep★ 262same name
- cohen-liel/hivemind★ 110same name
- magnus919/agent-skills★ 109same name
- ccheney/robust-skills★ 60same name
- justinwetch/Skill-RSI★ 22same name
31 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
17 rules. 0 are common, 10 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 39 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
7
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 130
Use descriptive names: architecture, auth-flow, data-model
- Distinctive: line 131
Keep the same ID during refinements
- Distinctive: line 132
Use different IDs for concurrent diagrams
- Very specific: line 141
Use transparent background for docs, white for standalone
- Distinctive: line 168
When a user requests a diagram:
- Very specific: line 177
Create with preview: Use descriptive preview_id, start with good defaults
- Very specific: line 178
Iterate: Keep same preview_id, explain changes
- Very specific: line 179
Save: Ask where/what format, use mermaid_save
- Distinctive: line 183
Always preview diagrams, don't just generate code
- Distinctive: line 184
Use sensible defaults without asking
- Distinctive: line 191
Syntax errors: Check quotes, arrow syntax, keywords
- Distinctive: line 194
Colors not working: Verify CSS color format; remember sequence diagrams don't support styles
“Common” is measured: kept by at least 6 in 10 of the 39 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 colorswidth,height,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
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
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]
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.

