figma-use

figma-use is a skill for Codex from Haohao-end/openagent. It costs 114 tokens per session (4,162 once invoked), scanned A, original, MIT.

A required guide for using the Figma plugin API through the use_figma tool. Figma is a collaborative design application, and its plugin API lets code inspect or change design files.

In plain words
What is it for?
Use it when executing JavaScript in Figma, inspecting the plugin API, or building or updating full screens with a design system.
Why use it?
It prevents common tool errors by requiring the right reference material and settings before reading or writing Figma content.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it when executing JavaScript in Figma, inspecting the plugin API, or building or updating full screens with a design system.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/haohao-end/openagent/figma-use
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 Haohao-end/openagent --skill figma-use
Clone the repo
git clone --depth 1 https://github.com/Haohao-end/openagent

Made for: 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-use

README.md
[![agentmods](https://agentmods.dev/badge/skills/haohao-end/openagent/figma-use/github.svg)](https://agentmods.dev/skills/haohao-end/openagent/figma-use)
Your own site
<a href="https://agentmods.dev/skills/haohao-end/openagent/figma-use"><img src="https://agentmods.dev/badge/skills/haohao-end/openagent/figma-use/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for figma-use

Your own site · 80×15
<a href="https://agentmods.dev/skills/haohao-end/openagent/figma-use"><img src="https://agentmods.dev/badge/skills/haohao-end/openagent/figma-use.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,162 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00114 $0.04162
Opus 5 $0.00057 $0.02081
Sonnet 5 $0.00023 $0.00832
Haiku 4.5 $0.00011 $0.00416

Measured 9d ago against content hash afa9c4ae068a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

figma-use 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 9d 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.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

  • figma-use — 100% identical, 0 lines differ
  • figma-use — 92% identical, 18 lines differ
api/internal/core/skills/catalog/figma-use/SKILL.md · 234 lines

How it starts

The opening of the file, as written. The whole thing — 234 lines — stays where its author put it; the contents beside it link to each section on GitHub.

use_figma — Figma Plugin API Skill

Use use_figma MCP to execute JavaScript in Figma files via the Plugin API. All detailed reference docs live in references/.

Always pass skillNames: "figma-use" when calling use_figma. This is a logging parameter used to track skill usage — it does not affect execution.

If the task involves building or updating a full page, screen, or multi-section layout in Figma from code, also load figma-generate-design. It provides the workflow for discovering design system components via search_design_system, importing them, and assembling screens incrementally. Both skills work together: this one for the API rules, that one for the screen-building workflow.

Before anything, load plugin-api-standalone.index.md to understand what is possible. When you are asked to write plugin API code, use this context to grep plugin-api-standalone.d.ts for relevant types, methods, and properties. This is the definitive source of truth for the API surface. It is a large typings file, so do not load it all at once, grep for relevant sections as needed.

IMPORTANT: Whenever you work with design systems, start with working-with-design-systems/wwds.md to understand the key concepts, processes, and guidelines for working with design systems in Figma. Then load the more specific references for components, variables, text styles, and effect styles as needed.

1. Critical Rules

  1. Use return to send data back. The return value is JSON-serialized automatically (objects, arrays, strings, numbers). Do NOT call figma.closePlugin() or wrap code in an async IIFE — this is handled for you.
  2. Write plain JavaScript with top-level await and return. Code is automatically wrapped in an async context. Do NOT wrap in (async () => { ... })().
  3. figma.notify() throws "not implemented" — never use it 3a. getPluginData() / setPluginData() are not supported in use_figma — do not use them. Use getSharedPluginData() / setSharedPluginData() instead (these ARE supported), or track node IDs by returning them and passing them to subsequent calls.
  4. console.log() is NOT returned — use return for output
  5. Work incrementally in small steps. Break large operations into multiple use_figma calls. Validate after each step. This is the single most important practice for avoiding bugs.
  6. Colors are 0–1 range (not 0–255): {r: 1, g: 0, b: 0} = red
  7. Fills/strokes are read-only arrays — clone, modify, reassign
  8. Font MUST be loaded before any text operation: await figma.loadFontAsync({family, style})
  9. Pages load incrementally — use await figma.setCurrentPageAsync(page) to switch pages and load their content (see Page Rules below)
  10. setBoundVariableForPaint returns a NEW paint — must capture and reassign
  11. createVariable accepts collection object or ID string (object preferred)
  12. layoutSizingHorizontal/Vertical = 'FILL' MUST be set AFTER parent.appendChild(child) — setting before append throws. Same applies to 'HUG' on non-auto-layout nodes.
  13. Position new top-level nodes away from (0,0). Nodes appended directly to the page default to (0,0). Scan figma.currentPage.children to find a clear position (e.g., to the right of the rightmost node). This only applies to page-level nodes — nodes nested inside other frames or auto-layout containers are positioned by their parent. See Gotchas.
  14. On use_figma error, STOP. Do NOT immediately retry. Failed scripts are atomic — if a script errors, it is not executed at all and no changes are made to the file. Read the error message carefully, fix the script, then retry. See Error Recovery.
  15. MUST return ALL created/mutated node IDs. Whenever a script creates new nodes or mutates existing ones on the canvas, collect every affected node ID and return them in a structured object (e.g. return { createdNodeIds: [...], mutatedNodeIds: [...] }). This is essential for subsequent calls to reference, validate, or clean up those nodes.
  16. Always set variable.scopes explicitly when creating variables. The default ALL_SCOPES pollutes every property picker — almost never what you want. Use specific scopes like ["FRAME_FILL", "SHAPE_FILL"] for backgrounds, ["TEXT_FILL"] for text colors, ["GAP"] for spacing, etc. See variable-patterns.md for the full list.
  17. await every Promise. Never leave a Promise unawaited — unawaited async calls (e.g. figma.loadFontAsync(...) without await, or figma.setCurrentPageAsync(page) without await) will fire-and-forget, causing silent failures or race conditions. The script may return before the async operation completes, leading to missing data or half-applied changes.

Read the full file on GitHub · 234 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 234 lines · 114 tokens per session scan A afa9c4ae068a

Subscribe to this mod's changes

figma-use is a skill published in the GitHub repository Haohao-end/openagent (805 stars, last pushed 1mo ago), licensed MIT. It adds 114 tokens to every session and 4,162 once invoked, about $0.0006 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-30.

Related

Other skills, from other repositories

vision-skills

Local vision CLIs: glance (describe/ask/OCR an image), ground (locate a target, pixel box), detect (element inventory), trace (image to SVG geometry), crop (cut a pixel box to a file), and scripts/htmlshot.py (HTML file to image). Use for any task involving an image — questions, text, splitting and transcribing long…

Anionex/agent-vision-toolkit · 132 tokens

frontend-design

A design and coding guide for building distinctive web interfaces, including pages, dashboards, landing pages, and reusable components.

itmisx/deepx-code · 88 tokens

prototype-workflow

Generate and lifecycle-manage HTML prototypes for UI exploration and OpenSpec changes. Use when creating, validating, completing, or archiving a UI prototype.

creativedswork/dscode · 34 tokens

dep

Handles containerization, CI/CD pipelines, and deployment setup.

ranbot-ai/awesome-skills · 14 tokens

design-taste-frontend

Anti-slop frontend skill for landing pages, portfolios, and redesigns. The agent reads the brief, infers the right design direction, and ships interfaces that do not look templated. Real design systems when applicable, audit-first on redesigns, strict pre-flight check.

creativedswork/dscode · 61 tokens

stitch-design-taste

Semantic Design System Skill for Google Stitch. Generates agent-friendly DESIGN.md files that enforce premium, anti-generic UI standards — strict typography, calibrated color, asymmetric layouts, perpetual micro-motion, and hardware-accelerated performance.

creativedswork/dscode · 50 tokens