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 — 18 skills, 7 agents shipped together

Good fit Use it for system, C4, sequence, entity-relationship, deployment, network, and data-flow diagrams.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/sgaunet/claude-plugins/diagram-architect
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/sgaunet/claude-plugins

Made for: Claude Code.

Or install software-engineering, the plugin that ships this one along with the rest of its 18 skills, 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/github.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/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 diagram-architect

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. 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.00039 $0.01860
Opus 5.5 $0.00016 $0.00744
Sonnet 5.5 $0.00008 $0.00372
Haiku 4.5 $0.00004 $0.00186

Measured 2mo ago against content hash 9a9ad5aa9817, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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 diagrams — shape: 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. 2mo 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 (18 stars, last pushed 8d ago), licensed MIT. It adds 39 tokens to every session and 1,860 once invoked, about $0.0002 per session on Opus 5.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

prototype-architect

Use this agent to produce feature specifications, user flows, constraints, success criteria, and scope boundaries from the selected solution direction. Invoked after the Prototype constraints conversation is complete. Context: Prototype constraints gathered, need feature specification. user: "Constraints are captured.…

baodq97/open-plugin · 114 tokens

qg-validator

Use this agent to validate Design Thinking phase output against phase-specific quality criteria. Handles all 5 phases with different criteria per phase. Returns PASS/WARN/FAIL verdict. Invoked automatically after each synthesis agent. Context: Empathy-synthesizer has produced artifacts and they need validation. user…

baodq97/open-plugin · 201 tokens

qg-design

Use this agent to validate Design phase output against domain-specific quality criteria. Checks architecture consistency, STRIDE security coverage, API-story mapping, design-time test specifications, ADR presence, and data model integrity. Returns PASS/WARN/FAIL verdict. Invoked automatically after design generation…

baodq97/open-plugin · 140 tokens

ideation-evaluator

Use this agent to synthesize the Ideate phase conversation into scored solution concepts, evaluation matrix, and selected direction. Invoked after the orchestrator completes the Ideate conversation. Context: Ideate conversation is complete with solution brainstorming and evaluation. user: "Ideation is done. Synthesize…

baodq97/open-plugin · 125 tokens