drawio-impl-er-diagrams

Installation
SKILL.md

Draw.io ER Diagram Implementation

Purpose

This skill enables correct generation of entity-relationship diagrams, database schemas, and data models in Draw.io mxGraph XML. It enforces crow's foot notation for cardinality, proper entity table structures, and PK/FK visual conventions. The most common AI mistake is using generic arrows (endArrow=classic) instead of ER-specific markers (ERone, ERmany, etc.).

Critical Rules (Memorize These)

  1. ALWAYS use entityRelationEdgeStyle for ER relationships — NEVER use orthogonalEdgeStyle or default edge routing.
  2. ALWAYS use ER-specific arrow markers (ERone, ERmany, ERmandOne, ERzeroToOne, ERoneToMany, ERzeroToMany) — NEVER use endArrow=classic or endArrow=block in ER diagrams.
  3. ALWAYS set startFill=0 and endFill=0 on ER edges — crow's foot markers MUST use Fill=0. Setting Fill=1 produces incorrect filled shapes.
  4. ALWAYS use shape=table;childLayout=tableLayout;container=1; for entity shapes — this produces the standard database table appearance with a header row and stacked attribute rows.
  5. ALWAYS place attribute rows as children of the entity — every attribute mxCell MUST have parent="<entity_id>". NEVER use parent="1".
  6. ALWAYS mark primary key fields with fontStyle=4; (underline) — this is the standard ER convention for PKs.
  7. ALWAYS mark foreign key fields with fontStyle=2; (italic) — this distinguishes FKs from regular attributes.
  8. ALWAYS include both structural cells (id="0" and id="1" with parent="0") in every diagram.

Entity Table Shape

Installs
1
GitHub Stars
4
First Seen
Jun 1, 2026
drawio-impl-er-diagrams — impertio-studio/draw.io-claude-skill-package