Mermaid Creator
by narumiruna
Create Mermaid diagrams for technical documentation, system design, and data modeling. Use when creating flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, Gantt charts, git graphs, or any other Mermaid-supported diagram type. Supports both creating new diagrams from descriptions and converting diagrams to SVG format for embedding in presentations or documents.
Skill Details
Repository Files
81 files in this skill directory
name: mermaid-creator description: Create Mermaid diagrams for technical documentation, system design, and data modeling. Use when creating flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, Gantt charts, git graphs, or any other Mermaid-supported diagram type. Supports both creating new diagrams from descriptions and converting diagrams to SVG format for embedding in presentations or documents.
Mermaid Creator
Create professional diagrams using Mermaid syntax for documentation, architecture design, and data modeling.
Workflow
- Choose diagram type - Select the appropriate diagram based on what needs to be visualized
- Create .mmd file - Write Mermaid syntax in a
.mmdfile - Validate syntax - Check syntax is correct (Mermaid CLI will report errors)
- Convert to SVG (optional) - Generate SVG for embedding in presentations or documents
Diagram Type Selection
Choose the right diagram type for your use case:
| Type | Use Case | Reference |
|---|---|---|
| Flowchart | Processes, workflows, decision trees | flowchart.md |
| Sequence | API interactions, system communications, message flows | sequence.md |
| Class | Object-oriented design, data models, relationships | class.md |
| State | State machines, workflow states, system states | state.md |
| ER | Database schemas, entity relationships | er.md |
| Gantt | Project timelines, task scheduling | other-types.md |
| Pie | Data distribution, percentages | other-types.md |
| Git | Git history, branching strategies | other-types.md |
| Journey | User experience flows | other-types.md |
| Quadrant | 2D comparison, prioritization | other-types.md |
| Timeline | Chronological events | other-types.md |
Load references as needed: Each reference file contains syntax, patterns, examples, and best practices for that diagram type.
Quick Start Examples
Flowchart
flowchart TD
A[Start] --> B{Decision}
B -->|Yes| C[Process]
B -->|No| D[Alternative]
C --> E[End]
D --> E
Sequence Diagram
sequenceDiagram
participant Client
participant Server
participant DB
Client->>Server: Request
Server->>DB: Query
DB-->>Server: Data
Server-->>Client: Response
Class Diagram
classDiagram
class User {
+String name
+String email
+login()
}
class Post {
+String title
+String content
+publish()
}
User "1" --> "*" Post : creates
Example Files
The skill includes ready-to-use .mmd example files in assets/examples/ that can be copied and modified:
assets/examples/
├── flowchart/ # 10 flowchart examples
│ ├── basic.mmd
│ ├── node-shapes.mmd
│ ├── connections.mmd
│ ├── process-flow.mmd
│ ├── decision-tree.mmd
│ └── ...
├── sequence/ # 12 sequence diagram examples
│ ├── basic.mmd
│ ├── rest-api.mmd
│ ├── authentication-flow.mmd
│ └── ...
├── class/ # 13 class diagram examples
│ ├── basic.mmd
│ ├── inheritance.mmd
│ ├── interface.mmd
│ └── ...
├── state/ # 13 state diagram examples
│ ├── basic.mmd
│ ├── order-processing.mmd
│ ├── authentication.mmd
│ └── ...
├── er/ # 10 ER diagram examples
│ ├── basic.mmd
│ ├── blog-system.mmd
│ ├── ecommerce.mmd
│ └── ...
└── other/ # 16 other diagram type examples
├── gantt-basic.mmd
├── pie-basic.mmd
├── git-feature-branch.mmd
├── journey-shopping.mmd
├── quadrant-basic.mmd
├── timeline-basic.mmd
└── ...
Usage: Copy example files as templates for your diagrams. All examples are tested and ready to use with the Mermaid CLI.
Mermaid CLI
Installation
npm install -g @mermaid-js/mermaid-cli
Convert to SVG
mmdc -i diagram.mmd -o diagram.svg
Batch Conversion
mmdc -i input1.mmd -i input2.mmd -o output/
With Configuration
mmdc -i diagram.mmd -o diagram.svg -t dark -b transparent
Options:
-t- Theme (default, dark, forest, neutral)-b- Background color ortransparent-w- Width-H- Height
Best Practices
General Guidelines
- Choose the right diagram type - Match the diagram to the information structure
- Keep it simple - Split complex diagrams into multiple focused diagrams
- Use descriptive labels - Avoid abbreviations unless well-known
- Be consistent - Use consistent naming and styling within a diagram
- Validate syntax - Run through Mermaid CLI to catch errors early
For Documentation
- Create separate
.mmdfiles for each diagram - Store diagrams near the documentation they support
- Include comments in complex diagrams using
%%for Mermaid comments - Generate SVG for static documentation
- Commit both
.mmdsource and generated SVG
For Presentations
- Use high contrast colors for visibility
- Keep text large and readable
- Test diagram rendering at presentation size
- Use
transparentbackground to match slide themes - Prefer SVG over PNG for crisp rendering
Performance
- Large diagrams (>50 nodes) may render slowly
- Split large flowcharts using off-page connectors
- For ER diagrams with many entities, show only relevant relationships
- Consider using subgraphs to organize complex diagrams
Common Patterns
Decision Logic
Use flowcharts with diamond decision nodes:
flowchart TD
Input[Get Input] --> Validate{Valid?}
Validate -->|Yes| Process[Process]
Validate -->|No| Error[Error]
System Interactions
Use sequence diagrams for temporal interactions:
sequenceDiagram
User->>System: Action
System->>Database: Query
Database-->>System: Result
System-->>User: Response
Data Models
Use ER diagrams for database schemas or class diagrams for object models.
Process Workflows
Use state diagrams for state machines or flowcharts for process flows.
Troubleshooting
Syntax Errors
Run mmdc -i file.mmd -o output.svg to see specific error messages.
Common issues:
- Missing spaces around arrows (
A-->Bshould beA --> Bin some contexts) - Unclosed quotes in labels
- Invalid characters in IDs (use alphanumeric + underscore)
- Wrong diagram type declaration
Rendering Issues
- Check Mermaid CLI version:
mmdc --version - Update to latest:
npm install -g @mermaid-js/mermaid-cli@latest - Try different themes if elements overlap
- Reduce diagram complexity
SVG Quality
- Use
mmdc -w 1920for high-resolution output - Set background to
transparentfor flexible embedding - Test generated SVG in target environment
Advanced Features
Most diagram types support:
- Styling: Custom colors, fonts, and borders
- Subgraphs/Grouping: Organize related elements
- Notes: Add explanatory text
- Direction: Change layout orientation
- Classes: Reusable style definitions
See individual diagram reference files for syntax and examples.
Related Skills
Xlsx
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
Clickhouse Io
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
Clickhouse Io
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
Analyzing Financial Statements
This skill calculates key financial ratios and metrics from financial statement data for investment analysis
Data Storytelling
Transform data into compelling narratives using visualization, context, and persuasive structure. Use when presenting analytics to stakeholders, creating data reports, or building executive presentations.
Team Composition Analysis
This skill should be used when the user asks to "plan team structure", "determine hiring needs", "design org chart", "calculate compensation", "plan equity allocation", or requests organizational design and headcount planning for a startup.
Startup Financial Modeling
This skill should be used when the user asks to "create financial projections", "build a financial model", "forecast revenue", "calculate burn rate", "estimate runway", "model cash flow", or requests 3-5 year financial planning for a startup.
Kpi Dashboard Design
Design effective KPI dashboards with metrics selection, visualization best practices, and real-time monitoring patterns. Use when building business dashboards, selecting metrics, or designing data visualization layouts.
Dbt Transformation Patterns
Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.
Startup Metrics Framework
This skill should be used when the user asks about "key startup metrics", "SaaS metrics", "CAC and LTV", "unit economics", "burn multiple", "rule of 40", "marketplace metrics", or requests guidance on tracking and optimizing business performance metrics.
