drawio-core-xml-format
Installation
SKILL.md
Draw.io Core XML Format
Purpose
This skill teaches the complete mxGraph XML format used by Draw.io (.drawio) files. It enables correct programmatic generation, reading, and modification of diagrams.
Critical Rules (Memorize These)
- ALWAYS generate uncompressed XML — Set
compressed="false"or use the simplified format. - ALWAYS include both structural cells —
<mxCell id="0"/>and<mxCell id="1" parent="0"/>. - NEVER use duplicate cell IDs — Every ID MUST be unique across the entire file (all pages).
- ALWAYS use
html=1in style when labels contain HTML markup. - NEVER generate compressed/Base64-encoded content — LLMs cannot perform DEFLATE compression.
XML Hierarchy
Draw.io uses a strict four-level nesting: