mermaid
Skill2 starsChanged 8 months agoMITView on GitHub
Guide for creating mermaid diagrams. This skill should be used when users want to create a mermaid diagram (or update an existing diagram).
30 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- blas1n/claude-skillstheir own version, first seen Oct 4, 2026
- bex-co/bextheir own version, first seen Sep 29, 2026
- wyattjoh/skillstheir own version, first seen Sep 27, 2026
- chujianyun/skillstheir own version, first seen Sep 25, 2026
- flowing-abyss/obsidian-vault-skillstheir own version, first seen Sep 19, 2026
- chrislacey89/skillstheir own version, first seen Sep 18, 2026
Used with
Projects with it also use ansible, plantuml and 1 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.
KubementatSkillansible
Ansible automation reference for playbooks, roles, inventory, variables, and modules. Includes Proxmox VE and Docker integration via community.general and community.docker collections. Use when writing playbooks, troubleshooting Ansible runs, or designing automation workflows. Triggers: ansible, playbook, inventory, role, task, handler, vars, jinja2, galaxy, proxmox_kvm, proxmox_lxc, docker_container, docker_compose.
Also in 3 projects that use this
xenodiumSkillplantuml
This skill should be used when the user invokes "/plantuml" to create a diagram from the current context using PlantUML and output the resulting image path.
Also in 3 projects that use this
luischanciSkillproofread
Run the proofreading protocol on manuscript files. Checks grammar, typos, overflow, consistency, and academic writing quality. Produces a report without editing files.
Also in 3 projects that use this
Other versions30 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- nilecui/SkillsBase★ 2799% same
- Kubementat/ai_agent_skills★ 297% same
Wrote their own version · 28
- chujianyun/skills★ 740same name
- bex-co/bex★ 569same name
- WH-2099/mermaid-skill★ 288same name
- xenodium/emacs-skills★ 142same name
- mgifford/accessibility-skills★ 50same name
- greedychipmunk/agent-skills★ 19same name
- ulises-jeremias/agent-toolkit★ 18same name
- eugeniosegala/claude-connoisseur★ 9same name
- flowing-abyss/obsidian-vault-skills★ 9same name
- linearuncle/linearuncleskills★ 8same name
18 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 repository36 other files it gives its agents.
- agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- create-agentSkill
- doc-writerSkill
- feynman-auditorSkill
- gh-issueSkill
- human-writingSkill
- nemesis-ogSkill
- nemesis-scanSkill
- outline-codeSkill
- report-to-pr-commentsSkill
- skill-creatorSkill
- solidity-security-scanSkill
- state-inconsistency-auditorSkill
- telx-reviewSkill
- tn-add-benchmarkSkill
- tn-bug-scanSkill
- tn-debug-e2eSkill
- tn-domain-consensusSkill
- tn-domain-contractsSkill
- tn-domain-epochSkill
- tn-domain-executionSkill
- tn-domain-networkingSkill
- tn-domain-storageSkill
- tn-domain-workerSkill
- tn-hardenSkill
- tn-nemesis-scanSkill
- tn-review-contractsSkill
- tn-reviewSkill
- tn-rust-engineerSkill
- tn-rust-skillsSkill
- tn-security-evalSkill
- tn-threat-modelSkill
- tn-write-crate-docSkill
- tn-write-e2eSkill
- tn-write-proptestSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
23 rules. 0 are common, 21 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 27 edited versions we read keep these.
21
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Follow these steps for every diagram creation/modification:
- Distinctive: line 20
Create syntactically correct Mermaid diagram code
- Distinctive: line 21
Use appropriate diagram type syntax
- Very specific: line 26
Write code to .mmd file
- Distinctive: line 28
Use kebab-case for filenames
- Distinctive: line 32
Check for syntax errors and warnings
- Distinctive: line 33
If validation fails, proceed to step 5
- Distinctive: line 50
Only render when user explicitly requests a preview/image
- Distinctive: line 91
When analyzing code to create diagrams:
- Distinctive: line 121
Use meaningful node IDs
- Distinctive: line 122
Add clear, concise labels
- Distinctive: line 124
Use classDefs for visual consistency
- Distinctive: line 127
Keep diagrams focused (split large diagrams into smaller ones)
- Distinctive: line 128
Use top-to-bottom or left-to-right orientation consistently
- Distinctive: line 129
Add comments in code for complex sections
- Distinctive: line 132
NEVER skip validation step
- Distinctive: line 133
Always fix errors before presenting to user
- Distinctive: line 134
Test rendered output when in doubt
- Very specific: line 138
If mmdc validation fails:
- Distinctive: line 139
Read error message carefully
- Distinctive: line 167
Default output format: SVG
- Distinctive: line 168
Always validate before presenting
- Distinctive: line 170
Only load example files when needed for specific diagram type
“Common” is measured: kept by at least 6 in 10 of the 27 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 Skill
This skill helps you create, validate, and render Mermaid diagrams from natural language descriptions, code analysis, or by editing existing diagrams.
Core Workflow
Follow these steps for every diagram creation/modification:
1. Understand the Request
- Identify the diagram type needed (flowchart, sequence, class, etc.)
- Extract key elements: entities, relationships, flow, hierarchy
- Determine if creating new, editing existing, or generating from code
2. Generate Mermaid Code
- Create syntactically correct Mermaid diagram code
- Use appropriate diagram type syntax
- Apply consistent naming and styling
- Refer to
examples/directory for type-specific syntax (load on-demand)
3. Save to File
- Write code to
.mmdfile - Generate meaningful filename based on diagram purpose (e.g.,
user-authentication-flow.mmd,database-schema.mmd) - Use kebab-case for filenames
4. Validate with CLI
- ALWAYS validate using:
mmdc -i <filename>.mmd - Check for syntax errors and warnings
- If validation fails, proceed to step 5
5. Auto-Correct Errors
- Analyze error messages from
mmdc - Common issues:
- Invalid syntax or keywords
- Missing quotes around labels with spaces
- Incorrect arrow syntax
- Malformed node definitions
- Automatically fix the code
- Re-save and re-validate
- Repeat until validation succeeds
6. Render on Request
- Default format: SVG
- Command:
mmdc -i <filename>.mmd -o <filename>.svg - Alternative formats: PNG (
-o <filename>.png), PDF (-o <filename>.pdf) - Only render when user explicitly requests a preview/image
Supported Diagram Types
Load examples from examples/ directory as needed:
Basic Diagrams:
- Flowchart (
examples/flowchart.md) - Sequence Diagram (
examples/sequence.md) - Class Diagram (
examples/class.md) - State Diagram (
examples/state.md) - Entity Relationship (
examples/er.md)
Planning & Management:
- Gantt Chart (
examples/gantt.md) - User Journey (
examples/journey.md) - Timeline (
examples/timeline.md) - Kanban (
examples/kanban.md)
Data Visualization:
- Pie Chart (
examples/pie.md) - XY Chart (
examples/xy-chart.md) - Quadrant Chart (
examples/quadrant.md) - Sankey (
examples/sankey.md) - Radar (
examples/radar.md) - Treemap (
examples/treemap.md)
Technical Diagrams:
- Git Graph (
examples/git.md) - C4 Diagram (
examples/c4.md) - Requirement Diagram (
examples/requirement.md) - Architecture (
examples/architecture.md) - Block Diagram (
examples/block.md) - Packet (
examples/packet.md)
Organizational:
- Mindmap (
examples/mindmap.md) - ZenUML (
examples/zenuml.md)
Code Analysis → Diagram
When analyzing code to create diagrams:
Class Diagrams:
- Extract classes, methods, properties, inheritance, interfaces
- Show relationships: inheritance, composition, aggregation
Sequence Diagrams:
- Track function calls, async operations, API interactions
- Show actors, lifelines, activation boxes
Flowcharts:
- Map control flow, conditionals, loops
- Show function entry/exit points
State Diagrams:
- Identify states from enums, state machines, status fields
- Map transitions and events
Templates
Common patterns available in templates/common-patterns.md (load on-demand):
- Standard flowchart structures
- API sequence patterns
- Database ER patterns
- Microservice architecture layouts
- State machine templates
Best Practices
Styling:
- Use meaningful node IDs
- Add clear, concise labels
- Apply subgraphs for grouping related elements
- Use classDefs for visual consistency
Readability:
- Keep diagrams focused (split large diagrams into smaller ones)
- Use top-to-bottom or left-to-right orientation consistently
- Add comments in code for complex sections
Validation:
- NEVER skip validation step
- Always fix errors before presenting to user
- Test rendered output when in doubt
Error Handling
If mmdc validation fails:
- Read error message carefully
- Identify line number and issue
- Apply fix (common fixes in examples)
- Re-validate
- Inform user only if repeated attempts fail
Output Format
Present to user:
Created: <filename>.mmd
<Show the mermaid code in a code block>
✓ Validated successfully with mermaid-cliIf rendered:
Created: <filename>.mmd
Rendered: <filename>.svg
[Show file paths]Notes
- Assume
mmdc(mermaid-cli) is installed and available - Default output format: SVG
- Always validate before presenting
- Fix errors autonomously
- Only load example files when needed for specific diagram type
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.

