plantuml-skill
Use when user requests diagrams, flowcharts, sequence diagrams, class diagrams, component diagrams, ER diagrams, architecture charts, or visualizations — including generating a diagram from existing source code, or rendering/extracting PlantUML embedded in a Markdown file to images (e.g. preparing docs for Confluence/Notion). Also use proactively when explaining systems with 3+ components, APIs, data flows, or class hierarchies. Generates .puml files and exports to PNG/SVG via Kroki API (no loca
Security Assessment
Detected risks:
About plantuml-skill
Generating PlantUML diagrams and exporting them to PNG or SVG through the Kroki rendering API, which needs no local installation beyond curl. Supported diagram types include sequence, component, class, ER, activity, use case, state, and C4. Five modes route the work: Generate from a text description as the default, From code to diagram existing source, Embed to render PlantUML inside a Markdown document to images, Refine to change an existing diagram, and Review to assess whether an existing image is readable.
The workflow writes a .puml file with the start and end markers, then exports via a Kroki POST while capturing the HTTP status. A validate-and-self-correct loop is emphasized: a blind curl is never trusted, because Kroki returns a 400 on syntax errors and writes the error text into the output file, so the process checks the status code, that the file is non-empty, and that the bytes are a real image. On failure it reads Kroki's error and retries up to three times, degrading through a defined order that simplifies shapes, strips skinparam and themes, removes notes, simplifies labels, reduces edges, and finally switches diagram type.
A vision-based self-check then reads the rendered PNG for readability problems that auto-layout cannot prevent, such as label truncation, overlap, wrong orientation, edge spaghetti, and low contrast, limited to two rounds, followed by a review loop for user feedback. Three rendering backends are offered: the public Kroki API, a local Kroki Docker instance, or a local PlantUML jar with Java and Graphviz. A privacy note warns that public Kroki uploads the diagram source, and the document routes non-UML or heavily styled needs to mermaid, drawio, or excalidraw.
FAQ
What needs to be installed to use it?
Only curl for the default public Kroki API. Optionally a local Kroki Docker instance, or a local PlantUML jar with Java and Graphviz, can be used for offline rendering.
Which diagram types are supported?
Sequence, component, class, ER, activity, use case, state, C4, and more, chosen to fit the content being described.
Can it diagram existing source code?
Yes. The From code mode generates a diagram from existing source, following a dedicated reference before running the shared render loop.
How does it handle render failures?
A validate-and-self-correct loop checks the HTTP status and the output bytes, reads Kroki's error, and retries up to three times, degrading through a defined simplification order before giving up.
Is there a privacy consideration with the default renderer?
Yes. The public Kroki API uploads the .puml source to kroki.io, so sensitive diagrams should use a local Kroki or PlantUML backend instead.
Install plantuml-skill
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
agents365-ai/365-skills