PlantUML Diagrams
Produce structurally valid PlantUML with explicit semantics and readable layout.
Routing
- Choose PlantUML for UML, C4, enterprise architecture, or
.puml output.
- Choose the
mermaid skill for lightweight diagrams embedded directly in Markdown. Install with: npx skills add full-stack-skills/document-skills --skill mermaid.
- Choose the
processon-diagram-generator skill when hosted editing or ProcessOn output is explicitly required. Install with: npx skills add full-stack-skills/document-skills --skill processon-diagram-generator.
- Do not ask the user to choose a renderer when the requested notation or target format already determines it.
Workflow
- Extract actors, components, types, states, messages, or deployment nodes from the request and source.
- Select the diagram family and intended abstraction level.
- Generate a complete source block with matching start/end directives.
- Use aliases for long names and packages/boundaries for meaningful grouping.
- Validate with a local PlantUML renderer when available; otherwise perform structural checks.
- Save a
.puml file only when requested or when integrating into an existing documentation tree.
Diagram selection
| Need |
Primary syntax |
| Runtime interaction |
sequence, participant, actor |
| Static type model |
class, interface, relationships |
| Logical architecture |
component, package, interface |
| Runtime topology |
node, cloud, database, artifact |
| Lifecycle |
state, [*] |
| Workflow |
start, if, while, fork, stop |
| User goals |
actor, usecase |
| C4 model |
C4 include plus Person, System, Container, Component |
Load only the matching file under examples/ when syntax details are needed.
Authoring rules
- Wrap standard UML diagrams in
@startuml and @enduml.
- Define aliases once and reuse them consistently.
- Label relationships with purpose or protocol when it improves understanding.
- Separate logical architecture from deployment topology when one diagram becomes crowded.
- Keep C4 levels distinct; do not mix context, container, and component detail without an explicit reason.
- Avoid remote
!include dependencies unless the user accepts network-dependent rendering.
- Do not invent components, protocols, multiplicities, or calls that are unsupported by evidence.
Output
Inline delivery:
```plantuml
@startuml
actor User
participant API
database DB
User -> API: Submit request
API -> DB: Persist data
DB --> API: Result
API --> User: Response
@enduml
```
File delivery: prefer docs/diagrams/<descriptive-name>.puml unless the repository defines another convention. Never overwrite silently.
Validation checklist
- Start/end directives match.
- Aliases and referenced elements are defined.
- Relationship direction and multiplicity are intentional.
- C4 includes are available in the target rendering environment.
- No secrets or machine-specific paths appear in source.
- Local rendering succeeds when a renderer is available.
1---2name: plantuml3description: Create or revise PlantUML source for precise UML and architecture documentation, including class, sequence, component, deployment, state, activity, use-case, ER, ArchiMate, and C4 diagrams. Use when the user explicitly requests PlantUML, UML, C4, `.puml`, standard UML semantics, or detailed architecture notation. Prefer Mermaid for lightweight Markdown-native diagrams and ProcessOn only for hosted editable rendering.4---56# PlantUML Diagrams78Produce structurally valid PlantUML with explicit semantics and readable layout.910## Routing1112- Choose PlantUML for UML, C4, enterprise architecture, or `.puml` output.13- Choose the **`mermaid`** skill for lightweight diagrams embedded directly in Markdown. Install with: `npx skills add full-stack-skills/document-skills --skill mermaid`.14- Choose the **`processon-diagram-generator`** skill when hosted editing or ProcessOn output is explicitly required. Install with: `npx skills add full-stack-skills/document-skills --skill processon-diagram-generator`.15- Do not ask the user to choose a renderer when the requested notation or target format already determines it.1617## Workflow18191. Extract actors, components, types, states, messages, or deployment nodes from the request and source.202. Select the diagram family and intended abstraction level.213. Generate a complete source block with matching start/end directives.224. Use aliases for long names and packages/boundaries for meaningful grouping.235. Validate with a local PlantUML renderer when available; otherwise perform structural checks.246. Save a `.puml` file only when requested or when integrating into an existing documentation tree.2526## Diagram selection2728| Need | Primary syntax |29|---|---|30| Runtime interaction | `sequence`, `participant`, `actor` |31| Static type model | `class`, `interface`, relationships |32| Logical architecture | `component`, `package`, `interface` |33| Runtime topology | `node`, `cloud`, `database`, `artifact` |34| Lifecycle | `state`, `[*]` |35| Workflow | `start`, `if`, `while`, `fork`, `stop` |36| User goals | `actor`, `usecase` |37| C4 model | C4 include plus `Person`, `System`, `Container`, `Component` |3839Load only the matching file under `examples/` when syntax details are needed.4041## Authoring rules4243- Wrap standard UML diagrams in `@startuml` and `@enduml`.44- Define aliases once and reuse them consistently.45- Label relationships with purpose or protocol when it improves understanding.46- Separate logical architecture from deployment topology when one diagram becomes crowded.47- Keep C4 levels distinct; do not mix context, container, and component detail without an explicit reason.48- Avoid remote `!include` dependencies unless the user accepts network-dependent rendering.49- Do not invent components, protocols, multiplicities, or calls that are unsupported by evidence.5051## Output5253Inline delivery:5455````markdown56```plantuml57@startuml58actor User59participant API60database DB61User -> API: Submit request62API -> DB: Persist data63DB --> API: Result64API --> User: Response65@enduml66```67````6869File delivery: prefer `docs/diagrams/<descriptive-name>.puml` unless the repository defines another convention. Never overwrite silently.7071## Validation checklist7273- Start/end directives match.74- Aliases and referenced elements are defined.75- Relationship direction and multiplicity are intentional.76- C4 includes are available in the target rendering environment.77- No secrets or machine-specific paths appear in source.78- Local rendering succeeds when a renderer is available.