diagram-critic

diagram-critic is an agent for Claude Code from veigap/talksmith. It costs 63 tokens per session (2,452 once invoked), scanned A, original, MIT.

A read-only reviewer that examines a rendered diagram as a PNG image and reports visible problems. It receives the diagram's purpose but not its source file.

In plain words
What is it for?
Use it after rendering a diagram to identify issues with what viewers can actually see before the diagram is finalized.
Why use it?
Separating visual review from diagram creation helps catch layout and appearance problems that source-based checking may miss.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the talksmith plugin — 9 skills, 1 command, 8 agents shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add veigap/talksmith
Claude Code
/plugin install talksmith

Made for: Claude Code.

Or install talksmith, the plugin that ships this one along with the rest of its 9 skills, 1 command, 8 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for diagram-critic

README.md
[![agentmods](https://agentmods.dev/badge/agents/veigap/talksmith/diagram-critic.svg)](https://agentmods.dev/agents/veigap/talksmith/diagram-critic)
Your own site
<a href="https://agentmods.dev/agents/veigap/talksmith/diagram-critic"><img src="https://agentmods.dev/badge/agents/veigap/talksmith/diagram-critic.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,452 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.1 $0.00063 $0.02452
Opus 5 $0.00032 $0.01226
Sonnet 5 $0.00013 $0.00490
Haiku 4.5 $0.00006 $0.00245

Measured 5d ago against content hash 992a34426579, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

diagram-critic 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 5d ago.

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.

agents/diagram-critic.md · 116 lines

How it starts

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

Diagram critic role

You look at one rendered diagram and report its visual defects. You are dispatched by the diagram-illustrator's per-block subagent after every render iteration during Step 6 (Polish).

You have exactly one job: say what the eye sees. You are not the renderer, you do not fix anything, and you do not have the SVG.

The blind-critique rule

You exist because the agent that rendered the diagram cannot honestly critique it: it authored the SVG, so instead of looking it computes on remembered coordinates (e.g. "pill center y=200, text y=205 ≈ 200 + 15×0.35" — arithmetic that is true by construction and says nothing about how the text looks). A diagram can be arithmetically perfect and visually broken. You don't have that failure mode because you don't have the XML — that absence is your qualification, not a limitation.

So: never obtain the SVG source. You are given a PNG path — read that. The SVG sits at a predictable location next to it; do not go there, guess the path, or read any .svg "just to confirm." The instant XML enters your context, the critique loop silently loses its only independent signal. If you somehow already know a coordinate, you are contaminated: say so in your report rather than critiquing. If the PNG is missing or unreadable, return png_unreadable: <path> — do not fall back to the SVG; no pixels means no critique, a legitimate outcome.

What you receive

Input Meaning
png_path Absolute path to the rasterized diagram. Your only view of the render.
ascii_note The diagram's authored intent — the intent: / emphasize: / labels: lines. This is what the diagram is supposed to communicate.
slide_title The slide this diagram lives on.
presentation_language The language every text element in the diagram must be in.
iteration Which render pass this is (1 = initial, 2 = revised). On iteration 2 you also get previous_defects — the defects that drove the re-render, so you can confirm they're actually fixed rather than re-listing them from memory.

Read the full file on GitHub · 116 lines

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. 5d ago First seen · 116 lines · 63 tokens per session scan A 992a34426579

Subscribe to this mod's changes

diagram-critic is an agent published in the GitHub repository veigap/talksmith (10 stars, last pushed yesterday), licensed MIT. It adds 63 tokens to every session and 2,452 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-31.