architecture-diagram

architecture-diagram is a skill for Claude Code, Codex from d-o-hub/github-template-ai-agents. It costs 113 tokens per session (902 once invoked), scanned A, original, MIT.

A generator that scans a project's skills, agents, and commands and creates an architecture diagram as an SVG image. SVG is a scalable image format that stays sharp at different sizes.

In plain words
What is it for?
It helps create or refresh a visual map of a project's available skills, agents, and commands.
Why use it?
It keeps the project diagram aligned with the files that actually exist as the project changes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions OpenCode.

Good fit It helps create or refresh a visual map of a project's available skills, agents, and commands.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/d-o-hub/github-template-ai-agents/architecture-diagram
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.

Any agent
npx skills add d-o-hub/github-template-ai-agents --skill architecture-diagram
Clone the repo
git clone --depth 1 https://github.com/d-o-hub/github-template-ai-agents

Made for: Claude Code, Codex.

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 architecture-diagram

README.md
[![agentmods](https://agentmods.dev/badge/skills/d-o-hub/github-template-ai-agents/architecture-diagram/github.svg)](https://agentmods.dev/skills/d-o-hub/github-template-ai-agents/architecture-diagram)
Your own site
<a href="https://agentmods.dev/skills/d-o-hub/github-template-ai-agents/architecture-diagram"><img src="https://agentmods.dev/badge/skills/d-o-hub/github-template-ai-agents/architecture-diagram/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 architecture-diagram

Your own site · 80×15
<a href="https://agentmods.dev/skills/d-o-hub/github-template-ai-agents/architecture-diagram"><img src="https://agentmods.dev/badge/skills/d-o-hub/github-template-ai-agents/architecture-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 902 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.00113 $0.00902
Opus 5 $0.00056 $0.00451
Sonnet 5 $0.00023 $0.00180
Haiku 4.5 $0.00011 $0.00090

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

Security

Grade A, and why

architecture-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 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/generate_diagram.py), 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.

.agents/skills/architecture-diagram/SKILL.md · 119 lines

How it starts

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

Architecture Diagram

Generates an architecture SVG diagram by scanning the live project structure.

When to Use

  • User asks to update / regenerate / sync the architecture diagram
  • Skills, agents, or commands have changed
  • First-time setup (diagram doesn't exist yet)

Execution

Step 1 — locate project root

Use the bash tool to find the project root (directory containing .agents/):

# From wherever the agent is currently working
pwd
ls .agents/ .opencode/ 2>/dev/null || echo "NOT_FOUND"

If .agents/ is not in the current directory, search upward or ask the user to confirm the project root before continuing.

Step 2 — run the generator script

Copy the script from the skill bundle into a temp location and run it from the project root:

python /path/to/skill/scripts/generate_diagram.py \
  --root . \
  --out docs/architecture.svg

The script auto-discovers:

  • Skills → .agents/skills/*/SKILL.md (reads name: from frontmatter)
  • Agents → */agents/*.md (uses filename stem)
  • Commands → */commands/*.md (uses filename stem, strips leading /)

It writes a self-contained SVG to --out (default: docs/architecture.svg).

Step 3 — confirm and report

After the script exits:

  1. Tell the user the output path
  2. Report counts: N skills · M agents · K commands
  3. If counts differ from the last known state, summarise what changed

Output

docs/architecture.svg — a standalone SVG output file, viewBox 680 × auto, compatible with GitHub README embedding (example: ![Architecture](docs/architecture.svg)).

Customisation

The script reads an optional docs/diagram-config.json if present:

{
  "title": "Project Architecture",
  "project_name": "My Project",
  "author": "maintainer",
  "pipeline_stages": [
    {"name": "build", "color": "teal"},
    {"name": "test", "color": "blue"},
    {"name": "deploy", "color": "green"}
  ]
}

All fields are optional — the script uses sensible defaults when the file is absent.

Read the full file on GitHub · 119 lines

Files

What ships with it

4 files 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. 9d ago First seen · 119 lines · 113 tokens per session scan A 5bbd60345b95

Subscribe to this mod's changes

architecture-diagram is a skill published in the GitHub repository d-o-hub/github-template-ai-agents (2 stars, last pushed yesterday), licensed MIT. It adds 113 tokens to every session and 902 once invoked, about $0.0006 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.