SKILL.md
$27
UML Diagram Types
Type
Purpose
Key Syntax
Example
Class
Class structure and relationships
class, interface, <|--
Sequence
Message interactions over time
participant, ->, -->
Activity
Workflow and process flow
start, :action;, if/else
Swimlane Activity
Multi-role activity with swimlanes
|Lane|, :action;
State Machine
Object lifecycle states
state, [*] -->
Component
System component organization
component, [name], interface
Use Case
User-system interactions
actor, usecase, (name)
Deployment
Physical deployment architecture
node, artifact, database
Object
Runtime object snapshot
object "name" as id
Package
Module organization
package "name"
Communication
Object collaboration
Numbered messages with sequence syntax
Composite Structure
Internal class structure
component with nested port
composite-structure-diagram.md
Interaction Overview
Activity + sequence combination
group, ref over
interaction-overview-diagram.md
Profile
UML extension mechanisms
<<stereotype>> labels
Mxgraph Stencil Icons
draw-uml supports 9500+ mxgraph stencil icons (AWS, Azure, Cisco, Kubernetes, etc.) via the mxgraph.* syntax. Default colors are applied automatically — you do NOT need to specify fillColor or strokeColor.
Full stencil reference: See stencils/README.md.
Syntax
mxgraph.<namespace>.<icon> "Label" as <alias>
mxgraph.<namespace>.<icon> "Label" as <alias> #color
mxgraph.<namespace>.<icon> <alias>
mxgraph.<namespace>.<icon>— the stencil shape key (e.g.mxgraph.aws4.lambda,mxgraph.kubernetes.pod)
"Label"— display text (quoted if contains spaces, unquoted for single word)
as <alias>— identifier for use in relationships
#color— optional override color (e.g.#FF6600,#LightBlue)
Examples
@startuml
' Simple icon declaration
mxgraph.aws4.lambda "Lambda\nFunction" as fn
mxgraph.aws4.api_gateway "API GW" as gw
mxgraph.aws4.dynamodb "DynamoDB" as db
gw --> fn
fn --> db
@enduml
@startuml
' Kubernetes architecture with icons
mxgraph.kubernetes.ing "Ingress" as ing
mxgraph.kubernetes.svc "Service" as svc
mxgraph.kubernetes.pod "Pod" as pod
mxgraph.kubernetes.deploy "Deployment" as deploy
ing --> svc
svc --> pod
deploy --> pod
@enduml
@startuml
' Mixing standard UML with stencil icons
node "Cloud" {
mxgraph.aws4.ec2 "EC2" as ec2
mxgraph.aws4.rds "RDS" as rds
}
database "Legacy DB" as legacy
ec2 --> rds
rds --> legacy
@enduml