generate-web-diagram

generate-web-diagram is a command for coding agents from nicobailon/visual-explainer. It costs 16 tokens per session (283 once invoked), scanned A, original, MIT.

A command that creates a standalone HTML diagram and opens it in a browser. It can choose formats such as flows, cards, tables, or timelines for the subject being explained.

In plain words
What is it for?
Use it to generate diagrams for connected processes, comparisons, text-heavy explanations, or chronological events.
Why use it?
It helps turn a complex explanation into a visual page that can be viewed and shared in a browser.

Command

Part of the visual-explainer plugin — 1 skill, 7 commands shipped together

About the project

Visual Explainer is an agent skill that turns complex terminal output into self-contained HTML pages with diagrams, tables, and styled explanations. It is for people who want coding agents to present architecture reviews, diffs, plans, and other structured information in a browser. The catalogue contains its skill, commands, rules, and plugin packaging.

nicobailon/visual-explainer · 9,639 stars · on GitHub

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 commands/nicobailon/visual-explainer/generate-web-diagram
Clone the repo
git clone --depth 1 https://github.com/nicobailon/visual-explainer

Or install visual-explainer, the plugin that ships this one along with the rest of its 1 skill, 7 commands.

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 generate-web-diagram

README.md
[![agentmods](https://agentmods.dev/badge/commands/nicobailon/visual-explainer/generate-web-diagram.svg)](https://agentmods.dev/commands/nicobailon/visual-explainer/generate-web-diagram)
Your own site
<a href="https://agentmods.dev/commands/nicobailon/visual-explainer/generate-web-diagram"><img src="https://agentmods.dev/badge/commands/nicobailon/visual-explainer/generate-web-diagram.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 283 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.00016 $0.00283
Opus 5 $0.00008 $0.00142
Sonnet 5 $0.00003 $0.00057
Haiku 4.5 $0.00002 $0.00028

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

Security

Grade A, and why

generate-web-diagram 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.

plugins/visual-explainer/commands/generate-web-diagram.md · 13 lines

What it actually says

Load the visual-explainer skill and generate an HTML visual explainer for: $@

If $@ contains the literal --quick flag, remove that flag from the topic, read ./quick/README.md and ./quick/schema.json, and emit a compact JSON spec instead of HTML. In Pi, call visual_explainer with action: "render_quick", a descriptive filename, and the spec. In other harnesses, save the spec and run node ./quick/render.mjs <spec.json> <output.html> from the installed skill directory. If the topic does not fit the schema, validation fails, or rendering errors, continue with the full HTML workflow below. Without --quick, do not use quick mode.

Use the skill’s reference routing and final checklist. Pick a representation that fits the topic: Mermaid for connected flows/topologies; CSS cards for text-heavy explanations; tables for matrices; timelines for linear history.

Write to ~/.agent/diagrams/ with a descriptive filename and open the result in the browser. In Pi package installs, this is an explicit visual request: use visual_explainer.prepare when planning/context scouting helps, then visual_explainer.render with the complete HTML.

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 · 13 lines · 16 tokens per session scan A a230ddc47948

Subscribe to this mod's changes

generate-web-diagram is a command published in the GitHub repository nicobailon/visual-explainer (9,639 stars, last pushed 7d ago), licensed MIT. It adds 16 tokens to every session and 283 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-30.