diagram-generator · oimiragieo — Claude Code skill: Mermaid diagrams and HTML export
diagram-generator turns code and docs into Mermaid diagrams: architecture, schemas, data flows. Any diagram can come out as one standalone HTML page.
no license 146 installs ★ 45 updated 2026-07-14
npx skills add oimiragieo/agent-studio --skill diagram-generator -a claude-codeWhat diagram-generator 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.
What it helps with
- 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 for the agent
- Draw a
flowchart TBof the login flow insrc/auth/, keep it under 200 nodes. - Turn
prisma/schema.prismainto 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.
How to install diagram-generator
1Skills CLI (Vercel)
npx skills add oimiragieo/agent-studio --skill diagram-generator -a claude-code2Manually: put the files in place
~/.claude/skills/diagram-generator/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/diagram-generator/
1Skills CLI (Vercel)
npx skills add oimiragieo/agent-studio --skill diagram-generator -a codex2Manually: put the files in place
.agents/skills/diagram-generator/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add oimiragieo/agent-studio --skill diagram-generator -a cursor2Manually: put the files in place
.cursor/skills/diagram-generator/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install oimiragieo/agent-studio .claude/skills/diagram-generator2Manually: put the files in place
.github/skills/diagram-generator/SKILL.md1Skills CLI (Vercel)
npx skills add oimiragieo/agent-studio --skill diagram-generator -a gemini-cli2Platform CLI
gemini skills install https://github.com/oimiragieo/agent-studio --path .claude/skills/diagram-generatorManually: put the files in place
.devin/skills/diagram-generator/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add oimiragieo/agent-studio --skill diagram-generator -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about diagram-generator
How do I install diagram-generator in Claude Code?
Run npx skills add oimiragieo/agent-studio --skill diagram-generator -a claude-code. The skill file ends up at ~/.claude/skills/diagram-generator/SKILL.md.
What does diagram-generator do?
It builds Mermaid diagrams from code and documentation: architecture, ER schemas, sequences, state machines, timelines. Any of them can be saved as a standalone HTML page with a dark/light toggle.
Can it export a diagram as a standalone HTML file?
Yes. The HTML mode embeds Mermaid.js from a CDN in one file, opens in dark mode and includes a button that switches the theme.
Similar skills
All skills for Agent setup: memory, context, orchestration →diagram-generator by other authors comes first.