Install
openclaw skills install drawio-generatorGenerate draw.io diagrams from Mermaid, XML, or CSV code. Use this skill when the user requests any visual diagram including flowcharts, UML diagrams, ERD, a...
openclaw skills install drawio-generatorGenerate interactive draw.io diagrams that users can open and edit in their browser.
Draw.io supports virtually any diagram type:
| Format | Best For |
|---|---|
| Mermaid | Flowcharts, sequences, ERD, Gantt, state diagrams, class diagrams |
| CSV | Hierarchical data (org charts), bulk import from spreadsheets |
| XML | Complex layouts, precise positioning, custom styling, icons, shapes |
Write the diagram code in the chosen format (see examples below).
Run the script scripts/generate_drawio_url.py (relative to this SKILL.md file) to create the markdown link.
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Action]
B -->|No| D[End]
<mxGraphModel>
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="2" value="Box" style="rounded=1;fillColor=#d5e8d4;" vertex="1" parent="1">
<mxGeometry x="100" y="100" width="120" height="60" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
# label: %name%
# style: rounded=1;whiteSpace=wrap;html=1;
# connect: {"from":"manager","to":"name","invert":true}
# layout: auto
name,manager
CEO,
CTO,CEO
CFO,CEO
When generating draw.io XML, the output must be well-formed XML:
--) inside XML comments. Use single hyphens or rephrase (e.g., <!-- Order 1 to OrderItem --> not <!-- Order 1 --- OrderItem -->)&, <, >, ")The script generate_drawio_url.py is located in the scripts/ subdirectory relative to this SKILL.md file. Execute it with command-line arguments:
python scripts/generate_drawio_url.py -t mermaid -c "graph TD\n A --> B"
python scripts/generate_drawio_url.py --type xml --code "<mxGraphModel>...</mxGraphModel>"
python scripts/generate_drawio_url.py -t csv -c "name,manager\nCEO,\nCTO,CEO"
Arguments:
-t, --type: Diagram type (required), choices: mermaid, xml, csv-c, --code: Diagram code content (required)The script outputs a markdown link: [点击查看图表](<URL>)
Present the markdown link directly to the user.