- Home
- Skills
- Technical Documentation
- Diagram Maker: Code & Ideas to Mermaid Diagrams
Works with the AI Agents you already use
Diagram Maker: Code & Ideas to Mermaid Diagrams
- **Reads your real code** (routes, models, services, configs) to draw architecture and call sequences with real names.
Free
Diagram Maker: Code & Ideas to Mermaid Diagrams
Example session with this skill installed
Draw the architecture of this repo and a sequence diagram of what happens when a customer places an order. Add them to docs/architecture.md.
- Read your context and instructions
- Compiled the diagram maker
- Generated the UI component
Summary
Scanned src/routes, src/services, prisma/schema.prisma and serverless.yml. Wrote 2 diagrams to docs/architecture.md; both validated with mermaid-cli (exit 0) and checked visually.
1. Architecture overview
flowchart LR
subgraph Client
web[Nuxt storefront]
end
subgraph AWS
api[API Gateway] --> orders[orders Lambda]
orders -->|enqueue| q[[SQS fulfilment]]
q --> worker[fulfilment Lambda]
end
subgraph Data
db[(Postgres via Prisma)]
end
subgraph External
stripe[Stripe]
mail[Resend]
end
web -->|HTTPS| api
orders -->|charge| stripe
orders -->|writes| db
worker -->|updates| db
worker -->|emails| mail
classDef ext fill:#f3f4f6,stroke:#6b7280,color:#111827
class stripe,mail ext
Read left to right: requests enter via API Gateway; payment is synchronous, fulfilment is async through SQS.
2. Place order (sequence)
sequenceDiagram
autonumber
actor C as Customer
participant W as Storefront
participant O as orders Lambda
participant S as Stripe
participant D as Postgres
participant Q as SQS
C->>W: Click "Pay"
W->>O: POST /orders
O->>S: create PaymentIntent
alt paid
S-->>O: succeeded
O->>D: insert order (PAID)
O->>Q: enqueue fulfilment
O-->>W: 201 order id
else declined
S-->>O: card_declined
O-->>W: 402 + message
end
Notes
- Found an unused
notificationsservice (no routes reference it); left out and flagged. - Want an ERD of the Prisma models too?
diagram-maker-code-ideas-to-mermaid-diag.tsx
TSX · React component
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Diagrams that render the first time and actually explain something
AI diagrams usually break (Mermaid syntax errors), invent components ("Service A") or turn into 40-node spaghetti. Diagram Maker fixes all three.
What it does
- Starts from the question the reader needs answered, then picks the right diagram: flowchart, sequence, architecture, ERD, state, class, Gantt, timeline, mind map or user journey.
- Reads your real code (routes, models, services, configs) to draw architecture and call sequences with real names. Never invents components.
- Readable by design: max ~15 nodes (overview + detail split when bigger), one direction, short labels, verbs on edges, subgraphs by boundary, consistent shapes, meaningful colors that work in light and dark.
- Validated: checks 12 common Mermaid gotchas and renders with mermaid-cli to prove it works before delivering.
- Output: fenced Mermaid block (renders in GitHub, GitLab, Notion, Obsidian, Docusaurus) and/or
.mmd+.svg/.png, with a short caption. PlantUML, D2 or Excalidraw on request. - Modes: from code, from text/notes, or minimal updates to an existing diagram.
Includes
- SKILL.md workflow
- references/diagram-types.md - ready snippets for 9 diagram types (all tested)
- references/mermaid-gotchas.md - the errors that break rendering and how to avoid them
Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI and any SKILL.md-compatible agent.
Maximum of 15 nodes per diagram to maintain readability. Requires mermaid-js/mermaid-cli for local SVG/PNG rendering. Defaults to Mermaid unless otherwise specified.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
This skill has been used 13 times.
Trust & safety
Security scan
Security scan passed 10 days ago
- Free with an Agensi account
Requires