Skills uml
Create UML diagrams using PlantUML syntax. Best for software modeling — Class, Sequence, Activity, State Machine, Component, Use Case, and Deployment diagrams with concise text-based notation and auto-layout.
install
source · Clone the upstream repo
git clone https://github.com/markdown-viewer/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/markdown-viewer/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/uml" ~/.claude/skills/markdown-viewer-skills-uml && rm -rf "$T"
manifest:
uml/SKILL.mdsource content
UML Diagram Generator
Quick Start: Choose diagram type → Write PlantUML text → Define elements and relationships → Wrap in
```plantuml fence.
⚠️ IMPORTANT: Always use
or```plantumlcode fence. NEVER use```puml— it will NOT render as a diagram.```text
Critical Rules
- Every diagram starts with
and ends with@startuml@enduml - Use standard PlantUML keywords:
,class
,interface
,abstract
,enum
,actor
,participant
,component
,node
,databasepackage - Relationships use arrow syntax:
,-->
,<|--
,*--
,o--
,..>..|> - Use
for global styling and colorsskinparam - Use
on individual elements for specific colors#color - Notes use
,note left of
,note right of
, or standalonenote overnote "text" as N
UML Diagram Types
| Type | Purpose | Key Syntax | Example |
|---|---|---|---|
| Class | Class structure and relationships | , , | class-diagram.md |
| Sequence | Message interactions over time | , , | sequence-diagram.md |
| Activity | Workflow and process flow | , , | activity-diagram.md |
| Swimlane Activity | Multi-role activity with swimlanes | , | swimlane-activity-diagram.md |
| State Machine | Object lifecycle states | , | state-machine-diagram.md |
| Component | System component organization | , , | component-diagram.md |
| Use Case | User-system interactions | , , | use-case-diagram.md |
| Deployment | Physical deployment architecture | , , | deployment-diagram.md |
| Object | Runtime object snapshot | | object-diagram.md |
| Package | Module organization | | package-diagram.md |
| Communication | Object collaboration | Numbered messages with sequence syntax | communication-diagram.md |
| Composite Structure | Internal class structure | with nested | composite-structure-diagram.md |
| Interaction Overview | Activity + sequence combination | , | interaction-overview-diagram.md |
| Profile | UML extension mechanisms | labels | profile-diagram.md |
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>
— the stencil shape key (e.g.mxgraph.<namespace>.<icon>
,mxgraph.aws4.lambda
)mxgraph.kubernetes.pod
— display text (quoted if contains spaces, unquoted for single word)"Label"
— identifier for use in relationshipsas <alias>
— optional override color (e.g.#color
,#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