tiago-oliveira-ca/zenodotus-harness/puml-diagrams

Claude Code and agent skill by tiago-oliveira-ca/zenodotus-harness

Trust tier 2
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Standards for creating, reviewing, and formatting PlantUML (PUML) diagrams — which diagram type to use, file/include organization, platform rendering support (GitHub does not render PlantUML natively), and when to generate a diagram from source instead of hand-maintaining it. Use for any architecture, C4, sequence, activity, state, class, ER, or deployment diagram in PlantUML. Trigger on: "draw a diagram of", "diagram this flow", "sequence diagram", "C4 diagram", "architecture diagram", "ER dia…

Install

npx vskill@latest install tiago-oliveira-ca/zenodotus-harness/puml-diagrams

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as tiago-oliveira-ca/zenodotus-harness/puml-diagrams.

PlantUML (PUML) Diagrams

Use this skill when creating or reviewing PlantUML diagrams that need to be readable, maintainable, and suitable for repository documentation. Prefer focused diagrams that answer one question for one audience. Treat .puml files as source code: one diagram per file, version-controlled alongside the thing they describe, styled through shared includes rather than copy-pasted skinparam blocks.

For preprocessor directives, layout control, and the skinparam-vs-<style> migration, see references/layout-and-styling.md. For CI/pre-commit rendering pipelines, per-platform embedding details, and generating diagrams from source (OpenAPI, DB schema, Python), see references/tooling-and-generation.md.

Diagram Workflow

Before writing diagram code:

  1. Identify the audience and the question the diagram must answer.
  2. Choose the smallest diagram type that communicates that view clearly.
  3. Decide whether to store the diagram as a standalone .puml file or embed it in markdown —

this decision depends on where it will be viewed; see Platform Rendering Reality below before assuming any platform renders PlantUML the same way GitHub renders Mermaid.

  1. Prefer local includes and local themes over remote dependencies.
  2. Validate syntax and rendering when tooling exists; if not, state that the diagram was not

render-validated.

Core Rules

  • One diagram per .puml file; it should explain one view or interaction.
  • Store diagrams as code alongside the relevant documentation, conventionally under

docs/diagrams/ (or docs/architecture/diagrams/) mirroring the code structure, with a sibling globals/ or _styles/ directory for shared includes. See File Organization below.

  • Use consistent layout direction and naming within a document set.
  • Label arrows with real protocols, commands, events, or data contracts.
  • Add notes or legends only when they reduce ambiguity.
  • Split diagrams when they become crowded, cross heavily, or exceed a readable scope — this is

the single most effective fix for PlantUML's Graphviz-driven layout getting confused on large graphs; don't spend a long time fighting layout hints before trying this first.

  • Prefer generating a diagram from its source of truth (DB schema, OpenAPI spec, Python domain

model) over hand-maintaining one that will drift. See references/tooling-and-generation.md for concrete tools.

Platform Rendering Reality

Verify where a diagram will actually be viewed before assuming it renders. This is the most consequential thing to get wrong, since it's invisible until someone opens the file on the platform in question:

PlatformNative PlantUML supportWhat to do
GitHubNo. GitHub renders Mermaid natively but PlantUML support isn't scheduled.Render to SVG/PNG in CI and commit/link the image, or use the public PlantUML proxy in an ![]() image URL, or a browser extension for local viewing. Don't commit a bare .puml expecting it to render in a README or PR diff preview.
GitLabYes, but only after an admin configures a PlantUML server for the instance.Use a fenced plantuml code block; GitLab always rasterizes to PNG. The ::include directive can pull a .puml from the repo but only resolves post-commit, not in the editor preview.
ConfluenceNo native support.Requires a Marketplace app; several exist, and cloud-hosted ones typically send your diagram source to a vendor render server — self-host a PlantUML server if the diagram content is sensitive.
MkDocsNo native support.Add a plugin: plantuml-markdown (fenced blocks via pymdownx.superfences), mkdocs-build-plantuml-plugin (pre-generates images), or mkdocs-plantuml-local (renders without a public server).
DocusaurusNo native support.Typically remark-kroki (via a Kroki server) or a remark PlantUML plugin.
AntoraNo native support.asciidoctor-kroki pointed at a Kroki server; keep source in partials/ and include:: it into a [plantuml] block.

If a diagram must render with zero build step directly in a GitHub PR or README, that's a signal to use Mermaid for that specific diagram instead — see Formatting and Maintenance below.

File Organization

  • One diagram per `.puml` file. .puml is the standalone-diagram extension; use .iuml

("include UML") by convention for fragments meant to be !included and never rendered on their own — PlantUML doesn't require either extension (it keys off @startuml), but the distinction signals intent to the next reader.

  • A common, worth-adopting layout: docs/diagrams/ (or docs/architecture/diagrams/) holding

individual .puml files, plus a sibling globals/ (or _styles/) directory holding a shared stylesheet.iuml that centralizes skinparam/colors/legend conventions and is !included from every diagram. A change to the stylesheet then propagates everywhere instead of needing a find-and-replace across every diagram file.

  • Use descriptive, kebab-case file names that name the view, not just the subject:

auth-login-sequence.puml, checkout-container-view.puml — not diagram1.puml or orders.puml.

1. Sequence Diagrams

Use sequence diagrams for request flows, async interactions, orchestration logic, and cross-service behavior over time. Sequence diagrams do not require Graphviz to render (PlantUML lays them out itself) — they're the safest diagram type to use in an environment where Graphviz isn't installed or you want to avoid the dependency.

Best Practices
  • Use autonumber by default unless numbering adds noise.
  • Pick accurate participant types: actor, participant, database, queue,

collections.

  • Keep activation and deactivation balanced across all branches.
  • Use alt, opt, loop, par, and group blocks for control flow.
  • Distinguish sync and async messaging intentionally with arrow styles.
Example
plantuml
@startuml
title Login Flow
autonumber
skinparam sequenceMessageAlign center
actor User as user
participant "Web App" as web
participant "Auth Service" as auth
database "User DB" as user_db
user -> web : Submit credentials
activate web
web -> auth : POST /login
activate auth
auth -> user_db : SELECT password_hash
activate user_db
user_db --> auth : password_hash
deactivate user_db
auth -> auth : Verify password
alt Valid credentials
auth --> web : 200 JWT
deactivate auth
web --> user : Login successful
else Invalid credentials
auth --> web : 401 Unauthorized
deactivate auth
web --> user : Show error message
end
deactivate web
@enduml

2. Architecture and C4 Diagrams

Use component, container, context, or deployment-style views for system structure and boundaries. If the project already uses the C4-PlantUML library, stay consistent with it. C4 diagrams (like most non-sequence UML types below) need a working Graphviz install to render — confirm the render environment has it, or fall back to !pragma layout smetana if it doesn't (see references/layout-and-styling.md).

Best Practices
  • Prefer C4 for context/container/component views when the repo already supports it. Get most

of the value from Context and Container levels; use Component only for a genuinely complex container; skip Code/Level 4 entirely unless it's generated from source — hand- drawn code-level diagrams go stale almost immediately.

  • Prefer local includes such as !include ./vendor/c4/C4_Container.puml, or the version

bundled in the PlantUML standard library (!include <C4/C4_Container>) if the project doesn't vendor its own copy.

  • Do not assume remote !include (URL form) access is available in the render environment.
  • If local C4 macros are unavailable, fall back to plain PlantUML shapes instead of blocking.
  • Show trust boundaries, external systems, and protocols explicitly.
  • Use left to right direction (or LAYOUT_LEFT_RIGHT() in C4) when it improves readability

and reduces vertical sprawl.

  • Common macros beyond the example below: Person_Ext/System_Ext for things outside the

boundary, Container_Boundary for grouping within a system, and directional Rel_U/Rel_D/Rel_L/Rel_R when the default relationship layout looks wrong. SHOW_LEGEND() or SHOW_FLOATING_LEGEND() renders the standard C4 legend.

  • If applying a C4 theme (names beginning C4_, e.g. C4_united), the !theme ... from ...

line must come before the C4 !include statements, not after.

C4 Example
plantuml
@startuml
!include ./vendor/c4/C4_Container.puml
LAYOUT_LEFT_RIGHT()
Person(customer, "Customer", "Places orders")
System_Boundary(system, "E-Commerce Platform") {
Container(web_app, "Web App", "Angular", "Customer-facing UI")
Container(order_api, "Order API", "FastAPI", "Handles checkout and orders")
ContainerDb(order_db, "Order DB", "PostgreSQL", "Orders and payment state")
}
System_Ext(payment_gateway, "Payment Gateway", "External card processor")
Rel(customer, web_app, "Uses", "HTTPS")
Rel(web_app, order_api, "Submits orders", "HTTPS/JSON")
Rel(order_api, order_db, "Reads and writes", "SQL")
Rel(order_api, payment_gateway, "Charges card", "HTTPS/JSON")
@enduml
Plain PlantUML Fallback

If C4 macros are unavailable, use package, component, database, cloud, and node constructs to produce an equivalent focused view.

3. Activity Diagrams

Use activity diagrams for business workflows, decision logic, approvals, batch processing, and procedural flows.

Best Practices
  • Use the modern syntax shown below (start/stop/:action;/if) — it doesn't require

Graphviz. The older arrow-based activity syntax ((*) --> "action") still works but is no longer recommended for new diagrams.

  • Start with start and end with stop or end.
  • Use if / else or switch constructs for decision branches.
  • Use fork / fork again / end fork for parallel paths.
  • Use partitions or swimlanes when ownership matters.
  • Keep action labels short and verb-led.
Example
plantuml
@startuml
start
:Receive order request;
:Validate payload;
if (Inventory available?) then (yes)
:Reserve stock;
fork
:Create order record;
fork again
:Publish order-created event;
end fork
:Return confirmation;
stop
else (no)
:Return out-of-stock response;
stop
endif
@enduml

4. State Diagrams

Use state diagrams for lifecycle modeling of entities such as orders, tickets, jobs, or documents.

Best Practices
  • Always define the initial [*] and terminal [*] states.
  • Put triggers or events on transitions.
  • Add guard conditions as [condition] where business rules matter.
  • Use composite states when a lifecycle would otherwise sprawl.
Example
plantuml
@startuml
hide empty description
[*] --> Pending
Pending --> Processing : Payment approved
Pending --> Cancelled : [Payment failed]
Processing --> Shipped : Package handed to carrier
Shipped --> Delivered : Delivery confirmed
Cancelled --> [*]
Delivered --> [*]
@enduml

5. Class Diagrams

Use class diagrams when modeling static structure, domain concepts, inheritance, key fields, or high-level API relationships. Do not turn them into full code dumps.

Best Practices
  • Show only the attributes and methods needed for the discussion.
  • Prefer domain meaning over implementation noise.
  • Mark multiplicity on relationships where it matters.
  • Use composition and aggregation intentionally; do not add arrows without meaning.
  • Group related concepts with package when the model spans multiple bounded areas.
Example
plantuml
@startuml
class Order {
+id: UUID
+status: OrderStatus
+submit()
+cancel()
}
class OrderLine {
+sku: String
+quantity: Integer
}
class Customer {
+customerId: UUID
+email: String
}
Order "1" *-- "1..*" OrderLine
Customer "1" --> "0..*" Order
@enduml

6. ER Diagrams

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/tiago-oliveira-ca/zenodotus-harness/puml-diagrams/badge)](https://verified-skill.com/skills/tiago-oliveira-ca/zenodotus-harness/puml-diagrams)

Something wrong with this skill or its page? Tell us.