# diagram-architect

This subagent turns code or plain-language requirements into technical diagrams, including flowcharts, ERDs, state machines, and dependency graphs.

- subagent · `type=agent` · Claude Code · 1178 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/documentation/diagram-architect.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/agents/diagram-architect

## What it does

\`diagram-architect` creates diagrams for system architecture, data flows, object states, database schemas, and API interactions. It can inspect a codebase or work from a written description, then produce ASCII, Mermaid, PlantUML, or Draw.io output.

The subagent has access to `Read`, `Write`, `Edit`, and `Bash`. Use Mermaid for Markdown documentation, ASCII for terminals and code comments, PlantUML for more involved diagrams, or Draw.io when the result needs visual editing. It can also convert a diagram to another format and split a large scheme into overview and detail views.

PlantUML output requires a PlantUML server. Check that dependency before asking the subagent to produce PlantUML diagrams.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --agent documentation/diagram-architect
```

2. **Manually: put the files in place**
- File: `.claude/agents/diagram-architect.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/diagram-architect.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/diagram-architect.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/documentation/diagram-architect.md

## When to use it
- map a process with decisions and error paths
- generate an ERD from SQL or `schema.prisma`
- show the order of API calls between components
- model an object lifecycle or authentication flow
- trace imports and draw module dependencies

## Example prompts
- Create a Mermaid flowchart for user authentication with MFA.
- Generate an ERD from `schema.prisma` and include the entity relationships.
- Map the dependencies in `src/services/` from its import statements.

## Similar
- [prompt-engineer](https://affpapa.org/en/nevibecode/agents/voltagent-community-prompt-engineer.md) — subagent · 16078 installs
- [context-manager](https://affpapa.org/en/nevibecode/agents/context-manager.md) — subagent · 10638 installs
- [code-explorer](https://affpapa.org/en/nevibecode/agents/code-explorer.md) — subagent · 1172 installs
- [search-specialist](https://affpapa.org/en/nevibecode/agents/search-specialist.md) — subagent · 6886 installs
- [api-documenter](https://affpapa.org/en/nevibecode/agents/api-documenter.md) — subagent · 6451 installs
- [technical-writer](https://affpapa.org/en/nevibecode/agents/technical-writer.md) — subagent · 4345 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 361 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
