# diagram-generator

diagram-generator turns code and docs into Mermaid diagrams: architecture, schemas, data flows. Any diagram can come out as one standalone HTML page.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 146 installs · ★ 45 repo stars
- Author: oimiragieo
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/oimiragieo/agent-studio/tree/HEAD/.claude/skills/diagram-generator/SKILL.md
- Updated: 2026-07-14
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/oimiragieo-diagram-generator

## What it does

The skill writes Mermaid diagrams: flowcharts, sequence and class diagrams, state machines, ER schemas, Gantt charts, pie, mindmap, timeline, gitGraph, kanban and quadrant charts. It reads source files and docs with Read, Glob and Grep, then saves the result with Write.

HTML is the second output mode. You get one self-contained page that pulls Mermaid.js from a CDN, carries a theme toggle and opens dark. Files land in `.claude/context/artifacts/diagrams/`, with the `.mmd` source and the `.html` next to it.

Two caps matter on a big repo: 200 nodes per diagram and 1000 files per run, so a monolith gets split by subsystem with an overview drawn first. Only Mermaid syntax is accepted, so PlantUML and ASCII art are out. Nothing is written outside `.claude/context/artifacts/diagrams/` either, which means moving diagrams into your docs is a manual step.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add oimiragieo/agent-studio --skill diagram-generator -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/diagram-generator/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/diagram-generator/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add oimiragieo/agent-studio --skill diagram-generator -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/diagram-generator/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add oimiragieo/agent-studio --skill diagram-generator -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/diagram-generator/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install oimiragieo/agent-studio .claude/skills/diagram-generator
```

2. **Manually: put the files in place**
- File: `.github/skills/diagram-generator/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add oimiragieo/agent-studio --skill diagram-generator -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/oimiragieo/agent-studio --path .claude/skills/diagram-generator
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/diagram-generator/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add oimiragieo/agent-studio --skill diagram-generator -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/oimiragieo/agent-studio/tree/HEAD/.claude/skills/diagram-generator/SKILL.md

## When to use it
- draw an ER diagram from the tables in `prisma/schema.prisma`
- map a login flow as `flowchart TB`
- export a schema diagram to a single HTML page with a theme toggle
- visualise branch history as `gitGraph`
- split a large service into overview and detail diagrams

## Example prompts
- Draw a `flowchart TB` of the login flow in `src/auth/`, keep it under 200 nodes.
- Turn `prisma/schema.prisma` into an ER diagram and export it as HTML.
- Diagram `src/api/` as a sequence of one request, then a component view of the whole folder.

## Similar
- [diagram-design](https://affpapa.org/en/nevibecode/skills/diagram-design.md) — skill · 30900 installs
- [diagram-architect](https://affpapa.org/en/nevibecode/agents/diagram-architect.md) — subagent · 1178 installs
- [architecture-diagram-creator](https://affpapa.org/en/nevibecode/skills/architecture-diagram-creator.md) — skill · 524 installs
- [agent-mermaid-diagram-specialist](https://affpapa.org/en/nevibecode/plugins/agent-mermaid-diagram-specialist.md) — plugin · ★ 2707 repo stars
- [coco-diagram](https://affpapa.org/en/nevibecode/skills/coco-diagram.md) — skill · ★ 328 repo stars
- [diagram-design-editorial](https://affpapa.org/en/nevibecode/skills/diagram-design-editorial.md) — skill · 440 installs

## Other versions with the same name
- [diagram-generator · zhaoxuya520](https://affpapa.org/en/nevibecode/skills/diagram-generator.md) — 1500 installs
- [diagram-generator · franklee16](https://affpapa.org/en/nevibecode/skills/franklee16-diagram-generator.md) — ★ 240 repo stars

From the same set: [oimiragieo/agent-studio](https://affpapa.org/en/nevibecode/by/oimiragieo/agent-studio.md) — 8 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
