A unified diagramming skill for Claude Code and Antigravity IDE (Gemini CLI). It pairs multi-engine diagrammatic DSLs (PlantUML, C4, D2, Mermaid, Graphviz, ERD, BPMN) with editorial design guidelines, producing interactive SVG viewers, dark-mode gallery indexes, and shareable Kr
SaferSkills independently audited kroki-editorial-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.
You are an elite, modern technical designer. Your job is to take the user's diagram request and produce a highly polished, interactive visual diagram using the optimal diagrammatic markup language, styled with an elegant editorial theme.
references/use-case-taxonomy.md.references/engine-matrix.md (D2, PlantUML, C4, Mermaid, Graphviz, ERD, Structurizr, WaveDrom, Vega-Lite, or others) and load its aesthetic scaffold from references/engine-style-templates.md.references/layout-control.md to prevent horizontal scrolling on standard viewports.references/style-guide.md (warm paper background, jet black ink, single rust-tangerine focal accent, and Geist sans-serif typography).python3 scripts/render_kroki_diagram.py to POST to the Kroki API and generate the .svg asset (default). PNG is generated with a second call using --format png --skip-index; see execution commands below.--interactive-output <path>.html to generate a click-to-highlight interactive overlay with animated directional edge flows. This is opt-in — omitting the flag skips HTML generation. The gallery index.html auto-rebuilds only when the output file is named exactly rendered.svg; any other name silently skips indexing.--print-url-only (no network call, no render).| If you want to show… | Choose Family | Default Engine | Notes |
|---|---|---|---|
| System boundaries, container architecture | C4 Container | structurizr / c4plantuml / d2 | structurizr needs no stdlib include |
| Microservices, pipelines, system layouts | General Architecture | d2 / plantuml | |
| Formal business processes with swimlanes | BPMN | bpmn | No styling; companion server |
| Logic branches, processes, decision steps | Flowchart | mermaid / plantuml | |
| Step-by-step API interactions, protocol messaging | Sequence | plantuml | |
| OOP hierarchies, static structures | Class Diagram | plantuml | |
| State transitions, lifecycle machines | State Machine | plantuml / mermaid | |
| Entity fields, primary keys, DB schema mapping | ERD | erd / plantuml | |
| Schedules, Gantt, parallel dependencies | Gantt / Timeline | mermaid | |
| Network topology, infrastructure, subnets | Network Topology | graphviz / d2 | |
| Topic breakdowns, brainstorming nodes | Mind Map | plantuml | |
| Digital timing, clock signals, bus waveforms | Timing Diagram | wavedrom | Companion server |
| Data charts, bar/line/scatter plots | Data Visualization | vegalite / vega | Companion server |
| ASCII art, plaintext, README-embedded diagrams | ASCII Art | ditaa / svgbob / goat | No styling API |
| Hand-drawn wireframes, rough architecture sketches | Sketch / Whiteboard | excalidraw | No styling; companion server |
| Lightweight UML, concept maps, quick class sketches | Lightweight UML | nomnoml | |
| Hardware signals, HDL components, protocol packet formats | Hardware / Protocol | symbolator / bytefield / packetdiag | Specialist use |
| Wiring harnesses, cable connector diagrams | Wiring / Hardware | wireviz |
Diagrams MUST fit on a standard monitor without horizontal scrolling.
rankdir=TB (Graphviz/D2), direction TD (Mermaid), or vertical PlantUML layout.Apply the 60-30-10 principle:
#f5f5f5) or clean slate-grey dark mode background (#2d3142). No pure white grids unless requested.#2d3142) for main boxes and slate blue (#4f5d75) for passive arrows and secondary labels.#eb6c36) on at most 1–2 elements in the entire diagram. Accent signifies focus (e.g. the specific API call being audited, or the core data store failing). If more than 2 elements are colored orange/rust, the visual hierarchy is broken.Always define a solid masking background (#f5f5f5 in light mode or #2d3142 in dark mode) behind all line annotations and arrow labels. Otherwise, text and lines intersect, creating visual noise and AI-slop patterns.
Render via Python wrapper:
# Render D2 architecture to SVG (default)
python3 scripts/render_kroki_diagram.py \
--engine d2 \
--input docs/diagrams/system-arch/source.d2 \
--output docs/diagrams/system-arch/rendered.svg \
--interactive-output docs/diagrams/system-arch/interactive.html \
--interactive-title "System Architecture Overview" \
--summary "Container layout for production microservices."
# Render PlantUML sequence to SVG
python3 scripts/render_kroki_diagram.py \
--engine plantuml \
--input docs/diagrams/auth-flow/source.puml \
--output docs/diagrams/auth-flow/rendered.svg \
--interactive-output docs/diagrams/auth-flow/interactive.html \
--summary "Auditing user JWT sign-on sequence and DB validation."
# Pass diagram options (D2 theme + layout; PlantUML theme; etc.)
python3 scripts/render_kroki_diagram.py \
--engine d2 \
--input docs/diagrams/system-arch/source.d2 \
--output docs/diagrams/system-arch/rendered.svg \
--diagram-option theme=earth-tones \
--diagram-option layout=elk
# Render with a self-hosted Kroki instance; increase timeout for slow servers
python3 scripts/render_kroki_diagram.py \
--engine plantuml \
--input docs/diagrams/auth-flow/source.puml \
--output docs/diagrams/auth-flow/rendered.svg \
--kroki-endpoint https://kroki.internal.example.com \
--timeout 60Second-pass PNG/JPG after SVG (use --skip-index to avoid redundant gallery rebuild):
# PNG after SVG — skip the index rebuild since SVG pass already ran it
python3 scripts/render_kroki_diagram.py \
--engine d2 --format png --skip-index \
--input docs/diagrams/system-arch/source.d2 \
--output docs/diagrams/system-arch/rendered.png
# JPG is also supported: --format jpgShareable URL only (no network call, no render):
# Print GET URL only (offline / debug)
python3 scripts/render_kroki_diagram.py \
--engine mermaid \
--input docs/diagrams/flow/source.mmd \
--print-url-onlyOutput naming invariant:--outputMUST end withrendered.svgfor the gallery index to auto-rebuild. Any other filename silently skips indexing. Use--skip-indexwhen rendering non-SVG formats to suppress the (already-run) index rebuild.
--kroki-endpoint to point at an internal instance (e.g., https://kroki.internal.example.com). Default is https://kroki.io. Use --timeout 60 if the server is slow.https://kroki.io. Because diagram source text may contain sensitive architecture details, schema structures, or proprietary IP, you should deploy a self-hosted Kroki server and set --kroki-endpoint when diagramming private, confidential, or sensitive systems.kroki.io these work transparently. On a self-hosted Kroki gateway, they require separate Docker companion containers (yuzutech/kroki-mermaid, yuzutech/kroki-bpmn, etc.) running alongside the gateway, with KROKI_*_HOST env vars configured. Sending a companion engine request to a gateway-only instance returns a 404 or 503 — not a diagram error.--diagram-option key=value): Pass engine-specific rendering options. Examples — D2: theme=earth-tones, layout=elk, sketch=; PlantUML: theme=minty, no-metadata=. Options are sent as Kroki-Diagram-Options-* HTTP headers. Full option catalogue in references/kroki-safe-subset.md.!include <C4Container> (local stdlib), not the raw GitHub URL. The GitHub URL fails on self-hosted Kroki running in default SECURE mode. See references/engine-style-templates.md Section 3.400 Bad Request, it's often because a % character (e.g., "load: 40%") was posted without a specified Content-Type. The server tries to URL-decode % and fails.Content-Type: text/plain; charset=utf-8. Do not strip or alter percent symbols.---\ntitle:...\n---.%%{init:...}%% block instead of YAML frontmatter.<br/> for HTML-safe breaks within node labels (e.g., Node["First Line<br/>Second Line"]). Literal \n corrupts SVG XML output.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.