drawio-diagram
Draw.io Diagram
Produce a valid, readable native .drawio file. Native XML is the source of truth and remains beside any export. This skill exists for draw.io compatibility and editability; a generic technical diagram belongs to technical-diagram.
Quick path
-
Form the reader brief in the content contract below. Reduce the source to one question and one answer before choosing cells.
-
Derive the required nodes, edges, groups, and annotations from that brief. Read
references/local/editorial-principles.mdandreferences/local/editorial-default-style.mdunless the user supplied a different style or an existing file already establishes one. -
Read
references/local/upstream-drawio-rules.md. Start with uncompressed baremxGraphModelXML unless pages or file metadata require<mxfile>. -
Read
references/local/auto-layout.mdand apply the simplest suitable automatic layout. Preserve explicit semantic grouping. -
Run both validators from the skill root:
python3 scripts/validate_drawio_xml.py <file>.drawio python3 scripts/validate_drawio_layout.py <file>.drawio -
For every new diagram or substantial visual edit, export and inspect SVG or PNG when an exporter is available. Apply
references/local/review-loop.md. If automatic layout leaves a collision or ambiguous route, readreferences/local/edge-routing.md, fix only those routes, and validate again.