In the Skill's Own Terms
A skill for creating, editing and validating draw.io diagram files (.drawio, .drawio.svg, .drawio.png) by generating correct mxGraph XML. It handles flowcharts, system architecture, sequence diagrams, ER diagrams and UML class diagrams through templates in assets/templates/, while network topology, BPMN and mind maps fall back to shape libraries or manual work.
The agent gets a six-step workflow, a semantic color palette with ready-to-use style strings, a pre-delivery validation checklist and optional Python scripts (validate-drawio.py, add-shape.py). It is aimed at agents working in a repository where diagrams sit alongside the code they document, and generated files are meant to open immediately in the hediet.vscode-drawio VS Code extension.
What it produces
- The .drawio file itself, written to the path you requested.
- A one-sentence summary of what the diagram shows.
- Validation status, reporting whether the validator script was run and passed.
- Editing instructions when you are likely to customise the diagram: click a shape to select it, double-click to edit the label, drag to reposition.
How It Works
- 01Pin Down the Request
The workflow starts by establishing diagram type, entities or actors, relationships, output path and whether the file is new or an edit.
- 02Reuse a Template or the Minimal Skeleton
When the diagram type matches one under assets/templates/, copy that structure and swap the placeholder values; for novel layouts start from the minimal valid mxfile skeleton with the two root cells.
- 03Plan the Layout Before Writing XML
Sketch rows or tiers first, then space shapes on the grid — 40-60px horizontally between same-row shapes, 80-120px between tier rows, on a default A4 landscape canvas of 1169 x 827 px.
- 04Generate the mxGraph XML
Write vertex and edge cells with unique ids and matching parent references, and escape XML special characters in labels so the file stays well-formed.
- 05Apply Styles from the Palette
Style strings come from a fixed semantic palette — primary/info #dae8fc with #6c8ebf, warning/decision #fff2cc with #d6b656, error/end #f8cecc with #b85450 — so the same purpose keeps the same colour across a project.
- 06Save, Validate, Hand Over
Write the file to the requested path with a .drawio extension, optionally run the validator, then tell the user how to open it and summarise what is in the diagram.