drawio-impl-uml
Installation
SKILL.md
Draw.io UML Diagram Implementation
Purpose
This skill enables correct generation of UML diagrams in Draw.io mxGraph XML. It covers the five most common UML diagram types: class, sequence, use case, state machine, and activity. The most common AI mistake is using generic arrows (endArrow=classic) instead of UML-specific connector styles (open diamond for aggregation, filled diamond for composition, hollow triangle for generalization).
Critical Rules (Memorize These)
- ALWAYS use
endArrow=block;endFill=0for generalization/inheritance — the hollow triangle. NEVER useendFill=1which produces a filled triangle (wrong UML semantics). - ALWAYS use
startArrow=diamond;startFill=0for aggregation — the open diamond. NEVER usestartFill=1which produces composition instead. - ALWAYS use
startArrow=diamond;startFill=1for composition — the filled diamond. The fill distinguishes composition from aggregation. - ALWAYS use
dashed=1for dependency and realization edges — solid lines are WRONG for these relationship types. - ALWAYS use
shape=umlLifeline;perimeter=lifelinePerimeterfor sequence diagram participants — NEVER use plain rectangles with manual dashed lines. - ALWAYS use
shape=umlActorfor UML actors — NEVER useshape=ellipseor stick-figure images. - ALWAYS use the 3-compartment swimlane pattern for UML classes — class name header, attributes compartment, operations compartment, separated by
linecells. - ALWAYS include both structural cells (
id="0"andid="1"withparent="0") in every diagram. - ALWAYS use
endArrow=open;endFill=0;dashed=1for return messages in sequence diagrams — NEVER use solid lines for returns. - ALWAYS place use cases inside the system boundary container — NEVER place them at
parent="1"when a system boundary exists.