Mermaid Awesome :让你的智能体,画出专业的 Mermaid 图表 和 架构图,Markdown 可识别
下载地址
https://www.zhengdianxue.com/wp-content/uploads/skills/user_c1d16043--mermaid-awesome.zip将提示词发送给你的 AI 安装该 skills
请根据 https://skillhub.cn/install/skillhub.md,安装 @user_c1d16043/mermaid-awesome。Provides comprehensive guidance for creating Mermaid diagrams. Mermaid is a JavaScript-based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. The main purpose of Mermaid is to help documentation catch up with development. Mermaid is particularly well-suited for use in Markdown documents, GitHub, GitLab, wikis, blogs, and other Markdown-based platforms. Use when the user wants to draw, create, generate, make, build, or visualize any diagram, chart, graph, flowchart, architecture diagram, sequence diagram, class diagram, state diagram, Gantt chart, mindmap, timeline, or any other visual diagram in Markdown-friendly format. This skill covers all 23+ Mermaid diagram types including flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, Gantt charts, pie charts, quadrant charts, Git graphs, C4 diagrams, mindmaps, timelines, and more. Always use this skill when the user mentions Mermaid, needs diagrams for Markdown documentation, or wants quick diagrams that render directly in Markdown renderers.
阅读全文 (展开查看完整说明)
概述
Mermaid Diagrams
Produce valid Mermaid source that communicates relationships more clearly than prose.
Routing
- Choose Mermaid by default for Markdown-native diagrams.
- Choose [
../plantuml/SKILL.md](../plantuml/SKILL.md) for strict UML notation, detailed C4, or.pumloutput. - Choose [
../processon-diagram-generator/SKILL.md](../processon-diagram-generator/SKILL.md) when the user explicitly wants ProcessOn or hosted editable rendering. - Do not ask the user to choose a tool when the context already determines a safe default.
Workflow
- Extract entities, states, decisions, messages, or dependencies from the request and available source.
- Select the smallest suitable diagram type.
- Generate syntactically complete Mermaid source.
- Keep labels concise and quote labels containing punctuation, parentheses, or special characters.
- Validate the structure and, when a Mermaid renderer is available, render it before delivery.
- Save a file only when the user asks for a file or the diagram belongs in an existing document.
Diagram selection
| Need | Mermaid declaration |
|---|---|
| Process or decision | flowchart TD or flowchart LR |
| Calls over time | sequenceDiagram |
| State lifecycle | stateDiagram-v2 |
| Type relationships | classDiagram |
| Data entities | erDiagram |
| Schedule | gantt |
| User experience | journey |
| Hierarchy | mindmap |
| Chronology | timeline |
| Lightweight architecture | architecture-beta or a flowchart |
Load only the matching file under examples/ when syntax details are needed. Do not load all examples.
Authoring rules
- Give every node a stable, simple identifier.
- Quote human-readable labels when they contain punctuation.
- Use one direction consistently; avoid unnecessary crossings.
- Represent a decision with a diamond and label outgoing branches.
- Keep sequence participants and messages explicit.
- Avoid styling that depends on a single renderer unless the target platform is known.
- Split an unreadable diagram instead of shrinking labels or adding excessive subgraphs.
- Do not encode unsupported facts merely to make the diagram look complete.
Output
For inline delivery, return a fenced block:
```mermaid
flowchart LR
A["Input"] --> B{"Valid?"}
B -->|Yes| C["Process"]
B -->|No| D["Reject"]
```For file delivery, prefer docs/diagrams/<descriptive-name>.md unless the repository already has a diagram convention. Preserve existing files and ask before overwriting.
Validation checklist
- Opening declaration matches the intended diagram type.
- Identifiers are valid and unique.
- Labels with punctuation are quoted.
- All branches, participants, and relationships are connected as intended.
- Fenced Markdown blocks are closed.
- The diagram renders on the user's target platform when that renderer is available.