Generate professional draw.io diagrams (ERD/database tables, class diagrams, sequence diagrams, flowcharts, architecture diagrams) and export them as PNG. Us...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install drawio或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install drawio⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/drawio/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- 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"] ---
---
mxCell starting from 0\n inside a value attribute — use separate rows/cells instead- 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
---
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 |
---
Use the detailed rules/templates in these files based on the detected type.
ERD.mdCLASS.mdSEQUENCE.mdFLOWCHART.mdLAYOUT.md---
Determine TYPE 1–5 from the user's message before writing any XML.
List every entity/class/participant and all relationships before coding.
mkdir -p ./diagrams
Save to ./diagrams/
Mandatory pre-save checklist:
mxCell elements have unique sequential numeric IDsshape=table with shape=tableRow rows (never generic shapes)swimlane with attribute block, divider line, and method block30 + (columns x 30) for ERD tables\n in value attributes (use
for multiline text cells only)# 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
ls -lh ./diagrams/<name>.png
Always respond with the PNG image first (embed/attach it in the response).
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:
---
# 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安装 Draw.io Professional Diagrams 后,可以对 AI 说这些话来触发它
Help me get started with Draw.io Professional Diagrams
Explains what Draw.io Professional Diagrams does, walks through the setup, and runs a quick demo based on your current project
Use Draw.io Professional Diagrams to generate professional draw
Invokes Draw.io Professional Diagrams with the right parameters and returns the result directly in the conversation
What can I do with Draw.io Professional Diagrams in my data & analytics workflow?
Lists the top use cases for Draw.io Professional Diagrams, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/drawio/ 目录(个人级,所有项目可用),或 .claude/skills/drawio/(项目级)。重启 AI 客户端后,用 /drawio 主动调用,或让 AI 根据上下文自动发现并使用。
Draw.io Professional Diagrams 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Draw.io Professional Diagrams 可免费安装使用。请查阅仓库了解许可证信息。
Generate professional draw.io diagrams (ERD/database tables, class diagrams, sequence diagrams, flowcharts, architecture diagrams) and export them as PNG. Us...
Draw.io Professional Diagrams 属于「Data & Analytics」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my data & analytics tasks using Draw.io Professional Diagrams
Identifies repetitive steps in your workflow and sets up Draw.io Professional Diagrams to handle them automatically