mermaid-chart
Skill1 starsChanged 7 months agoMITView on GitHub
Creates Mermaid diagrams (.mmd) and generates PNG images from them. Use when the user wants to create flowcharts, sequence diagrams, class diagrams, ER diagrams, Gantt charts, or any other Mermaid-supported diagram.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- emaginebr/AvaBotword for word, first seen Apr 8, 2026
Other versions1 project uses a version of this.
Word for word · 1
- emaginebr/AvaBot★ 2100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository39 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- readme-generatorSkill
- add-react-i18nSkill
- band-album-campaignSkill
- band-music-reflectionSkill
- band-streaming-launchSkill
- ckm:banner-designSkill
- ckm:brandSkill
- deploy-prodSkill
- ckm:designSkill
- ckm:design-systemSkill
- docker-compose-configSkill
- doc-managerSkill
- dotnet-architectureSkill
- dotnet-doc-controllerSkill
- dotnet-envSkill
- dotnet-fluent-validationSkill
- dotnet-graphqlSkill
- dotnet-multi-tenantSkill
- dotnet-test-apiSkill
- dotnet-testSkill
- frontend-designSkill
- gitversionSkill
- maui-architectureSkill
- nauth-guideSkill
- nnews-guideSkill
- react-alertSkill
- react-architectureSkill
- react-archSkill
- react-modalSkill
- readme-generatorSkill
- ckm:slidesSkill
- social-media-assetsSkill
- social-media-schedulingSkill
- social-post-authoringSkill
- ckm:ui-stylingSkill
- ui-ux-pro-maxSkill
- wsl-dockerSkill
- ztools-guideSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 14 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
If no arguments are provided, ask the user what kind of diagram they need.
- Distinctive: line 22
Every diagram request produces two files:
- Very specific: line 26
Default output directory is docs/ at the project root
- Distinctive: line 27
If the user specifies a different directory, use that instead
- Distinctive: line 28
Create the output directory if it does not exist
- Very specific: line 29
Use kebab-case for file names (e.g., user-auth-flow.mmd, database-schema.mmd)
- Distinctive: line 39
If PNG generation fails:
- Very specific: line 42
If it still fails, save the .mmd file and inform the user that the PNG could not be generated, suggesting they use a Mermaid live editor or …
- Distinctive: line 46
Create diagrams using any Mermaid-supported type:
- Very specific: line 63
Use meaningful node IDs (e.g., auth[Authentication] not A[Authentication])
- Distinctive: line 64
Add labels to all connections/edges
- Distinctive: line 65
Use subgraphs to group related elements
- Distinctive: line 67
Keep diagrams readable — split overly complex diagrams into multiple files
- Very specific: line 68
Use %% for comments inside .mmd files
- Distinctive: line 75
If the type is ambiguous, suggest the most appropriate type and confirm
- Distinctive: line 80
Create the output directory if it doesn't exist
- Very specific: line 81
Write the .mmd file with valid Mermaid syntax
- Distinctive: line 94
Run the Mermaid CLI to render the PNG:
- Distinctive: line 100
Verify the PNG was created successfully
- Very specific: line 101
If generation fails, debug the .mmd syntax and retry
- Distinctive: line 184
Validate Mermaid syntax: before attempting PNG generation
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Mermaid Chart Generator
You are a Mermaid diagram specialist. You create diagram files in Mermaid syntax (.mmd) and generate corresponding PNG images (.png) using the Mermaid CLI.
Input
The user may provide a diagram description or type as argument: $ARGUMENTS
If no arguments are provided, ask the user what kind of diagram they need.
Rules
File Output
- Every diagram request produces two files:
<name>.mmd— The Mermaid source file<name>.png— The rendered PNG image
- Both files MUST have the same base name
- Default output directory is
docs/at the project root - If the user specifies a different directory, use that instead
- Create the output directory if it does not exist
- Use kebab-case for file names (e.g.,
user-auth-flow.mmd,database-schema.mmd)
PNG Generation
Generate the PNG using the Mermaid CLI (mmdc):
npx -y @mermaid-js/mermaid-cli mmdc -i <input>.mmd -o <output>.png -b whiteIf PNG generation fails:
- Validate the Mermaid syntax in the
.mmdfile - Fix any syntax errors and retry
- If it still fails, save the
.mmdfile and inform the user that the PNG could not be generated, suggesting they use a Mermaid live editor or VS Code extension to render it
Supported Diagram Types
Create diagrams using any Mermaid-supported type:
- Flowchart (
flowchart TD/LR) — Process flows, decision trees - Sequence Diagram (
sequenceDiagram) — Interactions between components - Class Diagram (
classDiagram) — OOP class structures - ER Diagram (
erDiagram) — Database entity relationships - State Diagram (
stateDiagram-v2) — State machines - Gantt Chart (
gantt) — Project timelines - Pie Chart (
pie) — Proportional data - Git Graph (
gitGraph) — Branch/merge visualization - Mindmap (
mindmap) — Hierarchical ideas - Timeline (
timeline) — Chronological events - C4 Diagram (
C4Context) — Software architecture (C4 model) - Block Diagram (
block-beta) — Block-based layouts
Mermaid Syntax Best Practices
- Use meaningful node IDs (e.g.,
auth[Authentication]notA[Authentication]) - Add labels to all connections/edges
- Use subgraphs to group related elements
- Apply consistent styling and direction
- Keep diagrams readable — split overly complex diagrams into multiple files
- Use
%%for comments inside.mmdfiles
Instructions
Phase 1 — Understand the Request
- Identify the diagram type that best fits the user's description
- If the type is ambiguous, suggest the most appropriate type and confirm
- Gather all entities, relationships, and labels needed
Phase 2 — Create the Mermaid File
- Create the output directory if it doesn't exist
- Write the
.mmdfile with valid Mermaid syntax - Include a comment header in the file:
%% Diagram: <descriptive title>
%% Type: <diagram type>
%% Generated: YYYY-MM-DD
<diagram content>Phase 3 — Generate the PNG
- Run the Mermaid CLI to render the PNG:
npx -y @mermaid-js/mermaid-cli mmdc -i docs/<name>.mmd -o docs/<name>.png -b white- Verify the PNG was created successfully
- If generation fails, debug the
.mmdsyntax and retry
Phase 4 — Confirm Output
Report to the user:
- The Mermaid source file path (
.mmd) - The PNG image file path (
.png) - A brief summary of the diagram content
Examples
Flowchart Request
User: "Create a login flow diagram"
Output docs/login-flow.mmd:
%% Diagram: User Login Flow
%% Type: Flowchart
%% Generated: 2026-03-11
flowchart TD
start([User visits login page]) --> input[Enter credentials]
input --> validate{Valid credentials?}
validate -->|Yes| mfa{MFA enabled?}
validate -->|No| error[Show error message]
error --> input
mfa -->|Yes| mfa_input[Enter MFA code]
mfa -->|No| success([Login successful])
mfa_input --> mfa_check{Valid code?}
mfa_check -->|Yes| success
mfa_check -->|No| mfa_error[Invalid code]
mfa_error --> mfa_inputER Diagram Request
User: "Create a database diagram for users and orders"
Output docs/users-orders-schema.mmd:
%% Diagram: Users and Orders Database Schema
%% Type: ER Diagram
%% Generated: 2026-03-11
erDiagram
USER ||--o{ ORDER : places
USER {
int id PK
string name
string email UK
datetime created_at
}
ORDER ||--|{ ORDER_ITEM : contains
ORDER {
int id PK
int user_id FK
decimal total
string status
datetime created_at
}
ORDER_ITEM {
int id PK
int order_id FK
int product_id FK
int quantity
decimal price
}
PRODUCT ||--o{ ORDER_ITEM : "is in"
PRODUCT {
int id PK
string name
decimal price
int stock
}Critical Rules
- ALWAYS generate both
.mmdand.pngfiles — never just one - Both files MUST share the same base name
- Default to
docs/directory unless the user specifies otherwise - Create the output directory if it does not exist
- Validate Mermaid syntax before attempting PNG generation
- Do NOT overwrite existing files without asking the user first
- Include the comment header (
%% Diagram,%% Type,%% Generated) in every.mmdfile - If PNG generation fails, still save the
.mmdfile and inform the user
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.

