diagram-types
Comprehensive guide to all diagram types with selection criteria, notation rules, and draw.io implementation
What this skill does
# Diagram Types Reference
## Quick Selection Guide
| Need | Diagram Type | Complexity |
|------|-------------|------------|
| Show a process/workflow | Flowchart | Low |
| Model classes and relationships | UML Class | Medium |
| Show message flows over time | UML Sequence | Medium |
| Model object lifecycle | UML State | Medium |
| Show parallel/concurrent flows | UML Activity | Medium |
| Show system modules | UML Component | Medium |
| Show infrastructure layout | UML Deployment | Medium |
| Show user interactions | UML Use Case | Low |
| Describe architecture at scale | C4 Model | Low-High |
| Model business processes | BPMN 2.0 | High |
| Design database schema | ER Diagram | Medium |
| Map network topology | Network Diagram | Medium |
| Document cloud infrastructure | Cloud Architecture | Medium |
| Show Kubernetes resources | Kubernetes Diagram | Medium |
| Brainstorm ideas | Mindmap | Low |
| Show reporting structure | Org Chart | Low |
| Plan project timeline | Gantt Chart | Medium |
| Show cross-team processes | Swimlane | Medium |
| Analyze security threats | Threat Model | High |
---
## Flowcharts
### When to Use
Process documentation, decision logic, algorithms, onboarding guides, troubleshooting trees.
### Shapes and Notation
| Shape | Style | Meaning |
|-------|-------|---------|
| Rounded rectangle | `rounded=1;whiteSpace=wrap;html=1;` | Process / action step |
| Diamond | `rhombus;` | Decision (Yes/No branching) |
| Oval / stadium | `ellipse;` | Terminator (start/end) |
| Parallelogram | `shape=parallelogram;perimeter=parallelogramPerimeter;` | Input/Output |
| Rectangle | (default) | Generic step |
| Cylinder | `shape=cylinder3;` | Database / data store |
| Document | `shape=document;` | Document / report |
| Predefined process | `shape=process;` | Subroutine / predefined process |
### Swimlane Variant
Horizontal or vertical lanes partition a flowchart by role or department:
```xml
<mxCell id="lane1" value="Frontend" style="swimlane;startSize=30;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="0" y="0" width="300" height="400" as="geometry"/>
</mxCell>
<mxCell id="lane2" value="Backend" style="swimlane;startSize=30;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="300" y="0" width="300" height="400" as="geometry"/>
</mxCell>
```
### Minimal XML Example
```xml
<mxGraphModel>
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="start" value="Start" style="ellipse;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="160" y="20" width="80" height="40" as="geometry"/>
</mxCell>
<mxCell id="step1" value="Process Request" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="130" y="100" width="140" height="60" as="geometry"/>
</mxCell>
<mxCell id="dec1" value="Approved?" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="150" y="200" width="100" height="80" as="geometry"/>
</mxCell>
<mxCell id="end" value="End" style="ellipse;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="1">
<mxGeometry x="160" y="330" width="80" height="40" as="geometry"/>
</mxCell>
<mxCell id="e1" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="start" target="step1" parent="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e2" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="step1" target="dec1" parent="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e3" value="Yes" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="dec1" target="end" parent="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
```
---
## UML Class Diagrams
### When to Use
Object-oriented design, domain modeling, API contracts, data model documentation.
### Notation
| Element | Representation |
|---------|---------------|
| Class | Rectangle with 3 compartments: name, attributes, methods |
| Abstract class | Name in italics |
| Interface | `<<interface>>` stereotype |
| Visibility | `+` public, `-` private, `#` protected, `~` package |
| Static member | Underlined |
### Relationship Types
| Relationship | Arrow Style | draw.io Style |
|-------------|-------------|---------------|
| Inheritance (extends) | Solid line, hollow triangle | `endArrow=block;endFill=0;` |
| Interface (implements) | Dashed line, hollow triangle | `endArrow=block;endFill=0;dashed=1;` |
| Association | Solid line, open arrow | `endArrow=open;endFill=0;` |
| Directed association | Solid line, filled arrow | `endArrow=open;endFill=1;` |
| Aggregation | Solid line, hollow diamond at parent | `startArrow=diamond;startFill=0;endArrow=none;` |
| Composition | Solid line, filled diamond at parent | `startArrow=diamond;startFill=1;endArrow=none;` |
| Dependency | Dashed line, open arrow | `dashed=1;endArrow=open;endFill=0;` |
### Multiplicity Labels
Place as edge labels: `0..1`, `1`, `0..*`, `1..*`, `*`
### draw.io Class Shape
```xml
<mxCell id="cls1" value="<p style='margin:0;padding:4px;font-weight:bold;border-bottom:1px solid #666;'>User</p><p style='margin:0;padding:4px;text-align:left;border-bottom:1px solid #ccc;'>- id: Long<br/>- name: String<br/>- email: String</p><p style='margin:0;padding:4px;text-align:left;'>+ getName(): String<br/>+ setEmail(e: String)</p>"
style="verticalAlign=top;align=center;overflow=fill;html=1;whiteSpace=wrap;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="100" y="100" width="200" height="150" as="geometry"/>
</mxCell>
```
---
## UML Sequence Diagrams
### When to Use
API call flows, authentication sequences, microservice communication, protocol documentation.
### Notation
| Element | Style |
|---------|-------|
| Lifeline | `shape=umlLifeline;perimeter=lifelinePerimeter;container=1;collapsible=0;recursiveResize=0;size=40;` |
| Activation box | Narrow filled rectangle on lifeline |
| Sync message | Solid line, filled arrowhead: `endArrow=block;endFill=1;` |
| Async message | Solid line, open arrowhead: `endArrow=async;endFill=0;` or `endArrow=open;endFill=0;` |
| Return message | Dashed line, open arrowhead: `dashed=1;endArrow=open;endFill=0;` |
| Self-call | Loop back to same lifeline |
| Create message | Dashed line to new lifeline: `dashed=1;endArrow=open;endFill=1;` |
| Destroy | X marker: `shape=umlDestroy;` |
### Combined Fragments
| Fragment | Meaning | Style |
|----------|---------|-------|
| `alt` | Alternative (if/else) | `shape=umlFrame;` with label `alt` |
| `opt` | Optional (if without else) | `shape=umlFrame;` with label `opt` |
| `loop` | Loop/iteration | `shape=umlFrame;` with label `loop` |
| `par` | Parallel execution | `shape=umlFrame;` with label `par` |
| `break` | Break from enclosing fragment | `shape=umlFrame;` with label `break` |
| `critical` | Critical region | `shape=umlFrame;` with label `critical` |
### Minimal Example
```xml
<mxGraphModel>
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="client" value=":Client" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;outlineConnect=0;size=40;" vertex="1" parent="1">
<mxGeometry x="80" y="20" width="100" height="300" as="geometry"/>
</mxCell>
<mxCell id="server" value=":Server" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;outlineConnect=0;size=40;" vertex="1" parent="1">
<mxGeometry x="280" y="20" width="100" height="300" as="geometry"/>
</mxCell>
<mxCell id="msg1" value="request()" style="endArrow=block;endFill=1;" edge="1" parent="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="130" y="90" as="sourcePoint"/>
<mxPoint x="325" y="90" as="targetPoint"/Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.