| name | drawio |
| description | Generate draw.io diagrams (.drawio files) with optional PNG/SVG/PDF export. Triggers on diagram/flowchart/ER/sequence/class/network/architecture/wireframe/mockup/UI sketch requests. |
| argument-hint | [format] [diagram description] |
| allowed-tools | Bash(drawio*), Bash(grep*), Bash(cmd.exe*), Bash(open*), Bash(xdg-open*), Bash(wslpath*), Bash(rm*), Bash(which*), Read, Write |
| author | Maki |
| version | 1.0.0 |
| tags | ["diagram","drawio","visualization","documentation","svg","png"] |
| required_env | [] |
| required_bins | ["drawio"] |
| platforms | ["macos","linux","windows"] |
| safety_level | safe |
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
- Write the XML to a
.drawio file in the current working directory using the Write tool
- If the user requested an export format (png, svg, pdf), locate the draw.io CLI (see below), export with
--embed-diagram, then delete the source .drawio file. If the CLI is not found, keep the .drawio file and tell the user they can install the draw.io desktop app to enable export, or open the .drawio file directly
- Open the result — the exported file if exported, or the
.drawio file otherwise. If the open command fails, print the file path so the user can open it manually
Choosing the output format
Check the user's request for a format preference. Examples:
/drawio create a flowchart → flowchart.drawio
/drawio png flowchart for login → login-flow.drawio.png
/drawio svg: ER diagram → er-diagram.drawio.svg
/drawio pdf architecture overview → architecture-overview.drawio.pdf
If no format is mentioned, just write the .drawio file and open it in draw.io. The user can always ask to export later.
Supported export formats
| Format | Embed XML | Notes |
|---|
png | Yes (-e) | Viewable everywhere, editable in draw.io |
svg | Yes (-e) | Scalable, editable in draw.io |
pdf | Yes (-e) | Printable, editable in draw.io |
jpg | No | Lossy, no embedded XML support |
PNG, SVG, and PDF all support — the exported file contains the full diagram XML, so opening it in draw.io recovers the editable diagram.