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.
This skill is based on the draw.io CLI workflow from jgraph/drawio-mcp/skill-cli and adapted for GRC professionals.
How to Create a Diagram
- Generate draw.io XML in mxGraphModel format for the requested diagram.
- Write the XML to a
.drawiofile in the current working directory using the Write tool. - Validate XML well-formedness before claiming the diagram is ready.
- Post-process edge routing when
npx @drawio/postprocessis already available. Skip silently if it is unavailable. Do not install it or ask the user about it. - If the user requested
png,svg, orpdf, locate the draw.io CLI, export with embedded XML, then delete the source.drawiofile after a successful export. - If the CLI is not found, keep the
.drawiofile and tell the user they can install the draw.io desktop app to enable export or open the.drawiofile directly. - Open the result when the environment supports it. If open fails, print the absolute file path.
Choosing the Output Format
Check the user's request for a format preference.