Pretty Mermaid Renderer
imxv/Pretty-mermaid-skills
Writes and renders Mermaid diagrams as themed SVG, PNG or terminal ASCII and Unicode art with a bundled Node.js CLI that needs no browser.
Turns text, notes, code, schemas or tables into diagram source in Mermaid, Graphviz DOT, PlantUML or SVG, and renders files when you ask for an image or PDF.
The automated check flagged lines worth reading first. See the safety section below.
$ npx skills add zhaoxuya520/reverse-skill --skill diagram-generator -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install zhaoxuya520/reverse-skill diagram-generator --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/zhaoxuya520/reverse-skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/diagram-generator .claude/skills/diagram-generator && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "diagram-generator" agent skill from https://github.com/zhaoxuya520/reverse-skill/tree/main/skills/diagram-generator into .claude/skills/diagram-generator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "diagram-generator", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/zhaoxuya520/reverse-skill/tree/main/skills/diagram-generatorType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add zhaoxuya520/reverse-skill --skill diagram-generator -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install zhaoxuya520/reverse-skill diagram-generator --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zhaoxuya520/reverse-skill.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/diagram-generator .agents/skills/diagram-generator && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "diagram-generator" agent skill from https://github.com/zhaoxuya520/reverse-skill/tree/main/skills/diagram-generator into .agents/skills/diagram-generator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "diagram-generator", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add zhaoxuya520/reverse-skill --skill diagram-generator -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install zhaoxuya520/reverse-skill diagram-generator --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zhaoxuya520/reverse-skill.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/diagram-generator .cursor/skills/diagram-generator && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "diagram-generator" agent skill from https://github.com/zhaoxuya520/reverse-skill/tree/main/skills/diagram-generator into .cursor/skills/diagram-generator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "diagram-generator", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/zhaoxuya520/reverse-skill.git --path skills/diagram-generator--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add zhaoxuya520/reverse-skill --skill diagram-generator -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install zhaoxuya520/reverse-skill diagram-generator --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zhaoxuya520/reverse-skill.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/diagram-generator .gemini/skills/diagram-generator && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "diagram-generator" agent skill from https://github.com/zhaoxuya520/reverse-skill/tree/main/skills/diagram-generator into .gemini/skills/diagram-generator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "diagram-generator", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install zhaoxuya520/reverse-skill diagram-generatorInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add zhaoxuya520/reverse-skill --skill diagram-generator -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/zhaoxuya520/reverse-skill.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/diagram-generator .github/skills/diagram-generator && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "diagram-generator" agent skill from https://github.com/zhaoxuya520/reverse-skill/tree/main/skills/diagram-generator into .github/skills/diagram-generator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "diagram-generator", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add zhaoxuya520/reverse-skill --skill diagram-generator -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install zhaoxuya520/reverse-skill diagram-generator --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zhaoxuya520/reverse-skill.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/diagram-generator .opencode/skills/diagram-generator && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "diagram-generator" agent skill from https://github.com/zhaoxuya520/reverse-skill/tree/main/skills/diagram-generator into .opencode/skills/diagram-generator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "diagram-generator", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
diagram-generatorTurns text, notes, code, schemas or tables into diagram source in Mermaid, Graphviz DOT, PlantUML or SVG, and renders files when you ask for an image or PDF.
Editable, text-based diagrams are produced from messy or structured input: flowcharts, swimlanes, sequence, state, ER and class diagrams, C4-style architecture, dependency graphs, Gantt charts, mind maps, user journeys, org charts and similar. The agent works through a fixed sequence of identifying intent and audience, picking a diagram family, normalizing entities and relationships, writing concise source, validating it and returning it with a short note on assumptions.
A decision table picks the language. Mermaid is the default and covers flowcharts, sequence, state, ER, class, Gantt, mind map, journey and git graph diagrams, Graphviz DOT is preferred for dense dependency graphs, and PlantUML for UML-heavy work. Direct SVG is used when markup is more reliable. The agent is told not to over-ask and to label any assumptions it makes.
Files are rendered only when you want an image or PDF, using scripts/render_diagram.py, and a second script creates sample diagrams. A reference file lists diagram patterns, and the opening of the file points to a shared tool index for checking available tools and bootstrapping missing ones.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit cab634b. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 2 files in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
pythonnpmFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
graphviz.orgplantuml.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Diagram Generator loads about 2.3k tokens when it runs, and up to ~3.4k if it reads all its reference files. Until then it costs about 145 tokens; SKILL.md has 888 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found patterns that need a careful read before installing.
4. `ACT`:进入"工作流"第一步并执行,不要停在确认状态Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from zhaoxuya520/reverse-skill at commit cab634b, republished under its MIT licence (© zhaoxuya520). 888 words, ~2,251 tokens.
.claude/skills/diagram-generator/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.NOW:确认当前任务是否命中本 skill 的适用范围NOW:读取 ../tool-index.md,校验工具可用性和实际路径NEXT:缺工具时调用 bootstrap,不要猜路径ACT:进入"工作流"第一步并执行,不要停在确认状态Create clear, editable diagrams from messy or structured inputs. Prefer text-based diagram source first so the result can be reviewed, versioned, and refined. Render to files only when the user asks for an image/PDF or when a downloadable artifact would materially help.
scripts/render_diagram.py.Do not over-ask for clarification. If the request is underspecified, make reasonable assumptions and label them briefly.
Use Mermaid unless another language is clearly better.
| User wants | Prefer | Why |
|---|---|---|
| process flow, decision tree, simple swimlane | Mermaid flowchart | readable and easy to paste into Markdown |
| sequence of system/user interactions | Mermaid sequenceDiagram or PlantUML sequence | Mermaid for docs; PlantUML for UML formality |
| lifecycle, state machine, transitions | Mermaid stateDiagram-v2 or PlantUML state | compact transition syntax |
| database schema, entities, relationships | Mermaid erDiagram | portable ER notation |
| class/interface/object model | Mermaid classDiagram or PlantUML class | Mermaid for docs; PlantUML for detailed UML |
| project schedule | Mermaid gantt | concise timeline syntax |
| hierarchy, ideas, notes | Mermaid mindmap | good default for idea maps |
| customer/product journey | Mermaid journey | built-in journey notation |
| git history | Mermaid gitGraph | built-in git notation |
| dependency graph, package graph, large network | Graphviz DOT | better layout engines for dense graphs |
| architecture with layers, clusters, boundaries | Mermaid flowchart with subgraphs, Graphviz clusters, or PlantUML C4-style | choose based on requested fidelity |
| weighted flow/sankey-like relationship | Mermaid sankey-beta when supported, otherwise SVG or Graphviz | Mermaid support may vary by renderer |
| custom visual where source languages fit poorly | SVG | precise control over layout and styling |
Assumptions section after the code.Consult references/diagram-patterns.md for compact templates.
General Mermaid rules:
flowchart TD, sequenceDiagram, erDiagram, gantt, mindmap, or journey.flowchart TD unless the user asks for left-to-right; use flowchart LR for architecture and pipelines.ingest_service[Ingest Service].decision{Condition?}.-- yes -->, -- no -->, -. async .->, or == critical ==> only when meaningful.actor for humans and participant for systems.alt/else/end, opt/end, loop/end, and par/and/end blocks for conditional, optional, repeated, and parallel flows.Use Graphviz for large, dense, or layout-sensitive relationship diagrams.
digraph G for directed relationships and graph G for undirected networks.rankdir=LR, nodesep, ranksep, and splines=true when helpful.subgraph cluster_name for boundaries and subsystems.Use PlantUML when the user asks for UML or needs formal UML notation.
@startuml and @enduml.actor, participant, database, queue, collections, or component stereotypes when useful.package, rectangle, or node for architecture boundaries.Use SVG only when text diagram languages cannot express the requested visual reliably.
<title> and meaningful text labels.When the user asks for PNG/SVG/PDF, create a source file and run:
python "<SKILL_ROOT>/diagram-generator/scripts/render_diagram.py" input.mmd --format svg --out output.svg
python "<SKILL_ROOT>/diagram-generator/scripts/render_diagram.py" input.dot --format png --out output.png
python "<SKILL_ROOT>/diagram-generator/scripts/render_diagram.py" input.puml --format svg --out output.svg
<SKILL_ROOT>是本包skills/目录的实际路径,AI 应自动检测。
The renderer is intentionally dependency-tolerant. It tries common local tools and reports actionable installation hints if a renderer is unavailable. Do not claim an image was rendered unless the script completed successfully and the output file exists.
Before finalizing:
Use this structure for most diagram answers:
下面是可编辑的 [language] 版本:
```[language]
[source]Assumptions:
Rendered file: [link] [only if generated]
For English user requests, respond in English. For Chinese user requests, respond in Chinese unless they ask otherwise.
---
## 按需自举(On-Demand Bootstrap)
### 自动化能力边界
| 工具 | 可自动安装 | 安装方式 | 说明 |
|------|-----------|---------|------|
| Mermaid CLI (mmdc) | ✓ | npm install -g @mermaid-js/mermaid-cli | 渲染 Mermaid 为 PNG/SVG |
| Graphviz (dot) | ✗ | 手动安装 | https://graphviz.org/download/ |
| PlantUML | ✗ | 需要 Java + plantuml.jar | https://plantuml.com/download |
| Python (render script) | ✓ | 已在 bootstrap 中 | `scripts/render_diagram.py` 依赖 |
### 说明
本 skill 主要输出文本格式的图表源码(Mermaid/DOT/PlantUML),不一定需要本地渲染工具。只有当用户明确要求生成 PNG/SVG/PDF 文件时才需要对应的渲染器。
如果渲染器不可用,`scripts/render_diagram.py` 会输出安装提示而不是报错。
---
## 路由上下文
**上游入口**: `skills/SKILL.md`(总控)、`routing.md`
**触发条件**: 用户说"画图"、"流程图"、"架构图"、"攻击路径图"、"时序图"、"Mermaid"、"Graphviz"、"PlantUML"
**下游出口**:
- 生成的图表可嵌入 `docs-generator/` 的报告中
- 攻击路径图可配合 `pentest-tools/` 的渗透报告
**同级关联模块**: `docs-generator/`(报告中嵌入图表)
## 任务完成自检(声称完成前 MUST 通过)
- [ ] 我是否执行了工作流中的每一步(而不是只阅读)?
- [ ] 我是否基于 `tool-index` 使用了真实工具路径?
- [ ] 我是否产出了可复现证据(命令/脚本/截图/报告)?
- [ ] 我是否完成并回写了 RULES 要求的 Checklist 项?© zhaoxuya520, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (scripts, references) in skills/diagram-generator of zhaoxuya520/reverse-skill.
Open the folder on GitHubat commit cab634b
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in zhaoxuya520/reverse-skill, which our catalogue first saw on October 7, 2026.
Diagram Generator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Diagram Generator this skillzhaoxuya520/reverse-skill | 41k | 1 repos | ~2.3k | Automated safety check: Warn | MIT | |
| Pretty Mermaid Rendererimxv/Pretty-mermaid-skills | 1.5k | — | ~2k | Automated safety check: Pass | MIT | |
| Architecture Diagramkonraddzbik/architecture-diagram-skill | 115 | — | ~5.7k | Automated safety check: Pass | MIT | |
| Chatbot Mvp Distillationpdsuwwz/chatgpt-vue3-light-mvp | 579 | — | ~722 | Automated safety check: Pass | MIT | |
| Chatbot Mvp Distillation Zhpdsuwwz/chatgpt-vue3-light-mvp | 579 | — | ~414 | Automated safety check: Pass | MIT | |
| Markdown Mermaid WritingK-Dense-AI/scientific-agent-skills | 48k | 1 repos | ~4.2k | Automated safety check: Notes | Apache-2.0 |
imxv/Pretty-mermaid-skills
Writes and renders Mermaid diagrams as themed SVG, PNG or terminal ASCII and Unicode art with a bundled Node.js CLI that needs no browser.
konraddzbik/architecture-diagram-skill
Build interactive, click-through architecture diagrams for software systems — a self-contained single HTML file with animated step-by-step flows, mode toggles (dev/prod, offline/online, v1/v2)…
pdsuwwz/chatgpt-vue3-light-mvp
Distill the chatgpt-vue3-light-mvp project into reusable architecture for building similar ChatGPT-style web products in other repositories.
pdsuwwz/chatgpt-vue3-light-mvp
将 chatgpt-vue3-light-mvp 项目蒸馏为可迁移到其他项目的中文架构指南。适用于设计或实现类似 ChatGPT 的 Web 对话产品,包括 SSE/fetch 流式响应、模型适配器契约、打字机渲染、Markdown/代码/KaTeX/Mermaid 渲染、推理过程展示,以及从本 Vue 3 MVP 迁移到其他项目的方案规划。
K-Dense-AI/scientific-agent-skills
Writes scientific Markdown documentation and Mermaid diagrams for workflows, relationships, timelines, and schemas.
digoal/blog
生成面向学生的公理/定理深度讲解文案,输出图文并茂的 Markdown 文章。触发条件:用户输入一个观点、公理、定理或数学/科学/哲学命题,并希望获得系统性讲解文章。关键词包括:"讲解"、"解释"、"公理"、"定理"、"原理"、"推导"、"怎么来的"、"有什么用"、"证明"等。即使用户只说"帮我讲讲XX定理"或"解释一下XX原理",也应使用本 skill。输出保存到项目 markdown/…
zhaoxuya520/reverse-skill
A skill your agent uses for software supply-chain security assessment covering SBOM, SCA, CI/CD pipelines, container images, build integrity, dependency provenance, and vulnerability reachability.
zhaoxuya520/reverse-skill
Reverse JavaScript-based custom DSL/VM interpreters, non-standard WASM-like runtimes, and risk-control engines.
zhaoxuya520/reverse-skill
A skill your agent uses for authorized reverse engineering of browser extensions (Chrome/Firefox) including manifest analysis, background workers, and extension-based credential or traffic logic…
zhaoxuya520/reverse-skill
A skill your agent uses for reverse engineering stripped Go and Rust binaries including runtime recognition, pclntab/moduel data recovery, panic strings, and idiomatic decompilation recovery.
zhaoxuya520/reverse-skill
A skill your agent uses for authorized assessment of federated identity systems including SAML, OIDC, OAuth2 flows, SSO misconfiguration, and token confusion issues.
zhaoxuya520/reverse-skill
A skill your agent uses for authorized macOS and Mach-O reverse engineering including codesign, Objective-C/Swift recovery, endpoint security surfaces, and Apple platform malware analysis.
Works with
Categories
Turns text, notes, code, schemas or tables into diagram source in Mermaid, Graphviz DOT, PlantUML or SVG, and renders files when you ask for an image or PDF. Editable, text-based diagrams are produced from messy or structured input: flowcharts, swimlanes, sequence, state, ER and class diagrams, C4-style architecture, dependency graphs, Gantt charts, mind maps, user journeys, org charts and similar. The agent works through a fixed sequence of identifying intent and audience, picking a diagram family, normalizing entities and relationships, writing concise source, validating it and returning it with a short note on assumptions.
Diagram Generator fits situations like: drawing a flowchart or sequence diagram from a description; visualizing a database schema as an ER diagram; laying out a dense dependency graph; rendering diagram source to an image or PDF file.
Run `npx skills add zhaoxuya520/reverse-skill --skill diagram-generator -a claude-code`. Or copy the skill folder (skills/diagram-generator in zhaoxuya520/reverse-skill) into .claude/skills/diagram-generator in your project. Claude Code loads it when a task matches its description.
Run `npx skills add zhaoxuya520/reverse-skill --skill diagram-generator -a codex`. Or copy the skill folder (skills/diagram-generator in zhaoxuya520/reverse-skill) into .agents/skills/diagram-generator in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zhaoxuya520/reverse-skill --skill diagram-generator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/diagram-generator, .gemini/skills/diagram-generator, .github/skills/diagram-generator and .opencode/skills/diagram-generator in your project.
Going by SKILL.md and its folder, Diagram Generator needs Python for the scripts in its folder and the command-line tools its instructions call (python and npm). Our summary lists: Python, to run scripts/render_diagram.py for file output.
SKILL.md names 2 domains. In commands or code: graphviz.org and plantuml.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md flagged 1 warning(s): tells the agent its actions are pre-authorized / not to stop for confirmation. Read the flagged lines before installing; the check is not a guarantee either way. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Diagram Generator is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.2k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Diagram Generator: Pretty Mermaid Renderer (imxv/Pretty-mermaid-skills, 1.5k stars), Architecture Diagram (konraddzbik/architecture-diagram-skill, 115 stars), Chatbot Mvp Distillation (pdsuwwz/chatgpt-vue3-light-mvp, 579 stars) and Chatbot Mvp Distillation Zh (pdsuwwz/chatgpt-vue3-light-mvp, 579 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
zhaoxuya520 (a GitHub user) maintains it in zhaoxuya520/reverse-skill, which has 40,590 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on September 22, 2026.
Source: zhaoxuya520/reverse-skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.