tiago-oliveira-ca/zenodotus-harness/puml-diagrams
Claude Code and agent skill by tiago-oliveira-ca/zenodotus-harness
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
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-diagramsSemi-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:
- Identify the audience and the question the diagram must answer.
- Choose the smallest diagram type that communicates that view clearly.
- Decide whether to store the diagram as a standalone
.pumlfile 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.
- Prefer local includes and local themes over remote dependencies.
- Validate syntax and rendering when tooling exists; if not, state that the diagram was not
render-validated.
Core Rules
- One diagram per
.pumlfile; 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:
| Platform | Native PlantUML support | What to do | |
|---|---|---|---|
| GitHub | No. 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. | |
| GitLab | Yes, 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. | |
| Confluence | No 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. | |
| MkDocs | No 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). | |
| Docusaurus | No native support. | Typically remark-kroki (via a Kroki server) or a remark PlantUML plugin. | |
| Antora | No 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.
.pumlis 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/(ordocs/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
autonumberby 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, andgroupblocks for control flow. - Distinguish sync and async messaging intentionally with arrow styles.
Example
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(orLAYOUT_LEFT_RIGHT()in C4) when it improves readability
and reduces vertical sprawl.
- Common macros beyond the example below:
Person_Ext/System_Extfor 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
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
startand end withstoporend. - Use
if/elseorswitchconstructs for decision branches. - Use
fork/fork again/end forkfor parallel paths. - Use partitions or swimlanes when ownership matters.
- Keep action labels short and verb-led.
Example
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
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
packagewhen the model spans multiple bounded areas.
Example
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
- SKILL.md in the repositoryCheckingskills/puml-diagrams/SKILL.md
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
[](https://verified-skill.com/skills/tiago-oliveira-ca/zenodotus-harness/puml-diagrams)