Roman Meclazcke

Draw.io Professional Diagrams

開發程式設計v1.0.0
作者:Roman Meclazcke更新於 2026-05-11drawio@clawhub_romanmeclazcke/drawio
程式碼生成指令碼工具#Database

據 AlphaMoat 統計,截至 2026-10,Draw.io Professional Diagrams 累計下載 11,774 次、獲 7 個星標,按累計下載量在本次參與排名的 10,914 個 AI 技能中排名第 2,334 位,在「開發程式設計」分類(1,069 個)中排名第 168 位。

列表預設按累計下載量排序,也可按星標排序;詳情頁排名按累計下載量計算。

累計下載
1.2萬
星標
7
全站下載量排名
#2,334
全站前 22% · 「開發程式設計」前 16%
平台累計下載星標評論
ClawHub ↗38777-
SkillHub ↗1.2萬7—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

先識別圖型別和關係,建立對應 XML,校驗標識與結構,儲存 drawio 檔案並匯出 PNG 供複核。文件涵蓋資料庫、類、時序、流程和架構圖,可選 SVG 或 PDF。建立檔案前需確認製圖意圖、檔名與格式,並核驗本地匯出器。

資料釋出於 2026-10-27

可以用來做什麼

  • 準備可編輯技術圖和 PNG 預覽

什麼時候用

  • 使用者明確需要 drawio 圖及經複核匯出時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

識別圖型別和關係,確認輸出路徑,校驗 XML,並準備 PNG 預覽與可編輯檔案。

月度資料趨勢

累計下載1.2萬
50265561.3萬2026-03 · 累計下載 13372026-05 · 累計下載 24152026-06 · 累計下載 29342026-07 · 累計下載 37602026-08 · 累計下載 46962026-09 · 累計下載 63012026-10 · 累計下載 1.2萬26-0326-0926-10
星標7
4672026-03 · 星標 42026-05 · 星標 52026-06 · 星標 72026-07 · 星標 72026-08 · 星標 72026-09 · 星標 72026-10 · 星標 726-0326-0926-10

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-101.2萬—7
2026-096301—7
2026-084696+24.9%7
2026-073760+28.2%7
2026-062934+21.5%7
2026-052415—5
2026-031337—4

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

5.3 KB · ClawHub v1.0.0
---
name: drawio
description: Generate professional draw.io diagrams (ERD/database tables, class diagrams, sequence diagrams, flowcharts, architecture diagrams) and export them as PNG. Use when the user requests any kind of diagram, database model, class structure, flow, or system visualization.
metadata:
  openclaw:
    requires:
      bins: ["drawio"]
---

# Draw.io Diagram Generation Skill
展開全部(共 150 行)

## When to use this skill
- User requests a database diagram, ERD, or entity-relationship diagram
- User requests a class diagram or UML class structure
- User requests a sequence diagram or interaction diagram
- User requests a flowchart or process flow
- User requests an architecture diagram or system overview
- User mentions "draw.io", "diagram", "table", "entity", "class", "sequence", "flow"

---

## ⚠️ MANDATORY RULES — READ BEFORE GENERATING ANYTHING

1. **ALWAYS detect the diagram type first** before writing any XML
2. **NEVER mix styles** between diagram types — each type has its own strict XML structure
3. **ALWAYS assign unique sequential IDs** to every `mxCell` starting from 0
4. **NEVER use `\n` inside a `value` attribute** — use separate rows/cells instead
5. **ALWAYS calculate table/class heights correctly** using the formulas provided
6. **ALWAYS validate the XML structure** before saving
7. **ALWAYS export to PNG and include the PNG in the response before asking about other formats** — this step is non-negotiable
8. **NEVER use generic rounded rectangles** for database tables or class entities
9. **ALWAYS apply consistent spacing between diagram elements**
   - Horizontal spacing between elements: **minimum 120px**
   - Vertical spacing between rows or steps: **minimum 100px**
   - Tables/classes must not overlap
   - Relationship lines must not cross through table headers

---

## STEP 0 — Diagram Type Detection

Before generating any XML, identify the diagram type from the user's request:

