diagram-generator
Skill20 starsChanged 9 months agoMITView on GitHub
Generate diagrams of any kind from a description, ticket, spec, or file. Outputs Mermaid syntax (renders natively in GitHub, Notion, Confluence, Obsidian, Slack with apps) plus an optional single-file HTML preview that renders the diagram in the browser.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- Jacobinwwey/notemdprotheir own version, first seen Oct 5, 2026
- z91772524-ai/pojia-next-mactheir own version, first seen Sep 28, 2026
- jovd83/diagram-generatortheir own version, first seen Sep 28, 2026
- luongnv89/skillstheir own version, first seen Sep 26, 2026
- zhaoxuya520/reverse-skilltheir own version, first seen Sep 22, 2026
- dbx0/skillstheir own version, first seen Sep 4, 2026
Used with
Projects with it also use pentest-tools, attack-chain 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.
xAmirHamza77Skillpentest-tools
Active penetration testing toolchain. Covers reconnaissance, port scanning, vulnerability scanning, web exploitation, SQL injection, directory brute-forcing, password cracking, and more. Exposes 20+ security tools to the AI agent via MCP servers (pentestMCP / mcp-security-hub). Trigger keywords: penetration testing, port scan, Nmap, vulnerability scan, Nuclei, SQL injection, SQLMap, directory brute-force, FFUF, password cracking, Hashcat, reconnaissance, subdomain, web exploitation, ZAP, Burp.
Also in 5 projects that use this
xAmirHamza77Skillattack-chain
Use for authorized multi-stage attack-path planning and orchestration when a task spans reconnaissance, initial access, privilege escalation, lateral movement, or impact assessment. Route single-stage tasks directly to their specialist skill.
Also in 4 projects that use this
- +10 more from xAmirHamza77
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- zhaoxuya520/reverse-skill★ 40ksame name
- luongnv89/skills★ 129same name
- sergeeey/Claude-cod-top-2026★ 9same name
- z91772524-ai/pojia-next-mac★ 9same name
- dbx0/skills★ 7same name
- Asaiuta/reverse-workbench-skill★ 4same name
- xAmirHamza77/ReverseOps-Skill★ 4same name
- Jacobinwwey/notemdpro★ 2same name
- Matthewyin/CustomSkills★ 2same name
- jovd83/diagram-generator★ 0same name
1 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 repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- create-skillSkill
- sync-skillsSkill
- confluence-to-mdSkill
- draft-emailSkill
- jira-ticket-creatorSkill
- md-to-confluenceSkill
- presentation-builderSkill
- youtube-transcriptSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
27 rules. 0 are common, 13 are distinctive, and 14 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
13
Distinctive
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
If the input is unambiguous, pick directly.
- Distinctive: line 63
If multiple distinct scenarios exist (e.g., happy path + error path), produce SEPARATE diagrams rather than one mega-diagram.
- Distinctive: line 67
Always wrap output in:
- Distinctive: line 74
Follow the type-specific rules below.
- Distinctive: line 78
After printing the Mermaid block, ask: *"Want me to generate a single-file HTML preview that renders this locally?"*
- Very specific: line 80
If yes, write diagram.html to the current directory using the template under "HTML preview template" below.
- Very specific: line 86
Line breaks in labels: ALWAYS <br>, NEVER \n.
- Very specific: line 107
Use participant X as Display Name to set readable labels.
- Very specific: line 108
Use ->> for sync, -->> for async, --x for failed.
- Very specific: line 109
Use Note over X,Y: text for callouts.
- Very specific: line 110
Use loop, alt / else, par, opt for control flow.
- Very specific: line 111
Use activate X / deactivate X to show lifelines.
- Very specific: line 115
Use [*] --> StateName for start, StateName --> [*] for end.
- Very specific: line 116
Use state ChoiceName <<choice>> for branching.
- Very specific: line 117
Use composite states for nesting: state Group { ...
- Distinctive: line 122
Use lowercase plural entity names.
- Very specific: line 141
Always start with dateFormat YYYY-MM-DD.
- Distinctive: line 148
No header. Comma-separated.
- Distinctive: line 180
If multiple diagrams (e.g., happy + error paths), use a header per diagram and render each separately.
- Distinctive: line 184
When the user asks for a local preview, write this single file (no build, no npm.
- Distinctive: line 221
Don't pick the wrong diagram type to "force fit" the input — ask if it's ambiguous.
- Distinctive: line 222
Don't cram multiple scenarios into one diagram.
- Very specific: line 223
Don't use \n for line breaks in flowchart node labels — always <br>.
- Distinctive: line 224
Don't put quotes, colons, or pipes inside node labels (they break Mermaid).
- Very specific: line 225
Don't skip the style lines on flowcharts — color coding makes diagrams scannable.
- Very specific: line 226
Don't reach for D3, ReactFlow, or custom HTML.
- Distinctive: line 227
Don't auto-generate the HTML preview unless the user asks — most users just want the Mermaid block.
“Common” is measured: kept by at least 6 in 10 of the 10 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 Generator
Turn any input into a clean diagram. Supports the full Mermaid diagram set so one skill handles flowcharts, sequence diagrams, state machines, ER diagrams, journeys, mindmaps, timelines, gantt charts, sankey, quadrants, class diagrams, and git graphs.
Inputs
- Ticket / PRD / spec — read it and pick the right diagram type.
- File path — read the file and diagram from contents.
- Verbal description — diagram directly from the prompt.
- Existing diagram — refactor / restyle / fix.
Workflow
Step 1 — Pick the diagram type
If the input is unambiguous, pick directly. Otherwise ask which fits best:
| User intent | Mermaid type |
| Process flow, decision tree, "if X then Y" | flowchart |
| API calls, message passing, who-talks-to-whom over time | sequenceDiagram |
| Object lifecycle, finite-state machine | stateDiagram-v2 |
| Database schema, entities + relationships | erDiagram |
| End-to-end customer/user experience with sentiment | journey |
| Hierarchical brainstorm, taxonomy, idea tree | mindmap |
| Dated events, milestones | timeline |
| Project schedule with durations + dependencies | gantt |
| Flow of quantity between sources/targets | sankey-beta |
| 2x2 categorization (importance/urgency, effort/impact) | quadrantChart |
| OOP class hierarchy with methods | classDiagram |
| Git branching strategy | gitGraph |
Step 2 — Extract the diagram content
From the input, pull out the right primitives for the chosen type:
- Flowchart: decision points, actions, states, edge cases, scenarios.
- Sequence: actors, messages, ordering, async vs sync.
- State: states, transitions, triggers, terminal states.
- ER: entities, attributes, relationships, cardinality.
- Journey: stages, tasks per stage, sentiment scores.
- Mindmap: root concept + branches.
- Timeline: sections + events per section.
- Gantt: sections + tasks with dates/durations + dependencies.
- Sankey: source → target → value rows.
- Quadrant: axis labels + items with (x, y) scores.
- Class: classes + members + inheritance/composition.
- GitGraph: branches, commits, merges.
If multiple distinct scenarios exist (e.g., happy path + error path), produce SEPARATE diagrams rather than one mega-diagram.
Step 3 — Emit Mermaid syntax
Always wrap output in:
```mermaid
{type-specific code}
```Follow the type-specific rules below.
Step 4 — Offer a preview file (optional)
After printing the Mermaid block, ask: "Want me to generate a single-file HTML preview that renders this locally?"
If yes, write diagram.html to the current directory using the template under "HTML preview template" below.
Type-specific rules
Flowchart
- Line breaks in labels: ALWAYS
<br>, NEVER\n. - Node shapes:
([text])— start / end (stadium)[text]— action / process{text}— decision[[text]]— subroutine[(text)]— database((text))— circle (event)
- Direction:
flowchart TDfor processes,flowchart LRfor timelines/pipelines. - Edge labels:
-- text -->for conditional paths. - Colors (apply via
stylelines at the end):fill:#4CAF50,color:#fff— success / start (green)fill:#EF5350,color:#fff— error / blocked (red)fill:#FF9800,color:#fff— warning / modified (orange)fill:#2196F3,color:#fff— informational (blue)
- Subgraphs: group related items with
subgraph Name ... end. - No special characters (quotes, colons, pipes) inside node labels.
- Node text: max 4 lines.
Sequence diagram
- Use
participant X as Display Nameto set readable labels. - Use
->>for sync,-->>for async,--xfor failed. - Use
Note over X,Y: textfor callouts. - Use
loop,alt / else,par,optfor control flow. - Use
activate X/deactivate Xto show lifelines.
State diagram (v2)
- Use
[*] --> StateNamefor start,StateName --> [*]for end. - Use
state ChoiceName <<choice>>for branching. - Use composite states for nesting:
state Group { ... }.
ER diagram
- Cardinality glyphs:
||--o{(one-to-many),}o--o{(many-to-many),||--||(one-to-one). - Use lowercase plural entity names.
- Attribute lines:
{type} attributeName "comment".
Journey
- Three columns per task:
Task name: <score 1-5>: Actor1, Actor2. - Group tasks under
section Name.
Mindmap
- Indentation defines hierarchy.
- Node shapes:
((text)),[text],(text),{{text}}.
Timeline
section Namethen events as: YYYY : event text.
Gantt
- Always start with
dateFormat YYYY-MM-DD. - Tasks:
Name :status, id, start, durationorName :status, id, after otherId, duration. - Status keywords:
done,active,crit.
Sankey-beta
- One source-target-value row per line:
Source,Target,42. - No header. Comma-separated. Values numeric.
Quadrant chart
- Required:
title,x-axis Low --> High,y-axis Low --> High, four quadrant labels. - Items:
Item Name: [x, y]where x and y are 0-1.
Class diagram
Class : +method()for public,-private,#protected.- Relationships:
<|--inherits,*--composition,o--aggregation,-->association.
GitGraph
commit,branch name,checkout name,merge name.- Order matters; reads top-to-bottom.
Output structure
## {Diagram Title}
**Summary:** {one-line description of what the diagram shows}
```mermaid
{code}Key callouts:
- {anything non-obvious about the diagram}
If multiple diagrams (e.g., happy + error paths), use a header per diagram and render each separately.
## HTML preview template
When the user asks for a local preview, write this single file (no build, no npm; mermaid loaded from CDN):
```html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Diagram preview</title>
<style>
body{margin:0;padding:48px;font:16px/1.5 system-ui,sans-serif;background:#F5F1EA;color:#15140F}
.wrap{max-width:1100px;margin:0 auto}
h1{font-weight:500;font-size:28px;margin:0 0 24px}
.mermaid{background:#fff;border:1px solid #D8D2C5;border-radius:10px;padding:24px;overflow:auto}
</style>
</head>
<body>
<div class="wrap">
<h1>{TITLE}</h1>
<pre class="mermaid">
{MERMAID_CODE}
</pre>
</div>
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
mermaid.initialize({ startOnLoad: true, theme: 'base', themeVariables: {
primaryColor: '#F5F1EA', primaryTextColor: '#15140F', primaryBorderColor: '#15140F',
lineColor: '#15140F', fontFamily: 'system-ui, sans-serif'
}});
</script>
</body>
</html>Replace {TITLE} and {MERMAID_CODE} with the actual content. Preview opens directly in the browser (file:// works; no server needed).
Anti-Patterns
- Don't pick the wrong diagram type to "force fit" the input — ask if it's ambiguous.
- Don't cram multiple scenarios into one diagram; split them.
- Don't use
\nfor line breaks in flowchart node labels — always<br>. - Don't put quotes, colons, or pipes inside node labels (they break Mermaid).
- Don't skip the
stylelines on flowcharts — color coding makes diagrams scannable. - Don't reach for D3, ReactFlow, or custom HTML; Mermaid is the right tool for almost every case. (If the user wants the magazine-grade animated process flow, point them to the
interactive-flowchart-builderskill instead.) - Don't auto-generate the HTML preview unless the user asks — most users just want the Mermaid block.
Quality Checklist
- Picked the right diagram type for the input (flowchart vs sequence vs state vs ...).
- Mermaid syntax parses cleanly (no unescaped special chars in labels).
- Distinct scenarios split into separate diagrams.
- Color/style applied where the diagram type supports it (flowchart, sequence highlights, journey scores).
- Node text is concise (≤4 lines).
- Summary line + key callouts included with the diagram.
- If preview requested, single-file HTML written and opens directly in browser.
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.

