generate-web-diagram

generate-web-diagram is a command for coding agents from theclaymethod/artifacture. It costs 12 tokens per session (1,258 once invoked), scanned A, original, MIT.

A command that turns a topic into a standalone HTML diagram, such as a process, comparison, or decision flow. HTML is a web-page format that can be opened in a browser.

In plain words
What is it for?
Use it for process diagrams, visual explanations, comparisons, and data tables. It creates an editable source file, exports an HTML artifact, and opens or verifies the result in a browser.
Why use it?
It makes relationships and processes easier to inspect than a block of prose. Browser checks help catch layout problems on desktop and mobile screens.

Command

Part of the visual-explainer plugin — 1 skill, 13 commands, 11 agents shipped together

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

Or install visual-explainer, the plugin that ships this one along with the rest of its 1 skill, 13 commands, 11 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 generate-web-diagram

README.md
[![agentmods](https://agentmods.dev/badge/commands/theclaymethod/artifacture/generate-web-diagram.svg)](https://agentmods.dev/commands/theclaymethod/artifacture/generate-web-diagram)
Your own site
<a href="https://agentmods.dev/commands/theclaymethod/artifacture/generate-web-diagram"><img src="https://agentmods.dev/badge/commands/theclaymethod/artifacture/generate-web-diagram.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,258 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.00012 $0.01258
Opus 5 $0.00006 $0.00629
Sonnet 5 $0.00002 $0.00252
Haiku 4.5 $0.00001 $0.00126

Measured 4d ago against content hash 6fdf03bc59d2, 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 4d 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 · 55 lines

How it starts

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

Read cards/web-diagram.md. If the request is primarily a comparison or data table, read cards/comparison-table.md instead.

Load the visual-explainer skill, then generate an HTML diagram for: $@

MDX/React pipeline. Prefer the generated pipeline for this command:

  1. Author the editable source as .mdx by default, or .tsx when the diagram needs local React state, custom interaction, or generated SVG logic.
  2. Use shared components from visual-explainer-mdx/components.tsx such as ExplainerShell, Section, DiagramCanvas, Pipeline, DecisionMatrix, RiskLedger, and Callout.
  3. Export the final artifact with npm run ve:export -- <source.mdx|source.tsx> --out ~/.agent/diagrams/<slug>.html.
  4. Treat the generated .html as an artifact only. Do not hand-edit the final HTML to make content changes; change the MDX/TSX source and re-export.
  5. Browser-verify the generated HTML using the same desktop/mobile/no-overflow checks below.

Raw HTML templates remain reference material for style and parity, not the preferred authoring surface.

Clarify. This is a Tier 1 command per ./references/clarify.md. Before generating, check that you can form a 1-sentence brief covering topic, audience, depth, and aesthetic. If any dimension is unclear, ask 1–3 questions via AskUserQuestion. If all four are answerable from the request + context, generate directly. Bypass with --no-ask.

Follow the visual-explainer skill workflow and the selected card. Default to the OA Design preset and read references/oa-design.md unless the user explicitly requests a named alternative.

Sub-agent fan-out (default for 3+ sections)

After drafting the page outline, count the major sections.

  • Outline has 1–2 sections, or --no-parallel was passed: build sequentially yourself. Skip the rest of this section.
  • Outline has 3+ sections: fan out to specialized sub-agents in parallel. Each sub-agent produces one section as a structured fragment; you stitch them together.

Read the full file on GitHub · 55 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. 4d ago First seen · 55 lines · 12 tokens per session scan A 6fdf03bc59d2

Subscribe to this mod's changes

generate-web-diagram is a command published in the GitHub repository theclaymethod/artifacture (2 stars, last pushed 12d ago), licensed MIT. It adds 12 tokens to every session and 1,258 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.