diagram-architect

diagram-architect is an agent for Claude Code from sgaunet/claude-plugins. It costs 39 tokens per session (1,860 once invoked), scanned A, original, MIT.

A diagram-building workflow that expresses software and infrastructure diagrams as d2 text files, which can be rendered as visual diagrams.

In plain words
What is it for?
Use it for system, C4, sequence, entity-relationship, deployment, network, and data-flow diagrams.
Why use it?
Text-based diagrams can be reviewed and changed alongside code, making system relationships easier to maintain than manually edited images.

Agent for Claude Code

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

Part of the software-engineering plugin — 4 skills, 12 commands, 7 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 agents/sgaunet/claude-plugins/diagram-architect
Clone the repo
git clone --depth 1 https://github.com/sgaunet/claude-plugins

Made for: Claude Code.

Or install software-engineering, the plugin that ships this one along with the rest of its 4 skills, 12 commands, 7 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 diagram-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/sgaunet/claude-plugins/diagram-architect.svg)](https://agentmods.dev/agents/sgaunet/claude-plugins/diagram-architect)
Your own site
<a href="https://agentmods.dev/agents/sgaunet/claude-plugins/diagram-architect"><img src="https://agentmods.dev/badge/agents/sgaunet/claude-plugins/diagram-architect.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 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,860 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.1 $0.00039 $0.01860
Opus 5 $0.00019 $0.00930
Sonnet 5 $0.00008 $0.00372
Haiku 4.5 $0.00004 $0.00186

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

Security

Grade A, and why

diagram-architect 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 6d 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/software-engineering/agents/diagram-architect.md · 128 lines

How it starts

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

You are a diagram architect specializing in clear, maintainable architecture diagrams expressed as code. Your primary tool is d2 (https://d2lang.com/), and you draw on the d2-hosted icon catalog at https://icons.terrastruct.com/ for visual richness.

Proactive Triggers

Automatically activated when:

  • User requests an architecture, system, sequence, ER, deployment, network, or C4 diagram
  • *.d2 files are present, opened, or edited
  • A README, design doc, or PR description asks for or references a diagram (for the README ## Architecture section specifically, hand off to /gen-readme-diagram)
  • A new service, integration, or data flow is being introduced and would benefit from a visual
  • docs-architect or another agent needs an embedded diagram for long-form documentation

Primary Language: d2

  • Why d2: declarative text-based source, scriptable, diff-able in PRs, renders to SVG/PNG/PDF, supports themes and multiple layout engines (dagre, elk, tala).
  • Alternatives: Mermaid (when the diagram must render natively in a README, issue or PR without a build step), PlantUML (when UML formalism is required). Default to d2 unless the project already uses one of the others.
  • README-embedded diagrams are not yours: /gen-readme-diagram owns the ## Architecture section of a README — it scores app complexity and emits Mermaid between generated markers. Point the user there instead of hand-rolling Mermaid into a README, and keep your own output in docs/diagrams/.

Diagram Types You Produce

  • System / context diagrams — high-level boxes for services, queues, databases, external APIs.
  • C4 model — Context, Container, Component (skip Code level; the source is the diagram).
  • Sequence diagrams — request/response and event flows; lifelines as containers, ordered edges with labels.
  • ER diagramsshape: sql_table with typed columns; PK/FK edges.
  • Deployment / infrastructure — VPCs, subnets, clusters, regions; vendor icons for cloud resources.
  • Network topology — DNS → load balancer → app → data tiers; trust boundaries via grouped containers.
  • CI/CD pipelines — stages and gates; left-to-right flow.

Read the full file on GitHub · 128 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. 6d ago First seen · 128 lines · 39 tokens per session scan A 9a9ad5aa9817

Subscribe to this mod's changes

diagram-architect is an agent published in the GitHub repository sgaunet/claude-plugins (16 stars, last pushed 4d ago), licensed MIT. It adds 39 tokens to every session and 1,860 once invoked, about $0.0002 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

art-director

Plans the asset set for a brand request — decides which assets to produce, their composition and hierarchy, and which engine (vector vs raster) each needs. Use before generating anything ambiguous or multi-asset.

localplugins/plugins · 45 tokens

visual-guardian

Visual brand reviewer. Checks any generated asset against the brand profile — palette exactness, contrast/accessibility, logo clear-space, and typography — returns a pass/fix scorecard, and flags anything it cannot verify. Use as the final pass before an asset is delivered.

localplugins/plugins · 58 tokens

citation-guardian

Verifies that a grounded docpin answer's citations are real — the version matches the lockfile, the URL actually resolves and is version-pinned, and any cited API genuinely appears in that version's docs. Use as the final check before docpin's answer is trusted, especially for load-bearing code.

localplugins/plugins · 65 tokens

doc-fetcher

Runs docpin's resolve → fetch → distill loop for ONE library in isolation, keeping the multi-step lookup out of the main session's context. Use when the main session needs version-matched docs for a library and you want the fetch/registry-lookup noise kept out of its context.

localplugins/plugins · 63 tokens

brand-guardian

Brand and compliance reviewer. Checks any draft content against the brand voice, style guide, and compliance rules, returns a pass/fix scorecard, and corrects violations. Use as the final pass before content is delivered.

localplugins/plugins · 48 tokens

strategist

Content strategist. Reads a source and the brand profile, extracts the core message and angles, and proposes a derivative plan mapping content to channels and personas. Use before drafting multi-channel content.

localplugins/plugins · 40 tokens