| User says... | Diagram type |
|---|---|
| "database", "ERD", "tables", "entities", "foreign key" | → **TYPE 1: ERD** |
| "class", "UML", "inheritance", "attributes", "methods" | → **TYPE 2: Class Diagram** |
| "sequence", "interaction", "lifeline", "actor calls" | → **TYPE 3: Sequence Diagram** |
| "flowchart", "flow", "process", "decision", "steps" | → **TYPE 4: Flowchart** |
| "architecture", "system", "services", "components" | → **TYPE 5: Architecture** |

---

## Diagram Type References
Use the detailed rules/templates in these files based on the detected type.

- ERD / Database: `ERD.md`
- UML Class: `CLASS.md`
- Sequence: `SEQUENCE.md`
- Flowchart: `FLOWCHART.md`
- Architecture: `LAYOUT.md`


---

## Generation Workflow — ALWAYS follow this exact order

### Step 1 — Identify diagram type
Determine TYPE 1–5 from the user's message before writing any XML.

### Step 2 — Plan all elements
List every entity/class/participant and all relationships before coding.

### Step 3 — Create output folder
```bash
mkdir -p ./diagrams
```

### Step 4 — Write and save the XML
Save to `./diagrams/<diagram-name>.drawio`

**Mandatory pre-save checklist:**
- [ ] All `mxCell` elements have unique sequential numeric IDs
- [ ] ERD tables use `shape=table` with `shape=tableRow` rows (never generic shapes)
- [ ] Class diagrams use `swimlane` with attribute block, divider line, and method block
- [ ] Sequence diagrams have lifelines, activation boxes, and correct arrow styles
- [ ] ERD relationship arrows connect to **row cell IDs**, not table container IDs
- [ ] Heights calculated correctly: `30 + (columns x 30)` for ERD tables
- [ ] No literal `\n` in value attributes (use `&#xa;` for multiline text cells only)
- [ ] XML is well-formed and all tags are closed

### Step 5 — Export to PNG
```bash
# macOS
/Applications/draw.io.app/Contents/MacOS/draw.io -x -f png --scale 2 -o ./diagrams/<name>.png ./diagrams/<name>.drawio

# Linux / headless
xvfb-run -a drawio -x -f png --scale 2 -o ./diagrams/<name>.png ./diagrams/<name>.drawio
```

### Step 6 — Verify output
```bash
ls -lh ./diagrams/<name>.png
```

### Step 7 — Show PNG first (MANDATORY)

Always respond with the PNG image first (embed/attach it in the response).

### Step 8 — Ask the user for delivery format (MANDATORY)

After showing the PNG, ALWAYS ask the user which additional format they want:

---
The diagram is ready! Which format would you like?

1 - PNG image (ready to view)
2 - .drawio file (editable in draw.io)
3 - SVG (scalable vector)
4 - PDF
5 - All of the above

Reply with the number(s) of your choice.
---

Then based on the response:
- **1** → send the PNG file
- **2** → send the .drawio file
- **3** → export SVG and send it
- **4** → export PDF and send it
- **5** → send all formats
- **Multiple numbers** (e.g. "1 2") → send all requested formats

---

## Other export formats
```bash
# SVG (scalable vector)
/Applications/draw.io.app/Contents/MacOS/draw.io -x -f svg -o ./diagrams/<name>.svg ./diagrams/<name>.drawio

# PDF
/Applications/draw.io.app/Contents/MacOS/draw.io -x -f pdf -o ./diagrams/<name>.pdf ./diagrams/<name>.drawio

# High-res PNG (scale 3)
/Applications/draw.io.app/Contents/MacOS/draw.io -x -f png --scale 3 -o ./diagrams/<name>_hd.png ./diagrams/<name>.drawio

# Transparent background
/Applications/draw.io.app/Contents/MacOS/draw.io -x -f png -t --scale 2 -o ./diagrams/<name>_transparent.png ./diagrams/<name>.drawio
```

「開發程式設計」分類下的熱門技能

程式設計大神.Skill開發程式設計

【全棧能力】程式設計大神.Skill:面向複雜真實專案的高階全棧程式設計助手。不止生成程式碼,而是從一句目標接手陌生程式碼庫,拆解需求、補齊實現、追到根因、完成重構、聯調前後端,並把結果推進到能執行、能驗證、能交付。覆蓋 Web、後端、指令碼、iOS、安卓、鴻蒙 ArkUI、微信小程式及其他技術棧,支援中英文工程、疑難 Bug、跨模組任務和長任務續做;用構建、日誌、真實入口、裝置或介面證據說明結果。僅問概念時直接回答,要求落地時持續推進到驗收或明確阻塞。

