/ramtoshiya:figma-restfrom ramtoshiya
Use when reading anything out of a Figma design file — design tokens, colors, type/spacing scales, node structure, or rendered node images — and when a Figma MCP tool returns a rate-limit or "nothing selected" error. Prefer the REST API over the Figma MCP server, which is capped per seat.
Ships in ramtoshiya. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Default to the REST API for reading Figma files. Reach for the MCP server only for what REST cannot do.
Token setup and GET /v1/me confirmed on 2026-10-15. Seat limits, endpoint coverage, and the traps below were last reviewed on 2026-08-28. Recheck Figma's documentation when one of them disagrees with what you see.
The Figma MCP server is rate-limited by seat type, not by plan tier:
| Seat | Limit |
|---|---|
| View, Collab | 6 tool calls per month (every plan tier) |
| Dev, Full | 200/day (Pro, Org) · 600/day (Enterprise) |
Six calls per month is enough to look around once and then be locked out for weeks, and the cap is silent until hit. The REST API has a far larger budget and covers nearly all reading.
whoami, generate_figma_design, and add_code_connect_map are exempt from MCP rate limits. Run whoami to check seat and plan for free. Do this before assuming MCP is available.
Two MCP behaviors worth knowing, because they waste calls:
get_variable_defs reads the live desktop selection. Passing a nodeId does not substitute for the user having selected something in the Figma app.Reading needs a personal access token (Figma → Settings → Security → Personal access tokens). Keep it in ~/.config/agent-secrets/figma.env as a FIGMA_TOKEN= line, mode 600. If that file is missing, ask the user to create it. Do not ask them to paste the token into the conversation. The path is absolute and outside any repository, so it resolves identically from every working directory and every runtime, so there is no per-project setup and no reason to add FIGMA_TOKEN to a project's env file.
It deliberately does not live beside this file: the skill ships in a version-controlled plugin that each agent copies into its plugin cache, so a secret placed here would be committed and copied everywhere the skill goes.
Resolve it in this order, preferring an already-exported value so a caller can override without touching the store:
TOKEN="${FIGMA_TOKEN:-}"
[ -z "$TOKEN" ] && TOKEN=$(sed -n 's/^FIGMA_TOKEN=//p' ~/.config/agent-secrets/figma.env | head -1 | tr -d '"'"'"'\r')
curl -s -H "X-Figma-Token: $TOKEN" "https://api.figma.com/v1/files/$KEY?depth=1"
Never let the value reach the transcript, an echoed command line, or a tracked file. Redact before showing output that could carry it: sed -E 's/figd_[A-Za-z0-9_-]+/figd_<redacted>/'.
A revoked or under-scoped token returns 403, which is indistinguishable from a wrong file key. When anything 403s, check the token before doubting the key:
curl -s -o /dev/null -w '%{http_code}\n' -H "X-Figma-Token: $TOKEN" https://api.figma.com/v1/me
200 means the token is good and the fault is the file key, the node id, or that endpoint's scope.
Works on any plan:
| Need | Endpoint |
|---|---|
| Enumerate pages | GET /v1/files/:key?depth=1 |
Node subtree with fills, text, boundVariables | GET /v1/files/:key/nodes?ids=<id>&depth=N |
| Render a node to PNG/SVG | GET /v1/images/:key?ids=<id>&format=png&scale=N |
| Published styles | GET /v1/files/:key/styles |
Variables are Enterprise-only. GET /v1/files/:key/variables/local needs the file_variables:read scope, which is grantable only to full members of an Enterprise org. On other plans the scope does not appear in the token UI at all, and requesting it in an OAuth flow errors before callback. Do not treat its absence as a misconfiguration. Read resolved values off the canvas instead (below).
Also not available through REST: Code Connect mappings, and any write/generate operation.
When the variables endpoint is out of reach, the design file itself usually carries the values in a machine-readable way. Inspect the tree before writing an extractor, because conventions vary per file:
:root { --space-4: 4px; … } block as a text node. Walk for type === "TEXT" and match characters against /--[a-z-]+:/. This is the highest-fidelity source: it is what the designer intends, already in CSS syntax.Chip/gray-700 → RECTANGLE whose fills[0].color is the value. Convert with Math.round(channel * 255) per channel. fills[0].opacity carries alpha (it is separate from color.a).Card/color-text-secondary containing PrimRef/color-gray-700). That recovers the semantic→primitive mapping the variables endpoint would have given.boundVariables on a node confirms a value is variable-driven and gives the variable id, but ids cannot be resolved to names without the variables endpoint. Use the frame names instead.Write the extractor to a file and run node /tmp/x.js rather than node -e with a long inline script, because nested quotes in shell heredocs break easily.
Page and node ids are not stable. Files get restructured and pages renamed. Always re-enumerate pages instead of reusing recorded ids, and treat any id written in a doc as a hint.
Hidden-layer trap. REST returns hidden nodes by default, with no special flag needed, and marked only by "visible": false. Before calling a visually redundant node (the same text or content appearing twice in one instance) a stray duplicate or a design mistake, check that node's visible field first: visible: false means the designer turned it off on purpose, not evidence of an error.
Depth-cutoff trap. GET /v1/files/:key/nodes?ids=<id>&depth=N stops recursing at depth N, so a node sitting at or near that cutoff can come back with "children": [] or fewer children than it actually has, with nothing distinguishing "the API stopped here" from "this is genuinely empty." Before concluding a node's content was removed because children came back empty or short, check how deep that node sits relative to the requested depth. If it's near the limit, re-fetch that node id directly, or the same root with a larger depth, before trusting the emptiness.
When comparing design values to code, diff programmatically and report all four buckets: matches, value mismatches, present-in-design-only, present-in-code-only. A count of matches alone hides missing tokens. Expect some differences to be intentional (naming that collides with a framework namespace, human-readable labels like black 8% versus overlay-black-8). Record those as deliberate rather than re-litigating them each time.
Keep project-specific conventions, such as actual page ids, frame naming, and which differences are intentional, in that project's own docs, not here.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
14 skills in this plugin
/excalidraw-boardUse when a user asks agents to read, draw, or export selected objects as PNG from a shared excalidraw.com room, or a collaborator references a room id, revision, and element ids. Uses separately installed excalidraw-board and, for PNG export, excalidraw-web-export commands./github-actions-authoringUse before creating or editing .github/workflows/*.yml, .github/workflows/*.yaml, action.yml, or action.yaml anywhere in a repository, even for a small non-version change. Verify every remote uses dependency against its official GitHub releases, enforce a 72-hour release cooldown, inspect compatibility and security, and pin original-repository commit SHAs. Never choose action versions from model memory./imagegenGenerate or edit raster images (photos, illustrations, product shots, UI mockups, textures, sprites, transparent cutouts) with OpenAI GPT Image 2.5 or xAI Grok Imagine through a bundled script that calls an OpenAI-compatible Images API. Use when the user asks to create, draw, render, restyle, or edit an image, or when a task needs a new bitmap asset. Do not use for diagrams, icons, or logos that belong in SVG, HTML/CSS, or canvas, or to extend an existing vector asset set./impeccable-interviewInterview for a product task or user flow in an Impeccable project, using its PRODUCT.md, DESIGN.md, and target-specific surface brief. Use when the user wants to clarify or resume a design brief and persist approved task context for Impeccable. Separates user evidence from assumptions, preserves existing direction contracts, and proposes storage changes before saving. Not for implementing UI, visual polish, arbitrary design-system edits, or small specified fixes./mermaid-checkRun the real Mermaid parser over every Mermaid diagram before delivering it, instead of trusting a read-through. Use whenever you write or edit Mermaid anywhere: a `.mmd` file, a ```mermaid fenced block in a `.md` / README / docs page, or a diagram drafted in chat that will land in a file — even when the user only asked for "a diagram" and never mentioned validation. Also use when a user reports a Mermaid diagram that will not render, or when you are about to say a diagram "looks right". Covers `.mmd` files, whole Markdown documents with several blocks, and stdin; prints the parse error without the stack trace./owner-decisionsRecord the user's decisions for a repository and keep the rules that follow from them current. Use when the user makes, changes, or confirms a decision or a preference that should govern later work in a repository, when you set up a new or empty repository, when a repository has no docs/decisions/ yet, when you cite one of the user's decisions in a plan, brief, or reply, or when you doubt that an old decision still fits.npx claudepluginhub ramtoshiya/skills --plugin ramtoshiya