Claude Code plugin that adds the figma-deep-dive agent — a token-efficient
spec extractor for Figma designs.
Given a Figma file URL + one or more node IDs, the agent returns a distilled report per node: layout, colours, text nodes, spacing, ordered children, variant component IDs. It explicitly refuses to produce code — findings only. That's the whole value prop: keep the parent conversation's context small while still getting accurate design data.
- 🚀 Install
- ⚙️ How it works
- 🌍 Localization auto-resolution
- 🎚 Modes
- 💬 Usage patterns
- 🛠 Troubleshooting
- ❓ FAQ
- 👥 Maintainers
Prerequisites: Claude Code (installed + signed in), the Figma Desktop app (not the web app), and a Figma personal access token — create one at figma.com → Settings → Security → Personal access tokens with scopes File content: Read, Variables: Read, Comments: Read and write. Everything else is checked and fixed by the setup doctor.
You're installing three pieces; the doctor wires up the first two for you:
| Piece | What | Owner |
|---|---|---|
figma-console-mcp |
Node process that talks to Figma and exposes MCP tools | southleft/figma-console-mcp |
| Figma Desktop Bridge | Figma-desktop plugin that bridges Variables/Component APIs to the MCP server | Same repo, under figma-desktop-bridge/ |
This plugin (figma-deep-dive) |
The agent + the /figma-setup doctor |
This repo |
-
Open a terminal (or the Claude Code prompt with
!) and paste:claude plugin marketplace add georgeab550/Figma-Deep-Dive claude plugin install figma-deep-dive@Figma-Deep-Dive claude plugin enable figma-deep-dive -
Start Claude Code and run
/figma-setup. (Start typing/figma-set…and pickfigma-deep-dive:figma-setupfrom the menu — plugin commands are namespaced under the plugin name.)It checks Node, your Figma token, the MCP server, and the Desktop Bridge — fixes what it can, and gives you one plain instruction for anything it can't. If you don't have a token yet, it walks you through creating one. If it ends with "restart Claude Code", do that once and run it again — it should come back all green.
-
Import the Desktop Bridge into Figma (one-time): download or clone southleft/figma-console-mcp (you only need the
figma-desktop-bridge/folder), then in Figma Desktop open your file → Plugins → Development → Import plugin from manifest… → pickfigma-desktop-bridge/manifest.json→ Run. The tile turns green when it connects (it auto-scans ports 9223–9232). You import once — the bootloader pulls fresh code from the MCP server each run, so updates need no re-import.
Already had the old manual install? Same three commands — /figma-setup migrates
you automatically (your token is rescued from the old entry; no re-paste). Re-run
/figma-setup any time something Figma-related misbehaves.
Important
The Desktop Bridge is required, not optional — the MCP server cannot reach Figma's Variables API or component descriptions without it.
claude plugin marketplace update Figma-Deep-Dive
claude plugin install figma-deep-dive@Figma-Deep-Dive/figma-setupregistersfigma-consoleas a user-scope MCP entry runningnpx -y figma-console-mcp@latest— deliberately not a plugin-bundled.mcp.json, which would namespace the tools (mcp__plugin_…) and break themcp__figma-console__*references in the agent. Because it's@latest,npxpicks up new MCP releases on its own.- Your Figma token lives inline in that user-scope entry — on your machine only,
never committed anywhere. Token changed or revoked? Re-run
/figma-setup. - The Desktop Bridge is the upstream bootloader, imported once via manifest; it loads its logic from the local MCP server at runtime, so it self-updates.
When you invoke figma-deep-dive, it runs as a subagent in its own context
window and executes a fixed pipeline:
- Reads the inputs — file URL, one or more node IDs (
NNNN:NNNN), and an optional checklist of what to resolve. - Calls the
figma-consoleMCP — strictly this one, no other Figma providers. Primary tool isfigma_get_component_for_developmentwithincludeImage: false(text-only output). When more detail is needed, it escalates within figma-console on demand —figma_get_variables/figma_get_token_valuesto resolve aVariableIDto its token name/value, orfigma_get_component_for_development_deepwhen the primary call comes back thin. - Handles large payloads — if a response exceeds ~60k characters, the MCP writes it to disk and returns the path. The agent
jqs the file in place instead of loading it into its context. - Extracts the checklist via canned
jqpatterns — tree summary, TEXT nodes with font + colour, children of named frames, etc. Hidden layers (visible:false) and their entire subtrees are excluded — only rendered nodes reach the spec. - Auto-drills one level deeper for common container names (
Card,Row,List Item,Content,input-field,list-item, and genericFrame <digits>under those). No round-trip needed. - Recurses through the REST depth-4 limit — when a frame shows
children: []at depth 4, grabs child IDs from the parent and re-queries each. - Resolves gradients — reads
gradientHandlePositionsand reports direction as SwiftUIUnitPointpairs (e.g.topLeading→bottomTrailing). - Resolves localization keys — when the working repo contains an i18n catalog, dispatches the bundled
localization-resolveragent to map every extracted text-node string to its key. Skipped silently when no catalog is present. See Localization auto-resolution. - Returns a structured report per node — layout, ordered children (top-to-bottom, load-bearing for render order), text nodes, composed components, and any remaining drill-worthy frames under
## Deferred.
Important
Hard rules the agent enforces on itself:
- No code output. No Swift, no markdown mockups. Findings only — the parent session writes the code.
- Raw hex + Figma
VariableIDwhen present, so the parent can map back to design tokens. - Flags uncertainty (
// couldn't resolve: …) — never fabricates values. - Caps output at ~3000 tokens. Overflow goes to
## Deferredwith node IDs to re-query in a follow-up pass. (Cap raised to ~8000 tokens infull-screen-auditmode.)
See agents/figma-deep-dive.md for the full output schema and auto-drill pattern list.
When figma-deep-dive runs in a repo that contains an i18n catalog, it
automatically maps every extracted text node to its localization key by
dispatching the bundled localization-resolver agent. No prompt change
required — if a catalog is present, you get keys; if not, you get the
same output you always got.
Catalog formats detected out of the box:
- iOS:
*.xcstrings,Localizable.strings,*.lproj/*.strings - Android:
res/values*/strings.xml - Web/JS:
locales/**/*.json,i18n/**/*.json,translations/**/*.json - Gettext:
*.po,*.pot - YAML:
locales/**/*.yml
Each TEXT node in the report gains a · key=<key> suffix (or · key=?
when no match exists), and a ### Localization summary appears at the
bottom of every node block:
### Localization
- catalogs scanned: 1
- resolved: 4/5
- unresolved: "Win up to 50,000 lei"
Tip
The resolver is also usable on its own — call
Agent(subagent_type: "localization-resolver", …) with any string
array when you need keys outside the Figma flow.
The agent has two modes governing how aggressive it is about drilling and how much output it allows itself.
Targeted, terse, capped at ~3000 tokens. Auto-drill only fires for
children matching a known pattern allowlist (Card, List Item,
input-field, etc.). This is the right mode for
component extraction, token lookups, single-frame audits, and any drill
where you've supplied a tight checklist.
Use when you're auditing or rebuilding an entire screen end-to-end and need the full tree resolved in one pass. In this mode the agent:
- Drills every non-leaf child recursively (the allowlist is ignored).
- Always follows up on depth-4 truncations rather than deferring them.
- Suspends the "skip nodes the parent didn't ask about" rule — emits every reachable node under the requested root.
- Lifts the output cap from ~3000 to ~8000 tokens. Overflow still spills
into
## Deferredso you can re-request specific branches.
To trigger it, include the literal phrase full-screen-audit in your
prompt, e.g.:
Audit
SCREENX.swiftagainst the full Figma screen athttps://figma.com/design/ABC/File?node-id=3660-15559usingfigma-deep-divein full-screen-audit mode. Then list discrepancies grouped by severity (structural / layout / visual / content).
Warning
Don't use this mode for targeted lookups — you'll burn tokens on a tree you're going to throw away. The defaults exist because most Figma extractions don't need the whole tree.
The agent is best called as a subagent from your parent Claude Code session, not as a drop-in replacement for reading the full Figma design context. Typical flow:
- Parent agent encounters a design implementation task and needs specific Figma node details (layout, text, colours).
- Parent calls
figma-deep-divewith the file URL, node IDs, and a checklist of what to resolve. - Agent returns a compact spec report (≤3000 tokens) that the parent consumes cheaply and acts on.
See agents/figma-deep-dive.md for the full output schema and auto-drill policy.
Each example below is a plain-English prompt you paste into Claude Code. The
parent session dispatches figma-deep-dive for you — you never need to write
Agent(subagent_type: …) by hand.
Tip
Always name the agent explicitly in your prompt (Use figma-deep-dive …)
so Claude doesn't fall back to reading the full design context itself —
that would defeat the whole point.
1. Build a whole screen from scratch
I need to build this screen in SwiftUI from scratch:
https://figma.com/design/ABC/File?node-id=3660-15559. Usefigma-deep-diveon the root frame and auto-drill every child — I want the full layout tree, every text node, fills, strokes, paddings, and the order of sections top-to-bottom. Don't skip anything; I'm writing the view from zero.
2. Implement a single component
Implement the pricing card in SwiftUI from
https://figma.com/design/ABC/File?node-id=4143-31268. Usefigma-deep-divefirst — I need exact padding, colours, text styles, and the order of child rows.
3. Audit an implementation against Figma (multi-variant)
I've already implemented the plan selection screen. Audit it against the empty state
https://figma.com/design/ABC/File?node-id=3012-87001and the filled statehttps://figma.com/design/ABC/File?node-id=3659-9373. Usefigma-deep-diveto extract both variants' specs, then diff them againstPlanSelectionView.swiftand list discrepancies.
4. Extract design tokens only
Pull colour + typography tokens from
https://figma.com/design/ABC/File?node-id=4143-31268viafigma-deep-dive. I only need the pricing card — fills, text colours, font sizes. Skip layout.
5. Drill into a specific truncated frame
The image grid is at
https://figma.com/design/ABC/File?node-id=4143-31274. Usefigma-deep-diveand auto-drill into children — I need each cell's border colour, fill, and text style. Flag any inner frame deeper than 4 levels.
6. Second pass — pick up where the first run stopped
The agent has no memory between invocations, so a follow-up pass is just another call. Use this when the first pass listed nodes under ## Deferred (token cap hit) or when you realise you need more detail on a sub-frame.
Run
figma-deep-diveagain on the same file, nodes4143-31268and4143-31300— these came back under## Deferredin the previous pass. Give me each child's fills, strokes, and text styles. Skip anything already covered underContent.
Tip
Reference earlier findings explicitly in the prompt ("skip anything already covered in X") so the new pass focuses on what's missing rather than re-extracting work the parent session already has.
- Always name the agent. Without
Use figma-deep-dive, Claude may read the fullget_design_contextitself and burn main-context tokens. - Paste the full frame URL. Right-click the frame in Figma → Copy link to selection. The URL embeds the node, so the agent knows exactly what to read.
- Tight checklists. "I need padding, colours, text styles" beats "tell me everything"; the agent skips irrelevant branches and stays under its 3000-token output cap.
- For full-screen builds (example 1), be explicit about auto-drill. That's the one case where you do want depth — say so, and the agent drills into known patterns (Card, Content, List Item, list rows) in one pass instead of forcing a round-trip per level.
| Symptom | Fix |
|---|---|
| Anything Figma-related fails — start here | Run /figma-setup; follow its one instruction; restart Claude Code if it says so |
claude mcp list doesn't show figma-console |
Run /figma-setup — it registers the MCP entry for you |
| Desktop Bridge tile stays grey / never turns green | Make sure Claude Code is open (the MCP server runs inside it), re-run the Bridge plugin in Figma Desktop, check no other app is holding ports 9223–9232; then /figma-setup |
MCP calls return 401/403 |
Run /figma-setup — if the stored token is bad it walks you through creating a fresh one with the three scopes (File content: Read, Variables: Read, Comments: Read and write) |
| Variables or component descriptions return empty | Open the target file in Figma Desktop and run the Bridge plugin there; then /figma-setup to confirm it's connected |
command not found: npx |
Run /figma-setup — its preflight installs Node 18+ (or points you to https://nodejs.org) |
It's a consumer of the MCP, not an alternative: the MCP exposes raw Figma data as tools, and the agent calls those tools but runs in its own separate context — returning only a distilled ~3000-token spec instead of dumping the full payload into your main session.
It doesn't replace the bridge — it sits on top of it: the bridge is the pipe that pulls raw data out of Figma, and the agent digests that firehose in its own context and hands you back just a compact spec, so your main session's context stays clean.
Created and maintained by georgeab550.
This plugin lives at georgeab550/Figma-Deep-Dive and
is registered as a member of the Figma-Deep-Dive marketplace
(.claude-plugin/marketplace.json at repo root). Open a PR against main
to propose changes.
The underlying figma-console-mcp and Desktop Bridge are maintained by
southleft — report upstream
issues there.