
Figma Generate Diagram
Generate accurate software architecture diagrams in Figma via MCP when you need services, queues, and integration edges—not generic flowcharts.
Overview
Figma Generate Diagram is an agent skill for the Build phase that produces software architecture diagrams through Figma MCP generate_diagram with architecture layout rules.
Install
npx skills add https://github.com/figma/mcp-server-guide --skill figma-generate-diagramWhat is this skill?
- Dedicated architecture-diagram mode via generate_diagram with useArchitectureLayoutCode grid layout
- Hard rules for correctness, allowed edges, subgraph categories, and async subgraph patterns
- Validation checklist and Mermaid syntax rules before calling the tool
- Explicit guidance to ask clarifying questions instead of inventing services or connections
- Points to flowchart.md when the user needs decision trees or generic process flows
- 10 numbered reference sections including validation checklist and complete example
- Architecture mode controlled by useArchitectureLayoutCode on generate_diagram
Adoption & trust: 529 installs on skills.sh; 1.6k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need a trustworthy architecture diagram in Figma but generic flowchart skills invent nodes and wrong edge semantics.
Who is it for?
Indie teams documenting real service topology, async flows, and integrations while using Figma MCP from Claude Code or Cursor.
Skip if: Pure decision-tree or marketing funnels—use the companion flowchart reference instead—or sessions without Figma MCP wired up.
When should I use this skill?
User asks for a software architecture diagram showing services, datastores, queues, and integrations—use architecture layout, not generic flowchart mode.
What do I get? / Deliverables
You get a validated Mermaid/architecture diagram generated in Figma with correct subgraphs, edge types, and layout—after clarifying ambiguous systems.
- Figma-hosted architecture diagram via generate_diagram
- Mermaid source aligned to architecture layout rules
Recommended Skills
Journey fit
Architecture views belong in Build when documenting how the product is wired before or during implementation. Docs subphase holds system diagrams, runbooks, and design artifacts that explain structure to teammates and future you.
How it compares
Architecture-specific Figma MCP procedure, not a standalone diagram SaaS or a generic Mermaid snippet without layout validation.
Common Questions / FAQ
Who is figma-generate-diagram for?
Builders and tech leads who already use Figma MCP and need architecture-grade diagrams tied to their actual stack.
When should I use figma-generate-diagram?
During Build/docs when capturing system design, onboarding diagrams, or integration maps—and when the user explicitly asks for a software architecture diagram.
Is figma-generate-diagram safe to install?
It documents MCP diagram calls—review the Security Audits panel on this page and scope Figma/API tokens with least privilege.
SKILL.md
READMESKILL.md - Figma Generate Diagram
# Architecture Diagrams Use this reference when the user asks for a **software architecture diagram** — a view showing services, datastores, message queues, external integrations, and how they connect. These are flowcharts rendered by a bespoke grid-based layout (not ELK), controlled by the `useArchitectureLayoutCode` parameter on `generate_diagram`. For generic flowcharts (decision trees, process flows, dependency graphs), use [flowchart.md](./flowchart.md) instead. ## Contents 1. [Before you start](#before-you-start) 2. [Rules](#rules) - [Hard rules (MUST)](#hard-rules-must) - [Correctness rules](#correctness-rules) - [Allowed edges](#allowed-edges) - [Known gotchas](#known-gotchas) 3. [Subgraph categories](#subgraph-categories) - [Common ambiguities](#common-ambiguities) 4. [Async subgraph](#async-subgraph) 5. [Node granularity](#node-granularity) 6. [Edge types](#edge-types) 7. [Validation checklist](#validation-checklist) 8. [Mermaid syntax rules](#mermaid-syntax-rules) 9. [Complete example](#complete-example) 10. [Calling generate_diagram](#calling-generate_diagram) --- ## Before you start **Don't hallucinate labels or edges.** If the user describes their architecture in vague terms ("we have a few microservices"), ask one or two focused questions before generating instead of inventing services or connections that don't exist. A diagram of a real, partial system is more useful than a polished diagram of an imagined one. When the source of truth is code or docs (a repo, a runbook, a Datadog dashboard), read it before drawing. Walking real routes, handlers, and consumers beats recreating from memory. --- ## Rules **Read these before writing Mermaid.** After writing, re-check the [Validation checklist](#validation-checklist) before calling the tool — that section is the post-write pass and it's tighter than this list. This section uses **two severity tiers**. Both are real rules — the difference is what happens if you violate them. - **MUST / MUST NOT** — the tool errors, the renderer crashes, or the diagram silently comes out wrong in a way the agent can't detect. - **Never / Always** — the diagram renders, but it's structurally wrong or misleading. ### Hard rules (MUST) 1. **`flowchart LR` only.** The bespoke layout is designed for left-to-right; `TD` / `TB` are not supported. 2. **Every node MUST be inside a subgraph.** Nodes outside a subgraph have no layer assignment and the layout cannot place them. Colors and shapes are auto-assigned from subgraph membership — you don't need `classDef`, `class`, or `style` statements. 3. **Subgraph IDs MUST be exactly one of:** `client`, `gateway`, `service`, `datastore`, `external`, `async`. The layout uses these IDs to position lanes; unknown IDs break placement. Use display labels for human-readable titles: `subgraph service ["Core Services"]`. - **WRONG:** `subgraph Services` - **RIGHT:** `subgraph service ["Core Services"]` 4. **Forward and bidirectional edges MUST form a DAG** across `client -> gateway -> service -> datastore`. Cycles among these will cause the tool to error. Any backward-flowing relationship must use a backward edge (rule 8) instead. 5. **All edges touching an async or external node MUST use dotted syntax (`-.->`)**, in either direction. The renderer uses the dotted style as a signal to route async/external paths differently from the core flow. ### Correctness rules These won't crash the renderer, but they produce structurally wrong or misleading diagrams. 6. **One node = one independently deployable unit.** Don't decompose a service into internal modules. See [Node granularity](#node-granularity) for the test. 7. **Bidirectional edges write source -> target in the forward direction.** `client <-->|"WS"| gateway`, not `gateway <-->|"WS"| client`. The layout uses the source position to anchor the edge. 8. **Backward edges use `<---` and write the left node first.** The arrow points left. Example: `orderService <---|"Refund