Mermaid Diagram Generator
Turns a described system or flow into a valid, readable Mermaid diagram embedded in Markdown, with the right diagram type.
What this skill does
Key features
- Picks the right diagram type: flowchart, sequence, or ER
- Emits valid Mermaid syntax inside a fenced code block
- Keeps labels short and the layout readable
- Sanitizes labels so special characters do not break parsing
Use cases
- Sketching a request flow for a design doc
- Turning a described data model into an ER diagram
- Adding a sequence diagram to a README
SKILL.md
The skill definition — its metadata and the exact instructions an agent follows. Copy it into a SKILL.md file in your agent's skills folder.
| name | mermaid-diagram |
|---|---|
| description | Generate a valid, readable Mermaid diagram in Markdown from a described system, choosing the appropriate diagram type. |
| allowed-tools | Read, Write |
| output | markdown with mermaid code block |
| diagram_types | flowchart, sequence, er |
Musts
- Choose the diagram type (flowchart, sequence, or ER) that matches the described intent.
- Emit only valid Mermaid syntax inside a fenced ```mermaid code block.
- Keep node and edge labels short so the diagram stays readable.
- Escape or quote characters that would break Mermaid parsing.
- Represent only the entities and relationships the user actually described.
Guidelines
- Prefer top-down flowcharts for processes and left-right for pipelines.
- Use consistent, meaningful node IDs so the source stays editable.
- Limit each diagram to one clear concern; split large systems into several.
- Add a one-line caption above the block explaining what it shows.
Output format
<one-line caption>
```mermaid
flowchart TD
A[Client] --> B{Auth?}
B -- yes --> C[Handler]
B -- no --> D[401]
FAQ
Which diagram types are supported?
Flowcharts, sequence diagrams, and entity-relationship diagrams. It chooses the type that best fits what you described, or uses the one you request.
Is the output guaranteed to render?
It produces syntactically valid Mermaid and escapes risky characters in labels. Preview it in your Mermaid renderer, since node counts and themes can affect layout.
Before running any skill, read its instructions and the tools it's allowed to use, and test it on a safe target first. See LLM security best practices.