↓ 1125.9萬★ 82u_42bbb65f
程式設計專家Pro.Skill開發程式設計

程式設計專家 Pro:融合程式設計專家 2.0.3 工程專題與程式設計大神的鴻蒙 ArkTS/ArkUI、微信小程式和小遊戲開發資料。用於專案實現、根因除錯、審查、重構、測試、架構效能分析及多端開發驗證。支援自然語言和 @專題標識,按任務讀取包內知識;只問概念時直接回答。

↓ 626.9萬★ 32user_47d655f0
程式設計專家.Skill開發程式設計

程式設計專家.Skill P8級程式設計助手,25年實戰經驗技能Skill,全棧:Java/Php網站/軟體專案、API設計、Bug診斷、程式碼生成、程式碼審查、重構、測試用例、效能基準、技術選型、文件生成、任務拆解、Spec驅動、Karpathy規範、CMS二次開發、前端設計、MySQL/Mariadb、專案知識圖譜,以及工程紀律層(根因除錯硬閉環、階段導航、事故復盤/SLO、威脅建模/供應鏈安全、生產就緒/漸進式釋出、AI編碼治理、面向Agent程式碼可讀性、LLM應用安全)。支援 @標識 顯式呼叫跳過路由。

↓ 600.7萬★ 378user_741dc82b
dev-expert開發程式設計

程式設計專家.Skill P8級程式設計助手,25年實戰經驗技能Skill,全棧:Java/Php網站/軟體專案、API設計、Bug診斷、程式碼生成、程式碼審查、重構、測試用例、效能基準、技術選型、文件生成、任務拆解、Spec驅動、Karpathy規範、CMS二次開發、前端設計、MySQL/Mariadb、專案知識圖譜,以及工程紀律層(根因除錯硬閉環、階段導航、事故復盤/SLO、威脅建模/供應鏈安全、生產就緒/漸進式釋出、AI編碼治理、面向Agent程式碼可讀性、LLM應用安全)。支援 @標識 顯式呼叫跳過路由。

↓ 528.1萬★ 32user_814dbe54
dev-expert-pro開發程式設計

程式設計專家 Pro:融合程式設計專家 2.0.3 工程專題與程式設計大神的鴻蒙 ArkTS/ArkUI、微信小程式和小遊戲開發資料。用於專案實現、根因除錯、審查、重構、測試、架構效能分析及多端開發驗證。支援自然語言和 @專題標識,按任務讀取包內知識;只問概念時直接回答。

↓ 104.7萬★ -user_814dbe54
程式設計專家 Pro開發程式設計

程式設計專家 Pro:融合程式設計專家 2.0.3 工程專題與程式設計大神的鴻蒙 ArkTS/ArkUI、微信小程式和小遊戲開發資料。用於專案實現、根因除錯、審查、重構、測試、架構效能分析及多端開發驗證。支援自然語言和 @專題標識,按任務讀取包內知識;只問概念時直接回答。

↓ 98.2萬★ 1user_28275a78
程式設計專家.Skill開發程式設計

程式設計專家.Skill P8級程式設計助手,25年實戰經驗技能Skill,全棧:Java/Php網站/軟體專案、API設計、Bug診斷、程式碼生成、程式碼審查、重構、測試用例、效能基準、技術選型、文件生成、任務拆解、Spec驅動、Karpathy規範、CMS二次開發、前端設計、MySQL/Mariadb、專案知識圖譜,以及工程紀律層(根因除錯硬閉環、階段導航、事故復盤/SLO、威脅建模/供應鏈安全、生產就緒/漸進式釋出、AI編碼治理、面向Agent程式碼可讀性、LLM應用安全)。支援 @標識 顯式呼叫跳過路由。

↓ 70.1萬★ 6user_613b33ea
Github開發程式設計

用 gh 命令列工具檢視 GitHub 上的 PR 檢查、工作流執行與 API 查詢的技能。

↓ 48萬★ 714Peter Steinberger

資料月份:2026-10 · 下載/星標數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。