diagram-maker
Skill48 starsChanged 5 months agoMITView on GitHub
Generate syntactically correct Mermaid diagrams from natural language. Covers flowcharts, sequence diagrams, class diagrams, ER diagrams, state diagrams, Gantt charts, pie charts, and more. Produces clean, render-ready output that avoids the common LLM parsing failures.
15 other projects use a version of this.
Adopted by
Most recently taken up by
- OpenClawAndroid/openclaw-android-assistanttheir own version, first seen Oct 17, 2026
- bighamx/openclaw-android-node-apktheir own version, first seen Oct 9, 2026
- molt-bot/clawdbottheir own version, first seen Oct 8, 2026
- steipete/warelaytheir own version, first seen Oct 8, 2026
- friuns2/openclaw-android-assistanttheir own version, first seen Oct 8, 2026
- moltbot/clawdbottheir own version, first seen Oct 8, 2026
Used with
Projects with it also use discord-e2e, openclaw-repair-sweep and 10 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.
molt-botSkilldiscord-e2e
Test Discord with Convex-leased QA bots: check credentials without a Gateway, exercise owned messages, or prove OpenClaw replies, files, threads, reactions, streaming, and typing. Distinguish API and Gateway evidence from manual user interactions.
Also in 10 projects that use this
molt-botSkillopenclaw-repair-sweep
Run scoped OpenClaw issue/PR repair campaigns: coordinate workers, prove root causes, and land or close verified work under the requested authority.
Also in 10 projects that use this
clawdbotSkillopenclaw-performance
Performance work in OpenClaw: a slow or heavy flow (latency, CPU, memory, SQL, RPC, renders), writing or reviewing a perf PR, or adding a cache. Count the work, delete waste first, cache last.
Also in 7 projects that use this
clawdbotSkillplugin-sdk-impact
Count Plugin SDK consumers across live ClawHub releases and bundled OpenClaw plugins before deprecation, removal, or behavior changes; supports public release-date filters.
Also in 7 projects that use this
supermansuper563-opsSkillauto-qa
Continuously audit, live-test, and stress-test the current OpenClaw codebase across at least ten independently scoped subsystem lanes; default to 100 independently verified, landed root-cause fixes, maintain an evidence-backed report, and announce each merged pull request immediately. Use for OpenClaw-wide autonomous QA, live-provider campaigns, gateway, CLI, web, plugin, native-app, scenario, packaging, and extended soak testing.
Also in 10 projects that use this
clawsoulsSkillchannel-message-flows
Use when running QA Lab channel message flow evidence.
Also in 10 projects that use this
- +2 more from molt-bot
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- moltbot/clawdbot★ 394ksame name
- steipete/warelay★ 394ksame name
- steipete/clawdis★ 394ksame name
- moltbot/moltbot★ 394ksame name
- clawdbot/clawdbot★ 394ksame name
- openclaw/openclaw★ 394ksame name
- molt-bot/clawdbot★ 391ksame name
- OpenBMB/PilotDeck★ 5ksame name
- friuns2/openclaw-android-assistant★ 573same name
- OpenClawAndroid/openclaw-android-assistant★ 556same name
5 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 repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-hardeningSkill
- api-builderSkill
- arxiv-watcherSkill
- data-analystSkill
- docker-managerSkill
- github-workflowSkill
- google-workspaceSkill
- hermeshub-reviewerSkill
- hermes-workspaceSkill
- notion-integrationSkill
- paperclipSkill
- project-plannerSkill
- react-reasoningSkill
- relay-for-telegramSkill
- scraplingSkill
- security-auditorSkill
- Skill FactorySkill
- slack-botSkill
- synapse-swarmSkill
- test-runnerSkill
- web-researcherSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
25 rules. 0 are common, 13 are distinctive, and 12 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
13
Distinctive
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 49
If the diagram exceeds 30 nodes, split into multiple focused diagrams
- Very specific: line 68
Default to flowchart TD (top-down) when the type is ambiguous.
- Very specific: line 97
Never use <br/>, <b>, <i>, or any HTML inside node labels.
- Distinctive: line 106
If the renderer supports Markdown strings (GitHub does), use backtick syntax:
- Very specific: line 117
Never use these as bare node IDs: end, graph, subgraph, style, class, click, link, default.
- Distinctive: line 129
Every opening bracket must have a closing match.
- Distinctive: line 154
Always quote edge labels that contain special characters:
- Very specific: line 162
Every subgraph MUST have a matching end.
- Very specific: line 229
Use participant aliases to keep messages short
- Very specific: line 231
Use activate/deactivate for lifelines
- Very specific: line 232
Use Note over A,B: text for annotations
- Very specific: line 233
Use alt/else/end for conditional flows
- Very specific: line 234
Use loop/end for repeated interactions
- Distinctive: line 312
When the user provides a broken Mermaid diagram:
- Very specific: line 324
Never output Mermaid without a fenced code block ( `mermaid )
- Distinctive: line 325
Never assume the renderer supports HTML — always use quoted labels
- Distinctive: line 326
Never exceed 50 nodes — the diagram becomes unreadable
- Very specific: line 327
Never use graph keyword — always use flowchart (superset with more features)
- Distinctive: line 328
Never mix diagram types in a single code block
- Distinctive: line 329
Always test mental model: "Would a Mermaid parser see this as code or text?"
- Distinctive: line 332
Every opening bracket has a matching close
- Very specific: line 333
Every subgraph has a matching end
- Distinctive: line 334
No bare special characters in labels (all quoted)
- Distinctive: line 335
No HTML tags anywhere in the diagram
- Distinctive: line 336
No reserved words used as node IDs
“Common” is measured: kept by at least 6 in 10 of the 14 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
Diagram Maker
Generate production-ready Mermaid diagrams that render on the first try.
When to Use
- User asks for a diagram, flowchart, or visual representation
- User wants to document architecture, workflows, or processes
- User needs sequence diagrams for API interactions
- User asks for ER diagrams, class diagrams, or state machines
- User wants Gantt charts, pie charts, or timeline diagrams
- User has a broken Mermaid diagram that needs fixing
Why This Exists
LLMs frequently produce Mermaid diagrams that fail to parse. The most common failures are:
- Unquoted labels with special characters (parentheses, commas, arrows)
- HTML tags in node text (
<br/>outside quotes,<b>tags) - Reserved word collisions (
end,graph,styleused as node IDs) - Mismatched brackets —
[],(),{}not properly paired - Invalid arrow syntax — mixing up
-->,==>,-.->,--> - Subgraph nesting errors — missing
endkeywords or improper direction - Semicolons and whitespace — trailing semicolons that break parsers
- Overly complex single diagrams — 50+ nodes that become unreadable
This skill eliminates these failures with strict syntax rules.
Procedure
- Identify the diagram type from the user's request (see Type Selection below)
- Plan the structure — list nodes and relationships before writing syntax
- Write the diagram following the Syntax Rules below
- Self-validate — check every node label, arrow, and bracket
- Output the diagram in a fenced
mermaidcode block - If the diagram exceeds 30 nodes, split into multiple focused diagrams
Type Selection
| User Intent | Diagram Type | Declaration |
| Process, workflow, decision tree | Flowchart | flowchart TD or flowchart LR |
| API calls, request/response | Sequence | sequenceDiagram |
| Object relationships, inheritance | Class | classDiagram |
| Database tables, relationships | ER | erDiagram |
| State transitions, lifecycles | State | stateDiagram-v2 |
| Project timeline, milestones | Gantt | gantt |
| Proportions, percentages | Pie | pie |
| Git branching | Git Graph | gitGraph |
| User journey | Journey | journey |
| System context | C4 | C4Context |
| Nested hierarchy | Mindmap | mindmap |
| Release timeline | Timeline | timeline |
Default to flowchart TD (top-down) when the type is ambiguous. Use flowchart LR (left-right) for pipelines and linear processes.
Syntax Rules — MUST FOLLOW
Rule 1: Always Quote Labels with Special Characters
Mermaid is a parser, not Markdown. Any label containing parentheses, commas, colons, arrows, slashes, pipes, or quotes MUST be wrapped in double quotes.
WRONG: A[Send request(POST)]
RIGHT: A["Send request (POST)"]
WRONG: B{Is status >= 200?}
RIGHT: B{"Is status >= 200?"}
WRONG: C[Input: user, pass]
RIGHT: C["Input: user, pass"]Safe without quotes: Single words or simple phrases with only letters, numbers, spaces, and hyphens.
OK: A[Start]
OK: B[User Login]
OK: C[Step 3 - Validate]Rule 2: No HTML Tags in Labels
Never use <br/>, <b>, <i>, or any HTML inside node labels. Use Markdown strings for multi-line text instead.
WRONG: A[Line one<br/>Line two]
RIGHT: A["Line one
Line two"]If the renderer supports Markdown strings (GitHub does), use backtick syntax:
flowchart TD
A["`**Bold title**
Second line
Third line`"]Rule 3: Avoid Reserved Words as Node IDs
Never use these as bare node IDs: end, graph, subgraph, style, class, click, link, default.
WRONG: end --> A
RIGHT: endNode["End"] --> A
WRONG: style --> B
RIGHT: styleStep["Style"] --> BRule 4: Match All Brackets
Every opening bracket must have a closing match. Count them before finalizing.
| Shape | Syntax | Example |
| Rectangle | [text] | A[Process] |
| Rounded | (text) | A(Process) |
| Stadium | ([text]) | A([Process]) |
| Pill | [[text]] | A[[Process]] |
| Cylinder | [(text)] | A[(Database)] |
| Circle | ((text)) | A((Start)) |
| Diamond | {text} | A{Decision} |
| Hexagon | {{text}} | A{{Event}} |
| Rhombus | {text} | Same as diamond |
Rule 5: Consistent Arrow Syntax
| Arrow | Meaning | Example |
--> | Solid line with arrow | A --> B |
--- | Solid line no arrow | A --- B |
-.-> | Dotted with arrow | A -.-> B |
==> | Thick with arrow | A ==> B |
--text--> | Labeled solid arrow | A --"Yes"--> B |
-.text.-> | Labeled dotted arrow | A -."Maybe".-> B |
Always quote edge labels that contain special characters:
A --"Status: 200"--> BRule 6: Subgraph Structure
Every subgraph MUST have a matching end. Nest carefully and indent for readability.
flowchart TD
subgraph Frontend["Frontend Layer"]
direction LR
A[React App] --> B[API Client]
end
subgraph Backend["Backend Layer"]
direction LR
C[Express Server] --> D[(PostgreSQL)]
end
B --> CRule 7: No Trailing Semicolons
Some LLMs add semicolons at the end of lines. Mermaid does not use them.
WRONG: A --> B;
RIGHT: A --> BRule 8: Keep Diagrams Readable
- Max 30 nodes per diagram. Beyond that, split into sub-diagrams.
- Use subgraphs to group related nodes (3-8 nodes per group).
- Consistent direction — don't mix TD and LR without subgraph isolation.
- Meaningful IDs — use
authServicenotA1. But keep IDs under 20 chars. - Color sparingly — use
classDeffor at most 3-4 semantic classes.
Rule 9: Styling with classDef
Define styles using classDef and apply with :::. Never inline CSS-like syntax on nodes.
flowchart TD
A[Start]:::primary --> B{Check}:::decision
B -->|Pass| C[Success]:::success
B -->|Fail| D[Error]:::error
classDef primary fill:#3050FF,stroke:#1a2a8f,color:#fff
classDef decision fill:#2a2a4a,stroke:#3050FF,color:#E8ECFF
classDef success fill:#10b981,stroke:#065f46,color:#fff
classDef error fill:#ef4444,stroke:#7f1d1d,color:#fffRule 10: Sequence Diagram Specifics
sequenceDiagram
participant C as Client
participant S as Server
participant DB as Database
C->>S: POST /api/login
activate S
S->>DB: Query user
activate DB
DB-->>S: User record
deactivate DB
S-->>C: 200 JWT Token
deactivate SRules for sequence diagrams:
- Use
participantaliases to keep messages short ->>for synchronous calls,-->>for responses- Use
activate/deactivatefor lifelines - Use
Note over A,B: textfor annotations - Use
alt/else/endfor conditional flows - Use
loop/endfor repeated interactions
Templates
Architecture Diagram
flowchart TD
subgraph Client["Client Layer"]
direction LR
web[Web App] --> mobile[Mobile App]
end
subgraph API["API Gateway"]
gw[Gateway]
end
subgraph Services["Microservices"]
direction LR
auth[Auth Service]
users[User Service]
data[Data Service]
end
subgraph Storage["Data Layer"]
direction LR
pg[(PostgreSQL)]
redis[(Redis Cache)]
end
Client --> gw
gw --> auth
gw --> users
gw --> data
auth --> pg
users --> pg
data --> pg
auth --> redisDecision Flowchart
flowchart TD
start([Start]) --> input[Receive Input]
input --> validate{Valid?}
validate -->|Yes| process[Process Data]
validate -->|No| errorMsg["Show Error Message"]
errorMsg --> input
process --> save["Save to DB"]
save --> notify[Send Notification]
notify --> done([End])ER Diagram
erDiagram
USER {
int id PK
string email UK
string name
datetime created_at
}
POST {
int id PK
string title
text body
int author_id FK
datetime published_at
}
COMMENT {
int id PK
text body
int post_id FK
int user_id FK
}
USER ||--o{ POST : writes
USER ||--o{ COMMENT : makes
POST ||--o{ COMMENT : hasFixing Broken Diagrams
When the user provides a broken Mermaid diagram:
- Identify the error type — check labels, arrows, brackets, reserved words
- Quote all labels that contain any non-alphanumeric characters
- Replace HTML with Markdown strings or plain text
- Rename reserved word IDs — append
Node(e.g.,endbecomesendNode) - Fix arrows — ensure consistent syntax throughout
- Close all subgraphs — every
subgraphneeds anend - Remove semicolons from line endings
- Show the fixed version with a brief explanation of what was wrong
Pitfalls
- Never output Mermaid without a fenced code block (
```mermaid) - Never assume the renderer supports HTML — always use quoted labels
- Never exceed 50 nodes — the diagram becomes unreadable
- Never use
graphkeyword — always useflowchart(superset with more features) - Never mix diagram types in a single code block
- Always test mental model: "Would a Mermaid parser see this as code or text?"
Verification
- Every opening bracket has a matching close
- Every subgraph has a matching
end - No bare special characters in labels (all quoted)
- No HTML tags anywhere in the diagram
- No reserved words used as node IDs
- Arrow syntax is consistent throughout
- Diagram has fewer than 50 nodes
- Output is inside a
```mermaidfenced code block
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.

