diagram-author

diagram-author is an agent for Claude Code from noelpuig/claude-explains. It costs 19 tokens per session (566 once invoked), scanned A, original, MIT.

A diagram-making agent that creates one SVG file for the claude-video pipeline and checks its rendered preview against project rules.

In plain words
What is it for?
Use it to create a pipeline diagram from a provided specification and reference files, then render it to inspect overlaps, clipping, and other visual problems.
Why use it?
It reduces mistakes in layout, colors, labels, and diagram structure by requiring a plan, source checks, and command-line verification before finishing.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit Use it to create a pipeline diagram from a provided specification and reference files, then render it to inspect overlaps, clipping, and other visual problems.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/noelpuig/claude-explains/diagram-author
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.

Clone the repo
git clone --depth 1 https://github.com/noelpuig/claude-explains

Made for: Claude Code.

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-author

README.md
[![agentmods](https://agentmods.dev/badge/agents/noelpuig/claude-explains/diagram-author/github.svg)](https://agentmods.dev/agents/noelpuig/claude-explains/diagram-author)
Your own site
<a href="https://agentmods.dev/agents/noelpuig/claude-explains/diagram-author"><img src="https://agentmods.dev/badge/agents/noelpuig/claude-explains/diagram-author/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for diagram-author

Your own site · 80×15
<a href="https://agentmods.dev/agents/noelpuig/claude-explains/diagram-author"><img src="https://agentmods.dev/badge/agents/noelpuig/claude-explains/diagram-author.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 566 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00019 $0.00566
Opus 5 $0.00010 $0.00283
Sonnet 5 $0.00004 $0.00113
Haiku 4.5 $0.00002 $0.00057

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

Security

Grade A, and why

diagram-author 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 9d 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.

pipeline/.claude/agents/diagram-author.md · 51 lines

How it starts

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

You create ONE visual diagram for the claude-video pipeline.

Startup — read ALL of these before writing anything

  1. Run: node ../cli/bin/claude-video.js --help-design — visual rules, layout, color
  2. Run: node ../cli/bin/claude-video.js --help-format — scene structure, narrator sync, viewport zoom
  3. Run: node ../cli/bin/claude-video.js --help-components — diagram annotation patterns
  4. Read pipeline/briefings/diagram-author.md — your task rules and verification steps
  5. Read pipeline/briefings/quality-floor.md — auto-reject criteria (violating ANY = immediate failure)
  6. Read plan/design-brief.json — the color palette. Use ONLY these colors.
  7. Read the diagram spec file you were given
  8. Read any relevant files in references/ for factual accuracy — verify element names, relationships, and labels against the source material in this folder

Process

  1. First, plan the layout: list all elements with coordinates and sizes BEFORE writing SVG
  2. Write the SVG file
  3. Render directly (the CLI accepts SVG natively — no wrapper needed): node ../cli/bin/claude-video.js <diagram.svg> --preview 0 -o /tmp/diagram_preview
  4. Read the preview PNG. Check for overlaps, clipping, fill ratio, label readability, connector alignment.
  5. Fix any issues and re-render. Iterate until the PNG matches your intended layout.
  6. Update the diagram manifest with element IDs

SVG Rules

  • Use constrained primitives: rect, circle, ellipse, line, polygon, path (straight segments only)
  • Three font size tiers: 24px (titles), 18px (primary labels), 14px (secondary/annotations)
  • Every animatable element needs a unique id attribute
  • viewBox must be 0 0 1920 1080 (fill the viewport)
  • Group related elements in tags with descriptive IDs
  • No complex Bezier paths — use straight-line paths or basic shapes
  • Labels must not overlap — check spacing during layout planning
  • Max 15 labels per diagram

Report

Print exactly this JSON as your final output:

{"status": "pass|fail", "file": "<path>", "element_ids": ["#id1", "#id2"], "label_count": N, "issues": []}

Read the full file on GitHub · 51 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. 9d ago First seen · 51 lines · 19 tokens per session scan A a07c46e2ce29

Subscribe to this mod's changes

diagram-author is an agent published in the GitHub repository noelpuig/claude-explains (2 stars, last pushed 3mo ago), licensed MIT. It adds 19 tokens to every session and 566 once invoked, about $0.0001 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.

Related

Other agents, from other repositories

mermaid-expert

Create Mermaid diagrams for flowcharts, sequences, ERDs, and architectures. Masters syntax for all diagram types and styling. Use PROACTIVELY for visual documentation, system diagrams, or process flows.

echoVic/blade-code · 45 tokens

ui-ux-designer

Create interface designs, wireframes, and design systems. Masters user research, prototyping, and accessibility standards. Use PROACTIVELY for design systems, user flows, or interface optimization.

echoVic/blade-code · 44 tokens

designers

The VP of Design at Claude Inc, leading a six-skill design department — ui-ux-pro-max (design systems), taste (critique), frontend-design (production UI code), transitions (motion), web-artifacts (live prototypes), brand-guidelines (brand kits). Use PROACTIVELY for any UI/UX, visual design, critique, motion…

alebgl77/claude-inc · 132 tokens

ux-strategist

A batch UX strategy and diagnosis agent that produces a written report about a product's user experience. UX, or user experience, covers how people understand, navigate, and use a product.

laymom/consulting-ux-strategy · 118 tokens

God Agent Hephaestus — Design Agent

God Agent Hephaestus — UI/UX & Design Systems. Blacksmith of the gods. The craftsman who forges beauty from raw material. What Hephaestus.

Holley-Studio/thesmos-governance · 47 tokens

Kairos — Prototype Behavior Engineer

God Agent — Prototype Behavior Engineer & Interaction Fidelity Director. Kairos (καιρός) — the Greek concept of the right moment, the opportune instant when action.

Holley-Studio/thesmos-governance · 42 tokens