drawio
Installation
SKILL.md
Draw.io Diagram Skill
Generate draw.io diagrams as native .drawio files. Optionally export to PNG, SVG, or PDF with the diagram XML embedded (so the exported file remains editable in draw.io).
How to create a diagram
- Generate draw.io XML in mxGraphModel format for the requested diagram
- Create a subfolder
<DRAWIO_OUTPUT_DIR>/<diagram-name>/and write the XML to<DRAWIO_OUTPUT_DIR>/<diagram-name>/<diagram-name>.drawiousing the Write tool (NOT the current working directory) - If the user requested an export format (png, svg, pdf), export using the draw.io CLI with
--embed-diagramto the same subfolder, then delete the source.drawiofile - Open the result -- the exported file if exported, or the
.drawiofile otherwise
Choosing the output format
Check the user's request for a format preference. Examples:
/drawio create a flowchart-><DRAWIO_OUTPUT_DIR>/flowchart/flowchart.drawio/drawio png flowchart for login-><DRAWIO_OUTPUT_DIR>/login-flow/login-flow.drawio.png/drawio svg: ER diagram-><DRAWIO_OUTPUT_DIR>/er-diagram/er-diagram.drawio.svg/drawio pdf architecture overview-><DRAWIO_OUTPUT_DIR>/architecture-overview/architecture-overview.drawio.pdf