figma-bridge
Skill9 starsChanged 31 days agoMITView on GitHub
Expert guide for the figma-bridge MCP (vladmdgolam/figma-mcp-bridge): reading live Figma files through the plugin without API rate limits, and keeping responses small enough to fit in context. Activate when: (1) any mcp__figma-bridge__* tool is about to be used, (2) the user says 'see figma bridge', 'I selected it in Figma', 'check the figma', 'match the figma', 'look at my selection', (3) a design-to-code task references a Figma frame, (4) exporting screenshots or per-node JSON from Figma, (5) errors like 'exceeds maximum allowed tokens', 'outputPath must be inside the MCP server working directory', 'No plugin connected for fileKey', 'Unable to establish connection to Figma', 'Invalid regex', 'Node not found'. Covers the list_files-first handshake, the depth/fields read ladder, screenshot-to-disk workflow, node-id formats, and the leader/follower cwd gotcha.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- H-ymt/skillstheir own version, first seen Nov 1, 2026
- MaxsBond/figma-bridgetheir own version, first seen Oct 20, 2026
- bienhoang/wp-pro-maxtheir own version, first seen Oct 11, 2026
- jlefort/figma-bridgetheir own version, first seen Sep 4, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- bienhoang/wp-pro-max★ 4same name
- H-ymt/skills★ 0same name
- jlefort/figma-bridge★ 0same name
- MaxsBond/figma-bridge★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-sessionsSkill
- apple-books-mcpSkill
- blender-mcpSkill
- cinema4d-mcpSkill
- figma-context-mcpSkill
- fluid-interfacesSkill
- pdf-look-scannedSkill
- reverse-engineer-jsSkill
- threejs-perf-loadingSkill
- time-lensSkill
- visual-feedback-loopSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 3 are distinctive, and 10 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Read and edit live Figma files through the figma-bridge MCP (plugin + local server, no Figma REST API, no rate limits).
- Very specific: line 10
Not the same as Framelink (figma-context-mcp skill, REST API, 6 req/month on free plans).
- Very specific: line 16
Call list_files before anything else.
- Distinctive: line 17
If it returns nothing, stop and ask the user to run the plugin in the target file (Figma → Plugins → Development → Figma MCP Bridge).
- Very specific: line 18
If more than one file is connected, pick the one whose fileName matches the task and pass fileKey on every subsequent call.
- Very specific: line 38
If a result still overflows, the error names the dump path under ~/.claude/projects/….
- Distinctive: line 50
When the user says "see figma bridge, I selected it":
- Very specific: line 95
If the error says the path must be inside a different working directory, write there and cp -R afterwards.
- Very specific: line 103
Fix: Read the saved file with grep if you only need one value.
- Very specific: line 107
Fix: Write inside the printed root and move the file, or omit outputPath and use the returned temp path.
- Very specific: line 115
Fix: Use the key listed in the error, or rerun list_files.
- Very specific: line 119
Fix: Use name for a case-insensitive substring match, or rewrite with character classes.
- Distinctive: line 129
Fix: Ask the user to switch the file out of Dev Mode.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Figma Bridge
Read and edit live Figma files through the figma-bridge MCP (plugin + local server, no Figma REST API, no rate limits). This skill exists because in real sessions 20% of bridge calls failed, and almost every failure was one of six avoidable mistakes listed under Troubleshooting.
Not the same as Framelink (figma-context-mcp skill, REST API, 6 req/month on free plans). Use the bridge whenever the plugin can be opened in the file. Fall back to Framelink only for files you cannot open in Figma.
Instructions
Step 1: Handshake — list_files first, then pass fileKey everywhere
- Call
list_filesbefore anything else. It never fails and returns[{fileKey, fileName}]for every file where the plugin is open. - If it returns nothing, stop and ask the user to run the plugin in the target file (Figma → Plugins → Development → Figma MCP Bridge). Do not retry other tools in a loop.
- If more than one file is connected, pick the one whose
fileNamematches the task and passfileKeyon every subsequent call. Omitting it is the error "Multiple files connected. Specify a fileKey". fileKeyfor cloud files is the id in the URL:figma.com/design/<fileKey>/<name>. Locally unsaved files get keys likeunsaved-ms7tl1kp-…that change when the file is reopened. When you see "No plugin connected for fileKey", rerunlist_filesand use the key it prints.
Step 2: Read with the ladder, never with the firehose
Responses over the context limit are not returned; Claude Code dumps them to a file and you get an error. Server builds from 2026-09-07 on default get_document and get_selection to depth 2 and genuinely honor depth on get_node (it was accepted and ignored before, which is why these calls used to overflow). Truncated levels come back as {id,name,type} stubs with childCount and truncated: true. On an older build, assume every read is unbounded and lean harder on find_nodes.
Use this order:
- Orient:
get_design_context({depth: 2, fileKey}). Returns the current selection if there is one, else the current page, depth-limited. This is how you learn what the user selected and get the node ids. Keep depth ≤ 3. - Locate:
find_nodes({root, name | regex, type, limit, fileKey})returns lightweight{id, name, type}rows without serializing subtrees. Scope withrootwhenever you have a parent id. Orget_node_by_path({path: "Hero/Card/Title"})for a readable address that survives file revisions. - Drill:
get_node({nodeId, depth, fields, fileKey}). Defaultdepth: 0returns the node with children as{id,name,type}stubs; raisedepthone level at a time. Combinedepth: 1or2withfieldsto get exactly what you need. Projections that worked well in practice:- text specs:
["characters","styles.fontSize","styles.fontFamily","styles.fontStyle","styles.fontWeight","styles.lineHeight"] - layout:
["bounds","children.bounds","children.name"] - colors:
["styles.fills","styles.strokes","children.styles.fills"] - visibility:
["styles.visible","styles.opacity"]Omitted style fields are Figma defaults (opacity 1, visible true, cornerRadius 0, empty fills = none).
- text specs:
- Bulk: for a big frame you need to study in full,
save_children_json({parentId, outputDir, filenamePattern: "{name}.json"})writes one JSON file per direct child, then grep orjqthe files instead of pulling them through context. get_selectionandget_documentare fine at their depth-2 default. Raising their depth on a large page is still the fastest way to blow the context budget.
If a result still overflows, the error names the dump path under ~/.claude/projects/…. Read that file with grep or a short Python snippet. Do not re-issue the same call with a bigger depth.
Step 3: Look at the design, not just its JSON
get_screenshot({nodeIds: [id], scale: 2, fileKey})writes a PNG to a temp dir and returns{path, width, height}. Read the returned path with the Read tool to actually see it. Useisolate: trueto hide siblings for a clean capture of one node.- To save to a chosen location:
outputPathaccepts exactly onenodeId, the extension must matchformat(or omitformatand let the extension decide), and the path must be inside the bridge server's working directory (see Troubleshooting). When unsure, skipoutputPath, take the temp path, andcpit where you want. - Multiple nodes to disk:
save_screenshots({items: [{nodeId, outputPath}, …], format: "PNG", scale: 2, fileKey}). - Pages and the document root are not exportable. "No nodes to export" means the id was a page or the selection was empty.
image_fill_export({imageHash})turns an IMAGE paint hash fromget_nodeinto real PNG bytes.
Step 4: Design-to-code loop
When the user says "see figma bridge, I selected it":
list_files→get_design_context({depth: 2})to get the selected frame ids and names.get_screenshotof the selected frame and Read it. Now you know what it should look like.get_nodewithfieldson the specific children you are implementing (text specs, bounds, fills). Do not fetch the whole subtree.- Implement.
- Screenshot your implementation (Chrome MCP or the project's screenshot route) and compare it to the Figma capture before reporting done. The most common user correction on bridge-driven work is "still" — meaning nobody looked at the result.
Step 5: Editing and pointing
- Edit tools (
set_*,create_*,reparent_nodes,group_nodes,duplicate_nodes) only work when the plugin is open in the design editor. Dev Mode is read-only and returns a clear error. delete_nodesrequiresconfirm: true. Ask the user before deleting.create_textdefaults to Inter Regular; passfontFamily/fontStyleexplicitly. Text edits auto-load the fonts already on the node.create_imagewith a relativesourceresolves against the server cwd; pass an absolute path.- To show the user something:
set_selection({nodeIds})thenscroll_and_zoom_into_view({nodeIds}). Both work in Dev Mode.
Node id rules
- Colon format:
6270:81. The hyphen form from Figma URLs (node-id=6270-81) is normalised server-side, so either works. Instance children look likeI12740:17806;12740:17793. - "Node not found" means the id came from an earlier file revision or a different file. Re-find it with
find_nodesorget_node_by_path; do not guess neighbouring ids.
Examples
Example 1: Match a panel to the Figma design
User says: "the gradient panel looks off, see figma bridge, i've selected the right one"
Actions:
list_files→ one file,fileKey: "AbC123".get_design_context({depth: 2, fileKey})→ selected frameGradient editorid6513:1101with childrenSwatches,Stops,Footer.get_screenshot({nodeIds: ["6513:1101"], scale: 2, fileKey})→ Read the PNG.get_node({nodeId: "6513:1101", depth: 2, fields: ["bounds","children.bounds","children.name","children.styles.fills"], fileKey}).find_nodes({root: "6513:1101", type: "TEXT", fileKey})thenget_nodeon each with the text-spec projection.- Implement, screenshot the running app, compare with step 3, then report.
Result: Two bridge calls carried the whole spec; no overflow, no guessing.
Example 2: Export every slide of a frame to disk
User says: "export all the slides in the Deck frame as pngs into ./export"
Actions:
list_files;find_nodes({name: "Deck", type: "FRAME", limit: 5, fileKey})→120:4.get_node({nodeId: "120:4", depth: 0, fileKey})→ child stubs.save_screenshots({items: children.map(c => ({nodeId: c.id, outputPath: "<abs cwd>/export/" + c.name + ".png"})), format: "PNG", scale: 2, fileKey}).- If the error says the path must be inside a different working directory, write there and
cp -Rafterwards.
Result: One call per batch, files on disk, nothing base64 in context.
Troubleshooting
"Error: result (N characters) exceeds maximum allowed tokens. Output has been saved to …"
Cause: A read returned more than fits in context, usually an explicit high depth on a big frame. Historically the top failure, because depth was ignored server-side; fixed 2026-09-07.
Fix: Read the saved file with grep if you only need one value. Otherwise drop back to the ladder in Step 2 and add fields. If a plain get_node({depth: 0}) still overflows, the Figma plugin is running an old build — rebuild plugin/ and reopen it.
"outputPath must be inside /some/other/project"
Cause: Written files are confined to the bridge server's process.cwd(), which belongs to whichever client started the leader on port 1994; later sessions proxy through it. The error prints the real root.
Fix: Write inside the printed root and move the file, or omit outputPath and use the returned temp path. Permanently: set FIGMA_BRIDGE_OUTPUT_ROOT on the server. To reset the leader, lsof -i :1994 and close the session holding it.
"Unable to establish connection to Figma after 10 seconds"
Cause: The plugin is not open in that file, Figma is in the background with the plugin closed, or the leader process died.
Fix: list_files. If empty, ask the user to reopen the plugin. Do not retry the failing call more than once.
"No plugin connected for fileKey … Connected files: …"
Cause: Stale key, usually an unsaved-… id from a file that was reopened. With exactly one file connected the server now falls back to it, so this only fires when several are open.
Fix: Use the key listed in the error, or rerun list_files.
"Invalid regex: invalid group"
Cause: find_nodes.regex is a JavaScript RegExp, so Python-style constructs fail. A leading (?i) is now lifted onto the flags automatically; anything else Python-only still throws.
Fix: Use name for a case-insensitive substring match, or rewrite with character classes.
"Node not found: 6513:110197"
Cause: Id from a previous file revision, a different page, or a different connected file.
Fix: find_nodes by name under a known root, or get_node_by_path. Check fileKey.
"format JPG conflicts with outputPath extension (WEBP)" / "outputPath only supports a single nodeId"
Fix: Let the extension pick the format and pass one nodeId; use save_screenshots for several nodes. WEBP needs cwebp on PATH.
Edit tool returns "read-only" / Dev Mode error
Fix: Ask the user to switch the file out of Dev Mode; the plugin must run in the design editor for writes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

