figma-plugin

figma-plugin is a skill for Claude Code, Codex from bergside/design-md-figma. It costs 38 tokens per session (563 once invoked), scanned A, original, MIT.

A guide to building Figma plugins, which are small programs that extend Figma, a collaborative design tool. It covers the Plugin API, document objects, styles, components, and communication between the plugin logic and its user interface.

In plain words
What is it for?
Use it to set up a plugin project, manipulate Figma nodes, create styles and components, connect the interface to plugin logic, test locally, and publish through Figma Community.
Why use it?
It helps keep Figma document changes in the plugin's main sandbox while the interface handles user interaction and outside services. This avoids mixing responsibilities between the two parts of a plugin.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/bergside/design-md-figma/figma-plugin
Any agent
npx skills add bergside/design-md-figma --skill figma-plugin
Clone the repo
git clone --depth 1 https://github.com/bergside/design-md-figma

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/bergside/design-md-figma/figma-plugin.svg)](https://agentmods.dev/skills/bergside/design-md-figma/figma-plugin)
Your own site
<a href="https://agentmods.dev/skills/bergside/design-md-figma/figma-plugin"><img src="https://agentmods.dev/badge/skills/bergside/design-md-figma/figma-plugin.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 563 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00038 $0.00563
Opus 5 $0.00019 $0.00282
Sonnet 5 $0.00008 $0.00113
Haiku 4.5 $0.00004 $0.00056

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

Security

Grade A, and why

figma-plugin 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 5d 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.

.agents/skills/figma-plugin/SKILL.md · 46 lines

How it starts

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

Figma Plugin Development

Build plugins that extend Figma's functionality using the Plugin API.

Architecture

Figma plugins run in two threads communicating via postMessage:

  • Main thread (sandbox): Plugin API access, node manipulation, figma.* calls
  • UI thread (iframe): HTML/CSS/JS interface, no Figma API access, npm packages allowed

Key Principles

  • Main thread handles all Figma document operations
  • UI thread handles user interface and external APIs
  • Communication between threads via figma.ui.postMessage() and onmessage
  • Plugins must be performant — avoid blocking the main thread

Quick Start Checklist

  1. Set up project with manifest.json (name, id, main, ui)
  2. Create main thread code (code.ts) with plugin logic
  3. Create UI (ui.html) with interface elements
  4. Wire up postMessage communication between threads
  5. Test in Figma development mode
  6. Publish via Figma Community

References

Reference Description
project-structure-and-build.md Manifest, TypeScript setup, build configuration
development-testing-and-publishing.md Dev workflow, testing, publishing, troubleshooting
api-globals-and-nodes.md Global objects, node types, components
api-rendering-and-advanced.md Paints, effects, auto layout, styles, variables, events
ui-architecture-and-messaging.md iframe UI, postMessage, typed messages, plain HTML
ui-react-and-theming.md React setup, hooks, Figma theme colors
ui-patterns-and-resources.md Loading states, tabs, color pickers, file downloads
selection-traversal-and-batching.md Selection handling, node traversal, batch operations
colors-and-text.md Color conversion, manipulation, text operations
layout-storage-and-utilities.md Positioning, alignment, storage, error handling, utilities

Read the full file on GitHub · 46 lines

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. 5d ago First seen · 46 lines · 38 tokens per session scan A 5a5c6cb02618

Subscribe to this mod's changes

figma-plugin is a skill published in the GitHub repository bergside/design-md-figma (149 stars, last pushed 3mo ago), licensed MIT. It adds 38 tokens to every session and 563 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-30.

Related

Other skills, from other repositories

hatch3r-design-system-detect

Detects existing design tokens, component library, and theming convention in a project before authoring new UI primitives — output a concise inventory for downstream implementers.

hatch3r/hatch3r · 40 tokens

ai-humanizer-zh

中文润色去AI味 助手适合市场营销、运营、内容创作者、产品在用户提出“怎么去AI味”这类问题,需要快速拆解目标、判断重点并形成可执行结果时使用,帮助基于输入材料生成AI 写作痕迹诊断、自然化改写稿、问题片段说明。.

skillsaiagent/aiskills · 81 tokens

ai-ab-testing

Skill "ai-ab-testing" from skillsaiagent/aiskills, covering ai-ab-testing a/b 测试设计助手, 概述, 什么时候使用, 调用方式 and 命令示例.

skillsaiagent/aiskills · 77 tokens

ai-accessibility

无障碍体验诊断助手适合内容创作者、市场营销、运营、内容媒体在用户提出“这个页面好用吗”这类问题,需要快速拆解目标、判断重点并形成可执行结果时使用,帮助基于输入材料生成问题归因、服务改进建议、SOP 或 FAQ 清单。.

skillsaiagent/aiskills · 75 tokens

ai-account-research-sales-card

销售增长助手适合销售、市场营销、运营、产品在用户提出“客户为什么不推进”这类问题,需要快速拆解目标、判断重点并形成可执行结果时使用,帮助基于输入材料生成摘要、诊断结论、行动建议和可复用交付物。.

skillsaiagent/aiskills · 71 tokens

ai-account-research

客户研究助手适合市场营销、运营、software、教育培训在用户提出“这个客户怎么切入”这类问题,需要快速拆解目标、判断重点并形成可执行结果时使用,帮助基于输入材料生成销售策略、沟通素材、跟进计划。.

skillsaiagent/aiskills · 65 tokens