據 AlphaMoat 統計,截至 2026-10,Mermaid Diagrams 累計下載 10,997 次、獲 7 個星標,按累計下載量在本次參與排名的 10,914 個 AI 技能中排名第 2,492 位,在「開發程式設計」分類(1,069 個)中排名第 181 位。
列表預設按累計下載量排序,也可按星標排序;詳情頁排名按累計下載量計算。
| 平台 | 累計下載 | 星標 | 評論 |
|---|---|---|---|
| ClawHub ↗ | 7648 | 5 | - |
| SkillHub ↗ | 1.1萬 | 7 | — |
各平台的計數口徑不同,統計時間不一致。
圖表由文字定義生成,便於隨程式碼一起納入版本控制與更新。首行宣告圖型別(如類圖、時序圖、流程圖),縮排隻影響可讀性;未知詞彙會導致圖表出錯,引數非法時可能靜默失敗。單個圖不超過 15 個節點,超出應拆成多張,連線必須標註含義。
資料釋出於 2026-10-27
以下是根據技能文件生成的示例,不代表實際執行結果。
2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。 該技能有同名的其他版本,調整前的資料歸屬當前下載量最大的這一個。
| 月份 | 累計下載 | 環比 | 星標 |
|---|---|---|---|
| 2026-10 | 1.1萬 | — | 7 |
| 2026-09 | 8182 | — | 7 |
| 2026-08 | 7285 | +4.9% | 7 |
| 2026-07 | 6946 | +6.7% | 7 |
| 2026-06 | 6507 | +4.8% | 7 |
| 2026-05 | 6209 | — | 7 |
| 2026-03 | 4956 | — | 5 |
以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。
--- name: mermaid-diagrams model: fast version: 1.0.0 description: > Create software diagrams using Mermaid syntax. Use when users need to create, visualize, or document software through diagrams including class diagrams, sequence diagrams, flowcharts, ERDs, C4 architecture diagrams, state diagrams, git graphs, and other diagram types. Triggers include requests to diagram, visualize, model, map out, or show the flow of a system. tags: [diagrams, mermaid, visualization, architecture, documentation, modeling]
---
# Mermaid Diagrams
Create professional software diagrams using Mermaid's text-based syntax. Mermaid renders diagrams from simple text definitions, making diagrams version-controllable, easy to update, and maintainable alongside code.
## Installation
### OpenClaw / Moltbot / Clawbot
```bash
npx clawhub@latest install mermaid-diagrams
```
## Core Syntax
All Mermaid diagrams follow this pattern:
```mermaid
diagramType
definition content
```
**Key principles:**
- First line declares diagram type (e.g., `classDiagram`, `sequenceDiagram`, `flowchart`)
- Use `%%` for comments
- Line breaks and indentation improve readability but aren't required
- Unknown words break diagrams; invalid parameters fail silently
## Diagram Type Selection
| Type | Use For | Reference |
|------|---------|-----------|
| **Class Diagrams** | Domain modeling, OOP design, entity relationships | `references/class-diagrams.md` |
| **Sequence Diagrams** | API flows, auth flows, component interactions | `references/sequence-diagrams.md` |
| **Flowcharts** | Processes, algorithms, decision trees, user journeys | `references/flowcharts.md` |
| **ERD** | Database schemas, table relationships, data modeling | `references/erd-diagrams.md` |
| **C4 Diagrams** | System context, containers, components, architecture | `references/c4-diagrams.md` |
| **State Diagrams** | State machines, lifecycle states | — |
| **Git Graphs** | Branching strategies | — |
| **Gantt Charts** | Project timelines, scheduling | — |
**For styling, themes, and layout options**: See `references/advanced-features.md`
## Quick Start Examples
### Class Diagram (Domain Model)
```mermaid
classDiagram
Title -- Genre
Title *-- Season
Title *-- Review
User --> Review : creates
class Title {
+string name
+int releaseYear
+play()
}
class Genre {
+string name
+getTopTitles()
}
```
### Sequence Diagram (API Flow)
```mermaid
sequenceDiagram
participant User
participant API
participant Database
User->>API: POST /login
API->>Database: Query credentials
Database-->>API: Return user data
alt Valid credentials
API-->>User: 200 OK + JWT token
else Invalid credentials
API-->>User: 401 Unauthorized
end
```
### Flowchart (User Journey)
```mermaid
flowchart TD
Start([User visits site]) --> Auth{Authenticated?}
Auth -->|No| Login[Show login page]
Auth -->|Yes| Dashboard[Show dashboard]
Login --> Creds[Enter credentials]
Creds --> Validate{Valid?}
Validate -->|Yes| Dashboard
Validate -->|No| Error[Show error]
Error --> Login
```
### ERD (Database Schema)
```mermaid
erDiagram
USER ||--o{ ORDER : places
ORDER ||--|{ LINE_ITEM : contains
PRODUCT ||--o{ LINE_ITEM : includes
USER {
int id PK
string email UK
string name
datetime created_at
}
ORDER {
int id PK
int user_id FK
decimal total
datetime created_at
}
```
## Best Practices
1. **Start simple** — begin with core entities/components, add details incrementally
2. **Use meaningful names** — clear labels make diagrams self-documenting
3. **Comment extensively** — use `%%` comments to explain complex relationships
4. **Keep focused** — one diagram per concept; split large diagrams into multiple views
5. **Version control** — store `.mmd` files alongside code for easy updates
6. **Add context** — include titles and notes to explain diagram purpose
7. **Iterate** — refine diagrams as understanding evolves
## Configuration and Theming
Configure diagrams using frontmatter:
```mermaid
---
config:
theme: base
themeVariables:
primaryColor: "#ff6b6b"
---
flowchart LR
A --> B
```
**Available themes:** default, forest, dark, neutral, base
**Layout options:**
- `layout: dagre` (default) — classic balanced layout
- `layout: elk` — advanced layout for complex diagrams
**Look options:**
- `look: classic` — traditional Mermaid style
- `look: handDrawn` — sketch-like appearance
## Rendering and Export
**Native support in:**
- GitHub/GitLab — automatically renders in Markdown
- VS Code — with Markdown Mermaid extension
- Notion, Obsidian, Confluence — built-in support
**Export options:**
- [Mermaid Live Editor](https://mermaid.live) — online editor with PNG/SVG export
- Mermaid CLI — `npm install -g @mermaid-js/mermaid-cli` then `mmdc -i input.mmd -o output.png`
## When to Create Diagrams
**Always diagram when:**
- Starting new projects or features
- Documenting complex systems
- Explaining architecture decisions
- Designing database schemas
- Planning refactoring efforts
- Onboarding new team members
**Use diagrams to:**
- Align stakeholders on technical decisions
- Document domain models collaboratively
- Visualize data flows and system interactions
- Plan before coding
- Create living documentation that evolves with code
## Common Pitfalls
- **Breaking characters** — avoid `{}` in comments; escape special characters
- **Syntax errors** — misspellings break diagrams; validate in Mermaid Live
- **Overcomplexity** — split complex diagrams into multiple focused views
- **Missing relationships** — document all important connections between entities
- **Stale diagrams** — a wrong diagram is worse than no diagram; update when systems change
## NEVER Do
1. **NEVER create diagrams with more than 15 nodes** — they become unreadable; split into multiple focused diagrams
2. **NEVER leave arrows unlabeled** — every connection should explain the relationship or data flow
3. **NEVER create diagrams without a title or caption** — context-free diagrams are useless outside the author's head
4. **NEVER use diagrams as the sole documentation** — pair diagrams with prose that explains the "why"
5. **NEVER let diagrams go stale** — update diagrams when architecture changes; stale diagrams mislead
6. **NEVER use Mermaid for data visualization** — Mermaid is for architecture and flow diagrams, not charts of business data
【全棧能力】程式設計大神.Skill:面向複雜真實專案的高階全棧程式設計助手。不止生成程式碼,而是從一句目標接手陌生程式碼庫,拆解需求、補齊實現、追到根因、完成重構、聯調前後端,並把結果推進到能執行、能驗證、能交付。覆蓋 Web、後端、指令碼、iOS、安卓、鴻蒙 ArkUI、微信小程式及其他技術棧,支援中英文工程、疑難 Bug、跨模組任務和長任務續做;用構建、日誌、真實入口、裝置或介面證據說明結果。僅問概念時直接回答,要求落地時持續推進到驗收或明確阻塞。
程式設計專家 Pro:融合程式設計專家 2.0.3 工程專題與程式設計大神的鴻蒙 ArkTS/ArkUI、微信小程式和小遊戲開發資料。用於專案實現、根因除錯、審查、重構、測試、架構效能分析及多端開發驗證。支援自然語言和 @專題標識,按任務讀取包內知識;只問概念時直接回答。
程式設計專家.Skill P8級程式設計助手,25年實戰經驗技能Skill,全棧:Java/Php網站/軟體專案、API設計、Bug診斷、程式碼生成、程式碼審查、重構、測試用例、效能基準、技術選型、文件生成、任務拆解、Spec驅動、Karpathy規範、CMS二次開發、前端設計、MySQL/Mariadb、專案知識圖譜,以及工程紀律層(根因除錯硬閉環、階段導航、事故復盤/SLO、威脅建模/供應鏈安全、生產就緒/漸進式釋出、AI編碼治理、面向Agent程式碼可讀性、LLM應用安全)。支援 @標識 顯式呼叫跳過路由。
程式設計專家.Skill P8級程式設計助手,25年實戰經驗技能Skill,全棧:Java/Php網站/軟體專案、API設計、Bug診斷、程式碼生成、程式碼審查、重構、測試用例、效能基準、技術選型、文件生成、任務拆解、Spec驅動、Karpathy規範、CMS二次開發、前端設計、MySQL/Mariadb、專案知識圖譜,以及工程紀律層(根因除錯硬閉環、階段導航、事故復盤/SLO、威脅建模/供應鏈安全、生產就緒/漸進式釋出、AI編碼治理、面向Agent程式碼可讀性、LLM應用安全)。支援 @標識 顯式呼叫跳過路由。
程式設計專家 Pro:融合程式設計專家 2.0.3 工程專題與程式設計大神的鴻蒙 ArkTS/ArkUI、微信小程式和小遊戲開發資料。用於專案實現、根因除錯、審查、重構、測試、架構效能分析及多端開發驗證。支援自然語言和 @專題標識,按任務讀取包內知識;只問概念時直接回答。
程式設計專家 Pro:融合程式設計專家 2.0.3 工程專題與程式設計大神的鴻蒙 ArkTS/ArkUI、微信小程式和小遊戲開發資料。用於專案實現、根因除錯、審查、重構、測試、架構效能分析及多端開發驗證。支援自然語言和 @專題標識,按任務讀取包內知識;只問概念時直接回答。
程式設計專家.Skill P8級程式設計助手,25年實戰經驗技能Skill,全棧:Java/Php網站/軟體專案、API設計、Bug診斷、程式碼生成、程式碼審查、重構、測試用例、效能基準、技術選型、文件生成、任務拆解、Spec驅動、Karpathy規範、CMS二次開發、前端設計、MySQL/Mariadb、專案知識圖譜,以及工程紀律層(根因除錯硬閉環、階段導航、事故復盤/SLO、威脅建模/供應鏈安全、生產就緒/漸進式釋出、AI編碼治理、面向Agent程式碼可讀性、LLM應用安全)。支援 @標識 顯式呼叫跳過路由。
用 gh 命令列工具檢視 GitHub 上的 PR 檢查、工作流執行與 API 查詢的技能。
按維度逐項檢查程式碼質量與安全的評審技能。
e2e-testing-patterns 彙集 Playwright 與 Cypress 的關鍵使用者流程測試模式。
UI Design:提供介面佈局、字型、色彩、間距、無障礙和元件設計指導。
給程式碼質量立規矩的技能。
用 Tailwind 搭生產級元件庫:變體、複合元件與主題。
資料月份:2026-10 · 下載/星標數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。