You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use when creating, editing, or reviewing draw.io diagrams and mxGraph XML in .drawio, .drawio.svg, or .drawio.png files.
applyTo
**/*.drawio,**/*.drawio.svg,**/*.drawio.png
draw.io Diagram Standards
Skill: Load .github/skills/draw-io/SKILL.md for full workflow, XML recipes, and troubleshooting before generating or editing any .drawio file.
Required Workflow
Follow these steps for every draw.io task:
Identify the diagram type (flowchart / architecture / sequence / ER / UML / network / BPMN)
Select the matching template from .github/skills/draw-io/templates/ and adapt it, or start from the minimal skeleton
Plan the layout on paper before writing XML — define tiers, actors, or entities first
Generate valid mxGraph XML following the rules below
Validate using python .github/skills/draw-io/scripts/validate-drawio.py <file>
Confirm the file renders by opening it in VS Code with the draw.io extension (hediet.vscode-drawio)
XML Structure Rules (Non-Negotiable)
<!-- Set modified to the current ISO 8601 timestamp when generating a new file -->
<mxfilehost="Electron"modified=""version="26.0.0">
<diagramid="unique-id"name="Page Name">
<mxGraphModel ...>
<root>
<mxCellid="0" /> <!-- REQUIRED: always first -->
<mxCellid="1"parent="0" /> <!-- REQUIRED: always second --><!-- all other cells go here -->
</root>
</mxGraphModel>
</diagram>
</mxfile>
id="0" and id="1"must be present and must be the first two cells — no exceptions
Every cell id must be unique within the diagram
Every vertex (vertex="1") must have a child <mxGeometry x y width height as="geometry">
Every edge (edge="1") must have source/target pointing to existing vertex ids — exception: floating edges (sequence diagram lifelines) use <mxPoint as="sourcePoint"> and <mxPoint as="targetPoint"> inside <mxGeometry> instead of source/target attributes
Every cell except id=0 must have parent pointing to an existing id
Children of a container (swimlane) use coordinates relative to their parent, not the canvas
Mandatory Style Conventions
Semantic Color Palette — Use consistently across the project
Role
fillColor
strokeColor
Primary / Info (default)
#dae8fc
#6c8ebf
Success / Start / Positive
#d5e8d4
#82b366
Warning / Decision
#fff2cc
#d6b656
Error / End / Danger
#f8cecc
#b85450
Neutral / Interface
#f5f5f5
#666666
External / Partner
#e1d5e7
#9673a6
Always include on vertex shapes
whiteSpace=wrap;html=1;
Use html=1 whenever a label contains HTML tags (<b>, <i>, <br>)