architecture-diagrammer

architecture-diagrammer is an agent for Claude Code from Kastalien-Research/thoughtbox. It costs 26 tokens per session (810 once invoked), scanned A, original, MIT.

An agent that explores a software subsystem and creates Mermaid diagrams showing its components, relationships, data flows, and system context.

In plain words
What is it for?
Use it with a module, subsystem, or file path to map its files, trace calls and data movement, identify shared state and configuration, and produce architecture diagrams.
Why use it?
It turns a codebase investigation into visual documentation, making entry points, dependencies, storage, and event paths easier to understand.

Agent for Claude Code

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

Good fit Use it with a module, subsystem, or file path to map its files, trace calls and data movement, identify shared state and configuration, and produce architecture diagrams.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kastalien-research/thoughtbox/architecture-diagrammer
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/Kastalien-Research/thoughtbox

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/kastalien-research/thoughtbox/architecture-diagrammer/github.svg)](https://agentmods.dev/agents/kastalien-research/thoughtbox/architecture-diagrammer)
Your own site
<a href="https://agentmods.dev/agents/kastalien-research/thoughtbox/architecture-diagrammer"><img src="https://agentmods.dev/badge/agents/kastalien-research/thoughtbox/architecture-diagrammer/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-diagrammer

Your own site · 80×15
<a href="https://agentmods.dev/agents/kastalien-research/thoughtbox/architecture-diagrammer"><img src="https://agentmods.dev/badge/agents/kastalien-research/thoughtbox/architecture-diagrammer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 810 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.00026 $0.00810
Opus 5 $0.00013 $0.00405
Sonnet 5 $0.00005 $0.00162
Haiku 4.5 $0.00003 $0.00081

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

Security

Grade A, and why

architecture-diagrammer 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.

.claude/agents/architecture-diagrammer.md · 111 lines

How it starts

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

You are an Architecture Diagrammer agent. Your job is to explore a specified subsystem or module in the codebase and produce comprehensive Mermaid diagrams documenting its architecture.

Input

You will receive a target — a module path, subsystem name, or feature description. Examples:

  • observatory → explore src/observatory/
  • hub → explore src/hub/
  • persistence → explore src/persistence/
  • src/server-factory.ts → explore a specific file and its connections

Exploration Process

Phase 1: Map the Territory

  1. Use Glob to find all files in the target module
  2. Read key files: entry points, type definitions, index/barrel files
  3. Identify:
    • Entry points: Where external calls come in
    • Exit points: What the module calls externally
    • Data types: Core interfaces and schemas
    • Singletons/globals: Shared state
    • Configuration: How the module is configured

Phase 2: Trace Data Flows

  1. Grep for event emitters, function calls across module boundaries
  2. Read handler/controller files to understand request/response flows
  3. Identify:
    • Push paths: Events, callbacks, broadcasts
    • Pull paths: HTTP requests, queries, reads
    • Storage: What persists, what's in-memory

Phase 3: Produce Diagrams

Generate a markdown file at docs/<target>-architecture.md containing:

Required Diagrams
  1. System Context (flowchart LR/TD)

    • The module's position relative to the rest of the system
    • External actors and internal producers/consumers
    • Data flow direction arrows with labels
  2. Sequence Diagrams (sequenceDiagram)

    • One per major data flow path (push and pull)
    • Show the complete path from trigger to final destination
    • Include intermediate storage/broadcast steps
  3. Component Architecture (classDiagram)

    • All classes/interfaces with key methods
    • Ownership, dependency, and inheritance relationships
    • Cardinality where relevant
  4. Startup/Lifecycle (flowchart TD)

    • How the module initializes
    • Configuration sources
    • Conditional behavior

Read the full file on GitHub · 111 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 · 111 lines · 26 tokens per session scan A da2f29507f0d

Subscribe to this mod's changes

architecture-diagrammer is an agent published in the GitHub repository Kastalien-Research/thoughtbox (64 stars, last pushed 1mo ago), licensed MIT. It adds 26 tokens to every session and 810 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.

Related

Other agents, from other repositories

design-expert

Use when: designing or auditing a design system, a marketing site, a web app screen, or an iOS/Android mockup. Do NOT use for: wiring components into a codebase (delegate to the matching framework expert), or writing SwiftUI/Compose implementation code (delegate to swift-expert or an Android developer).

fusengine/agents · 70 tokens

design-reviewer

Judges whether a running localhost UI reads as deliberately designed or as machine-generated, and reports the specific tells with evidence. Delegate when the user says a page looks generic, bland, unfinished, "AI-generated", "like a template" or "not designed", asks for a design critique or a taste check, or wants an…

soumyachk101/VibeLens · 103 tokens

frontend-builder

Builds new frontend work — a screen, a component, a design foundation — with tokens established before components, every interactive and data state implemented, and each screen captured before it is called done. Delegate when the user asks for a new page, view, component or UI library from scratch, wants a visual…

soumyachk101/VibeLens · 121 tokens

cli-ui-designer

CLI interface design specialist. Use PROACTIVELY to create terminal-inspired user interfaces with modern web technologies. Expert in CLI aesthetics, terminal themes, and command-line UX patterns.

Justdvp/claude-code-templates · 40 tokens

gsd-ui-researcher

Produces UI-SPEC.md design contract for frontend phases. Reads upstream artifacts, detects design system state, asks only unanswered questions. Spawned by /gsd-ui-phase orchestrator.

mrboups/xbrain · 43 tokens

gsd-ui-checker

Validates UI-SPEC.md design contracts against 6 quality dimensions. Produces BLOCK/FLAG/PASS verdicts. Spawned by /gsd-ui-phase orchestrator.

mrboups/xbrain · 41 tokens