figma-plugin-api

figma-plugin-api is a skill for Claude Code, Codex from shinjiyu/figma_mcp. It costs 34 tokens per session (395 once invoked), scanned A, original, MIT.

Instructions and code patterns for using the Figma Plugin API through figma_exec, which runs code inside the Figma plugin environment.

In plain words
What is it for?
Use them to find frames, inspect selected objects, read node properties, and export a selected node as a PNG.
Why use it?
They explain the API's access limits and show safe ways to inspect Figma nodes and export images.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use them to find frames, inspect selected objects, read node properties, and export a selected node as a PNG.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shinjiyu/figma_mcp/figma-plugin-api
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add shinjiyu/figma_mcp --skill figma-plugin-api
Clone the repo
git clone --depth 1 https://github.com/shinjiyu/figma_mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for figma-plugin-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/shinjiyu/figma_mcp/figma-plugin-api.svg)](https://agentmods.dev/skills/shinjiyu/figma_mcp/figma-plugin-api)
Your own site
<a href="https://agentmods.dev/skills/shinjiyu/figma_mcp/figma-plugin-api"><img src="https://agentmods.dev/badge/skills/shinjiyu/figma_mcp/figma-plugin-api.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 395 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.00395
Opus 5 $0.00017 $0.00198
Sonnet 5 $0.00007 $0.00079
Haiku 4.5 $0.00003 $0.00040

Measured 6d ago against content hash 16621b335cf1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

figma-plugin-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/figma-plugin-api/SKILL.md · 61 lines

What it actually says

figma_exec (Plugin API)

Code runs in the plugin main thread with global figma.

Do

  • return plain objects / arrays / numbers / strings
  • await figma.getNodeByIdAsync(id) under documentAccess: dynamic-page
  • Map nodes yourself:
return figma.currentPage.selection.map((n) => ({
  id: n.id,
  name: n.name,
  type: n.type,
  x: n.x,
  y: n.y,
  width: n.width,
  height: n.height,
}));

Don't

  • Rely on REST / Personal Access Tokens (not used by this MCP)
  • Return giant binary / image bytes unless asked
  • Expect the plugin panel to stay connected if the user closed it

Useful snippets

Find frames by name

const hits = figma.currentPage.findAll(
  (n) => n.type === "FRAME" && n.name.includes("主界面")
);
return hits.map((n) => ({
  id: n.id,
  name: n.name,
  w: n.width,
  h: n.height,
}));

Export PNG (base64) for one node

const node = figma.currentPage.selection[0];
if (!node) return { ok: false, error: "no selection" };
const bytes = await node.exportAsync({ format: "PNG", constraint: { type: "SCALE", value: 1 } });
// Return length only by default — full base64 can be huge.
return { id: node.id, name: node.name, byteLength: bytes.byteLength };
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 61 lines · 34 tokens per session scan A 16621b335cf1

Subscribe to this mod's changes

figma-plugin-api is a skill published in the GitHub repository shinjiyu/figma_mcp (0 stars, last pushed 1mo ago), licensed MIT. It adds 34 tokens to every session and 395 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

webgl-holographic-foil

A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.

nexu-io/open-design · 41 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

html-ppt-taste-brutalist

16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).

nexu-io/open-design · 78 tokens

accessibility

Consolidated accessibility skill entrypoint for WCAG 2.2, ARIA Authoring Practices, cognitive accessibility, Section 508, EN 301 549, design intent verification, and the Accessibility Planner workflow.

microsoft/hve-core · 47 tokens

make-resume

A Chinese-language tool for creating editable HTML resumes that can be changed in a browser and printed to PDF. It uses available resume templates when they are installed and otherwise provides a simpler fallback.

Hisn00w/ASu-skills · 86 tokens

prototype-web

A clickable, high-fidelity web product prototype with navigation, a hero section, feature cards, steps, social proof, and optional pricing. It is designed to resemble a finished landing page while remaining a prototype.

nexu-io/html-anything · 24 tokens