drawio-impl-templates
Installation
SKILL.md
Draw.io Template Implementation
Purpose
This skill enables correct use of Draw.io templates for starting new diagrams and creating reusable diagram templates. It prevents the most common mistake: rebuilding complex diagrams from scratch when a suitable template exists.
Critical Rules (Memorize These)
- ALWAYS use the standard
<mxfile>wrapper for template files — NEVER output bare<mxGraphModel>when creating a reusable template. - ALWAYS include both structural cells (
id="0"root andid="1"default parent) in every template. - ALWAYS use unique, descriptive cell IDs in templates — NEVER use numeric-only IDs like
"2","3". Use semantic IDs like"header","process_1","decision_auth". - ALWAYS include
whiteSpace=wrap;html=1;in every shape style within a template. - NEVER hard-code user-specific content in templates — use placeholder text (e.g.,
"[Process Name]","[Decision]") that signals replacement. - ALWAYS set
grid="1"andguides="1"in themxGraphModelattributes of every template. - NEVER embed images or external resources in templates — templates MUST be self-contained XML.