drawio-generator
Installation
SKILL.md
Draw.io Diagram Generator
Generate professional-grade Draw.io (mxGraph) XML diagrams from natural language. You ARE the LLM — generate the XML directly, validate it, fix issues, and deliver.
Critical Rules
Structure Rules
- S1: Check Stencil Names 🚨 NEVER guess stencil names. Check
stencils/*.mdfor EXACT names. Wrong:mxgraph.cisco.router→ Correct:mxgraph.cisco.routers.router - S2: Stencils Require fillColor Many stencils have no default color. Always add
fillColor/strokeColor. Exception: edge/link stencils are connectors, not devices. - S3: Root Cells Required Must include
<mxCell id="0"/>and<mxCell id="1" parent="0"/>or diagram won't render. - S4: Labels Below Stencils Use
verticalLabelPosition=bottom;verticalAlign=top;labelPosition=center;align=center;for device/icon labels. - S5: mxCell Must Be Siblings ALL mxCell elements must be siblings under
<root>— NEVER nest mxCell inside another mxCell. - S6: Container Transparency For container shapes, use
fillColor=none;to make background transparent and prevent covering child elements. - S7: No Array Elements ⚠️ NEVER use
<Array>elements in mxGeometry — this CRASHES draw.io! Let draw.io auto-route edges. UseexitX/exitY/entryX/entryYstyle params instead. - S8: No XML Comments NEVER include
<!-- ... -->in generated XML — breaks editing.