skills/mermaid-creator/SKILL.md
Use when creating or converting Mermaid diagrams (for example flowcharts, sequence diagrams, ER diagrams, and Gantt charts), including exporting to SVG for docs or slides.
npx skillsauth add narumiruna/agent-skills mermaid-creatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create professional diagrams using Mermaid syntax for documentation, architecture design, and data modeling.
.mmd fileChoose 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.
flowchart TD
A[Start] --> B{Decision}
B -->|Yes| C[Process]
B -->|No| D[Alternative]
C --> E[End]
D --> E
sequenceDiagram
participant Client
participant Server
participant DB
Client->>Server: Request
Server->>DB: Query
DB-->>Server: Data
Server-->>Client: Response
classDiagram
class User {
+String name
+String email
+login()
}
class Post {
+String title
+String content
+publish()
}
User "1" --> "*" Post : creates
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.
npm install -g @mermaid-js/mermaid-cli
mmdc -i diagram.mmd -o diagram.svg
mmdc -i input1.mmd -i input2.mmd -o output/
mmdc -i diagram.mmd -o diagram.svg -t dark -b transparent
Options:
-t - Theme (default, dark, forest, neutral)-b - Background color or transparent-w - Width-H - Height.mmd files for each diagram%% for Mermaid comments.mmd source and generated SVGtransparent background to match slide themesUse flowcharts with diamond decision nodes:
flowchart TD
Input[Get Input] --> Validate{Valid?}
Validate -->|Yes| Process[Process]
Validate -->|No| Error[Error]
Use sequence diagrams for temporal interactions:
sequenceDiagram
User->>System: Action
System->>Database: Query
Database-->>System: Result
System-->>User: Response
Use ER diagrams for database schemas or class diagrams for object models.
Use state diagrams for state machines or flowcharts for process flows.
Run mmdc -i file.mmd -o output.svg to see specific error messages.
Common issues:
A-->B should be A --> B in some contexts)mmdc --versionnpm install -g @mermaid-js/mermaid-cli@latestmmdc -w 1920 for high-resolution outputtransparent for flexible embeddingMost diagram types support:
See individual diagram reference files for syntax and examples.
development
Maintains concise repository MEMORY.md notes for gotchas, stale memory corrections, and durable user preferences. Use at the start of repository conversations, when the user mentions MEMORY.md, when an error should be remembered to avoid repeating it, or when MEMORY.md content may be wrong.
testing
Use only when the user explicitly names the work-log-writer skill; never auto-activate from generic work log, daily log, EOD summary, status update, or date-range summary requests.
development
Use when implementing non-trivial code changes that should follow TDD (write a failing test first, make the smallest passing change, then refactor safely).
tools
Use when designing, implementing, reviewing, or debugging Codex CLI hooks, including `hooks.json`, `.codex/hooks.json`, feature-flag setup, matcher behavior, event-specific stdin/stdout payloads, and hook scripts for `SessionStart`, `PreToolUse`, `PostToolUse`, `UserPromptSubmit`, or `Stop`.