
Mermaid
- 3 installs
- 2.2k repo stars
- Updated July 27, 2026
- alibaba/loongcollector
mermaid is a Claude skill that defines conventions for writing GitHub-compatible Mermaid diagrams in documentation and code reviews.
About
This skill defines conventions for creating Mermaid diagrams in documentation and code review. A developer uses it to pick well-supported diagram types, use correct fenced code blocks and simple node IDs, quote labels, and avoid custom themes so GitHub renders them cleanly in light and dark mode. It focuses on keeping diagrams GitHub-compatible and error-free.
- Conventions for writing GitHub-compatible Mermaid diagrams
- Recommends well-supported diagram types and simple standard syntax
- Advises against custom themes so GitHub handles light/dark styling
Mermaid by the numbers
- 3 all-time installs (skills.sh)
- +1 installs in the week ending Jun 23, 2026 (Skillselion tracking)
- Ranked #1,268 of 1,879 Documentation skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
mermaid capabilities & compatibility
- Capabilities
- documentation
- Works with
- github
- Use cases
- documentation
- Pricing
- Free
What mermaid says it does
Mermaid diagram conventions. Use whenever diagrams are needed in documentation or code review.
DO NOT set themes (`%%{init: ...}`)
npx skills add https://github.com/alibaba/loongcollector --skill mermaidAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 3 |
|---|---|
| repo stars | ★ 2.2k |
| Last updated | July 27, 2026 |
| Repository | alibaba/loongcollector ↗ |
What it does
Write GitHub-compatible Mermaid diagrams for documentation using safe, well-supported syntax.
Who is it for?
Writers adding Mermaid diagrams to Markdown docs that must render correctly on GitHub
Skip if: Diagrams needing custom themes, classDef, or ::icon() syntax, which the skill says to avoid
When should I use this skill?
When diagrams are needed in documentation or code review
What you get
Mermaid diagrams that render reliably on GitHub in both light and dark mode
- GitHub-compatible Mermaid diagrams
By the numbers
- 8 diagram convention rules
Files
Mermaid Diagram Conventions
Rules for Creating Mermaid Diagrams
1. Use Correct Fenced Code Block: Always use ```mermaid ... ```
2. Stick to Well-Supported Diagram Types:
graph(flowcharts,TDpreferred for readability)sequenceDiagramclassDiagramstateDiagram-v2(prefer v2)erDiagrampie,gantt,mindmap(basic only)- Avoid very new or uncommon types
3. Simple Standard Syntax:
- Node IDs: Use simple alphanumeric IDs (
node1,processA). No spaces or special chars. - Labels: Use quotes for labels with spaces/punctuation/keywords.
- Good:
A["User Input"] --> B["Validate Data"]; - Bad:
A[User Input] --> B[Validate Data]; - Use standard arrows (
-->,---,==>) - Comments:
%%
4. Mindmap (GitHub compatible):
- Use basic indentation structure only
- NO
::icon()syntax (causes rendering errors) - Each node on its own line with correct indentation
5. Prefer Vertical Layouts: graph TD or graph TB for flowcharts (easier to read in Markdown)
6. Let GitHub Handle Styling:
- DO NOT set themes (
%%{init: ...}) - DO NOT use
classDeforstyle - GitHub auto-adapts to light/dark mode
7. Keep Diagrams Focused: Break complex diagrams into multiple simpler ones
8. Always Review Automated Edits: Tools may break Mermaid syntax, especially with indentation-heavy formats like mindmap
Related skills
FAQ
Should I set a Mermaid theme?
No, avoid %%{init: ...}, classDef, and style so GitHub auto-adapts to light and dark mode.
How should labels with spaces be written?
Use quotes, e.g. A["User Input"] --> B["Validate Data"].