spec-render

A tool that turns PlantUML diagram text inside a software specification into SVG images and creates an index of those images. SVG is a scalable image format that stays clear when resized.

In plain words
What is it for?
Use it to render architecture, sequence, class, dependency, state, and other PlantUML diagrams from specification files before review.
Why use it?
Reviewers can inspect rendered diagrams instead of reading raw diagram code. It also preserves the source order and labels each diagram by type.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/friedbotstudio/baseline/spec-render
Any agent
npx skills add friedbotstudio/baseline --skill spec-render
Clone the repo
git clone --depth 1 https://github.com/friedbotstudio/baseline

Made for: Claude Code, Codex.

Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 693 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00060 $0.00693
Opus 5 $0.00030 $0.00347
Sonnet 5 $0.00012 $0.00139
Haiku 4.5 $0.00006 $0.00069

Measured yesterday against content hash b8fae1fc80d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

spec-render scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (render.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/spec-render/SKILL.md · 46 lines

How it starts

The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.

spec-render — render a spec's diagrams for review

User-invokable only. This skill has side effects (writes SVGs and an index). Claude does not invoke it autonomously.

Invocation

/spec-render <slug> — where <slug> corresponds to docs/specs/<slug>.md.

Prerequisites

  • java on PATH (JDK 8+) + the pinned plantuml.jar at .claude/bin/plantuml.jar (fetched at install time; SHA-verified). The render script invokes java -jar .claude/bin/plantuml.jar -tsvg ... and exits 2 with a named remedy if either dep is missing.
  • The spec at docs/specs/<slug>.md exists and passes spec_diagram_presence_guard + plantuml_syntax_guard — otherwise rendering will surface the same errors.

Steps

  1. Validate the slug: docs/specs/<slug>.md must exist.
  2. Run the render script:
    node .claude/skills/spec-render/render.mjs <slug>
    
    The script:
    • Reads docs/specs/<slug>.md.
    • Extracts every plantuml fenced block in source order.
    • For each block: classifies it by marker (c4_context / c4_container / c4_component / sequence / class / dependency_graph / state / other), writes docs/specs/_rendered/<slug>/<NN>_<kind>.puml, then renders to <NN>_<kind>.svg.
    • Writes docs/specs/_rendered/<slug>/index.md with section titles and image links in order.
  3. Report the output path and a short per-kind count to the user.
  4. If any block fails to render, surface the offending index + first line + stderr tail, and exit non-zero. Do not silently skip broken blocks.

Output

  • docs/specs/_rendered/<slug>/<NN>_<kind>.svg — one per diagram block.
  • docs/specs/_rendered/<slug>/<NN>_<kind>.puml — source kept next to the SVG for easier diffs.
  • docs/specs/_rendered/<slug>/index.md — markdown index with embedded images.

Notes

  • The render directory is a build output. Add docs/specs/_rendered/ to .gitignore if you don't want the SVGs in the repo; the PlantUML sources in the spec are the source of truth.
  • For offline review without Java + the pinned jar, use the plantuml MCP server from .mcp.json — it talks to a PlantUML renderer over HTTP. This skill prefers the local java -jar path because it's faster, keeps renders self-contained, and uses the SHA-pinned jar (so the version a consumer renders against matches what this baseline was tested with).

Read the full file on GitHub · 46 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 46 lines · 60 tokens per session scan A b8fae1fc80d3

Subscribe to this mod's changes

spec-render is a skill published in the GitHub repository friedbotstudio/baseline (11 stars, last pushed 5d ago), licensed Apache-2.0. It adds 60 tokens to every session and 693 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.