architecture-diagram

architecture-diagram is a command for Claude Code from sigistry/marketplace. It costs 16 tokens per session (3,347 once invoked), scanned A, original, MIT.

A command that creates Mermaid diagrams showing a system’s components, how data moves between them, and how they depend on one another. Mermaid is a text-based format for diagrams that can be stored with code.

In plain words
What is it for?
Use it to document monoliths, microservices, layered systems, event-driven applications, serverless systems, and their APIs, databases, queues, and external services.
Why use it?
It turns a codebase that may be difficult to understand at a glance into a visual map of its structure and connections.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the doc-generator plugin — 2 skills, 3 commands, 2 agents shipped together

Good fit Use it to document monoliths, microservices, layered systems, event-driven applications, serverless systems, and their APIs, databases, queues, and external services.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/sigistry/marketplace/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.

Clone the repo
git clone --depth 1 https://github.com/sigistry/marketplace

Made for: Claude Code.

Or install doc-generator, the plugin that ships this one along with the rest of its 2 skills, 3 commands, 2 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 architecture-diagram

README.md
[![agentmods](https://agentmods.dev/badge/commands/sigistry/marketplace/architecture-diagram/github.svg)](https://agentmods.dev/commands/sigistry/marketplace/architecture-diagram)
Your own site
<a href="https://agentmods.dev/commands/sigistry/marketplace/architecture-diagram"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/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/commands/sigistry/marketplace/architecture-diagram"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/architecture-diagram.svg" alt="Reviewed on agentmods" width="80" 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 3,347 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.00016 $0.03347
Opus 5 $0.00008 $0.01673
Sonnet 5 $0.00003 $0.00669
Haiku 4.5 $0.00002 $0.00335

Measured 7d ago against content hash 7820fc624a1f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 7d 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/doc-generator/commands/architecture-diagram.md · 608 lines

How it starts

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

Architecture Diagram Generator

You are tasked with creating comprehensive, visual architecture diagrams from the codebase using Mermaid syntax. These diagrams should help developers understand the system structure, data flow, and component relationships.

Step 1: Analyze Codebase Architecture

Scan and understand the project structure:

Identify Architecture Type:

  • Monolithic: Single codebase, tightly coupled
  • Microservices: Multiple independent services
  • Layered: Clear separation (presentation, business, data layers)
  • Event-Driven: Message queues, pub/sub patterns
  • Serverless: Cloud functions, managed services
  • Hybrid: Combination of patterns

Map Components:

  • Frontend applications (web, mobile)
  • Backend services (APIs, workers, cron jobs)
  • Databases (SQL, NoSQL, cache, search engines)
  • External services (third-party APIs, SaaS)
  • Infrastructure (load balancers, CDN, message queues)
  • Authentication/Authorization services

Identify Relationships:

  • Data flow between components
  • API calls and dependencies
  • Event streams and messages
  • Database connections
  • File storage access
  • External API integrations

Step 2: Generate System Architecture Diagram

Create a high-level overview using Mermaid:

graph TB
    subgraph "Client Layer"
        WEB[Web Application<br/>React.js]
        MOBILE[Mobile App<br/>React Native]
    end

    subgraph "API Layer"
        GATEWAY[API Gateway<br/>Express.js]
        AUTH[Auth Service<br/>JWT]
    end

    subgraph "Business Logic Layer"
        USER_SVC[User Service]
        ORDER_SVC[Order Service]
        PAYMENT_SVC[Payment Service]
        NOTIFICATION_SVC[Notification Service]
    end

    subgraph "Data Layer"
        POSTGRES[(PostgreSQL<br/>Primary DB)]
        REDIS[(Redis<br/>Cache)]
        ELASTICSEARCH[(Elasticsearch<br/>Search)]
    end

    subgraph "External Services"
        STRIPE[Stripe API<br/>Payments]
        SENDGRID[SendGrid<br/>Email]
        S3[AWS S3<br/>File Storage]
    end

    WEB --> GATEWAY
    MOBILE --> GATEWAY

    GATEWAY --> AUTH
    GATEWAY --> USER_SVC
    GATEWAY --> ORDER_SVC
    GATEWAY --> PAYMENT_SVC

    USER_SVC --> POSTGRES
    USER_SVC --> REDIS

    ORDER_SVC --> POSTGRES
    ORDER_SVC --> NOTIFICATION_SVC

    PAYMENT_SVC --> STRIPE
    PAYMENT_SVC --> POSTGRES

    NOTIFICATION_SVC --> SENDGRID

    USER_SVC --> S3

    style WEB fill:#e3f2fd
    style MOBILE fill:#e3f2fd
    style STRIPE fill:#fff3e0
    style SENDGRID fill:#fff3e0
    style S3 fill:#fff3e0

Read the full file on GitHub · 608 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. 7d ago First seen · 608 lines · 16 tokens per session scan A 7820fc624a1f

Subscribe to this mod's changes

architecture-diagram is a command published in the GitHub repository sigistry/marketplace (3 stars, last pushed yesterday), licensed MIT. It adds 16 tokens to every session and 3,347 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-09-03.