Agent skill for generating clean Kroki diagrams, interactive SVG viewers, and auto-built diagram indexes.
SaferSkills independently audited kroki-diagrams (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Create repository-friendly visual artifacts that stay readable under change. This skill uses Kroki as the renderer when a diagram is the right answer, but starts by choosing the right artifact family for the user’s intent before picking an engine.
references/use-case-taxonomy.md.references/diagram-selection.md and references/engine-matrix.md.references/output-placement.md.references/style-guide.md, the engine scaffold in references/engine-style-templates.md, and the layout constraints in references/layout-control.md.scripts/render_kroki_diagram.py only if it is a Kroki-backed diagram. Pass --summary "<one line saying what the diagram shows>" so the gallery card describes it.index.html in the artifact base unless there is a strong reason not to.interactive.html wrapper when the user asks for something clickable or explorable, or when the diagram has more than about 15 nodes. Read references/interactive-support.md first.Load references/use-case-taxonomy.md first.
Pick in this order:
If the problem contains more than one distinct concern, split it into multiple diagrams instead of forcing everything into one.
Then:
references/diagram-selection.md for type-level guidancereferences/engine-matrix.md for engine tradeoffsreferences/output-placement.md for where the artifact should liveExamples:
Sequence -> plantumlC4 Container -> c4plantumlDAG -> graphvizER -> erdWBS -> plantumlGantt -> mermaidText tree -> no Kroki engineLoad references/output-placement.md before writing files.
Default placement order:
docs/diagrams/ convention if presentdocs/diagrams/<artifact-name>/ if docs/ existsdiagrams/<artifact-name>/ at repo rootUse one folder per artifact:
<artifact-name>/
source.<ext>
rendered.svg
rendered.pngIf the artifact is text-only, only write the source file.
Load references/style-guide.md before drafting the diagram. Load references/engine-style-templates.md when writing a Kroki-backed source file. Load references/layout-control.md when the diagram has enough edges or groups that auto-layout might tangle it.
Non-negotiable rules:
splines=spline by default. splines=ortho merges edges into shared trunks and should only be used for small pipelines.Use:
python3 scripts/render_kroki_diagram.py --engine plantuml --input /path/to/<artifact>/source.puml --output /path/to/<artifact>/rendered.svg --summary "Checkout request flow from web to Stripe"The gallery and viewer title comes from the artifact folder name, so give the folder a descriptive name.
or:
python3 scripts/render_kroki_diagram.py --engine c4plantuml --input /path/to/diagram.puml --output /path/to/diagram.svgOther supported engines:
python3 scripts/render_kroki_diagram.py --engine mermaid --input /path/to/diagram.mmd --output /path/to/diagram.svg
python3 scripts/render_kroki_diagram.py --engine graphviz --input /path/to/diagram.dot --output /path/to/diagram.svg
python3 scripts/render_kroki_diagram.py --engine erd --input /path/to/diagram.erd --output /path/to/diagram.svgThe script also prints a shareable Kroki URL for the generated source. It also writes per-artifact metadata (including that shareable Kroki URL) and refreshes the parent index.html collection page by default, so every normal artifact render updates the directory overview automatically unless --skip-index is passed. The generated index.html is a modern gallery: an engine filter rail with live counts, diagram search, grid and list views, a dark/light theme toggle, per-engine accents, interactive-tier badges, a per-card copy-Kroki-URL action, and an empty state.
To build the interactive wrapper at the same time:
python3 scripts/render_kroki_diagram.py --engine plantuml --input /path/to/diagram.puml --output /path/to/rendered.svg --interactive-output /path/to/interactive.htmlThe wrapper is a refined dark viewer (with a light theme toggle) and adds:
Read references/interactive-support.md before promising identical behavior across every engine.
When the user asks for a diagram or structure artifact, return:
interactive.html if an interactive wrapper was written.index.html if the render step updated it.If the user only asked for the diagram, keep the surrounding explanation short.
Use the compatibility harness in references/kroki-safe-subset.md as the default baseline.
Prefer:
plantuml and c4plantuml as the main architecture defaultsgraphviz for graph-heavy structuremermaid for simple flowchartserd for schema diagramsIf a render fails, simplify before trying exotic shapes or styling.
Do not support every Kroki engine equally.
Use this tiering:
plantuml, c4plantuml, graphviz, mermaiderdOnly choose a secondary or explicit-request engine when it is clearly better for the user’s question.
Treat bpmn as experimental until we have a stable passing smoke sample in this repo.
scripts/render_kroki_diagram.py renders curated Kroki engines and prints a shareable URL.scripts/build_diagram_index.py builds the index.html gallery for a directory of diagram artifacts (filter rail, search, grid/list, dark/light theme, empty state).references/use-case-taxonomy.md maps user intent to diagram families and types.references/diagram-selection.md explains which diagram family to choose.references/engine-matrix.md explains when one engine is better than another.references/output-placement.md explains where artifacts should live in the repo.references/style-guide.md explains how to keep diagrams readable.references/engine-style-templates.md provides engine-specific style headers and cross-engine visual defaults.references/layout-control.md explains how to force direction, grouping, spacing, and split points to avoid spaghetti layouts.references/kroki-safe-subset.md summarizes the tested compatibility baseline.references/interactive-support.md explains which engines support click-and-flow behavior and how to generate it.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.