figma-agent-kit: Skill for Cursor

.cursor/skills/figma-ui-restore/SKILL.md

figma-ui-restore is a skill for Cursor from ChinaCarlos/figma-agent-kit. It costs 135 tokens per session (4,305 once invoked), scanned A, original, MIT.

A Chinese-language workflow for rebuilding a web interface from a selected Figma frame or board with matching structure, visuals, assets, and checks.

In plain words
What is it for?
Use it to recreate pages, components, or dialogs from Figma, save reference screenshots, translate measured bounds into styles, and check the result section by section.
Why use it?
It breaks a Figma-to-code task into explicit inspection, asset, implementation, comparison, and acceptance steps.

Skill for Cursor

Written for Cursor: installed under .cursor/.

This is ChinaCarlos/figma-agent-kit's own configuration. It tells Cursor how to work on figma-agent-kit itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything figma-agent-kit configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ChinaCarlos/figma-agent-kit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ChinaCarlos/figma-agent-kit/main/.cursor/skills/figma-ui-restore/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ChinaCarlos/figma-agent-kit

Made for: Cursor.

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-ui-restore

README.md
[![agentmods](https://agentmods.dev/badge/skills/chinacarlos/figma-agent-kit/figma-ui-restore/github.svg)](https://agentmods.dev/skills/chinacarlos/figma-agent-kit/figma-ui-restore)
Your own site
<a href="https://agentmods.dev/skills/chinacarlos/figma-agent-kit/figma-ui-restore"><img src="https://agentmods.dev/badge/skills/chinacarlos/figma-agent-kit/figma-ui-restore/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-ui-restore

Your own site · 80×15
<a href="https://agentmods.dev/skills/chinacarlos/figma-agent-kit/figma-ui-restore"><img src="https://agentmods.dev/badge/skills/chinacarlos/figma-agent-kit/figma-ui-restore.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 135 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,305 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.00135 $0.04305
Opus 5 $0.00068 $0.02152
Sonnet 5 $0.00027 $0.00861
Haiku 4.5 $0.00014 $0.00430

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

Security

Grade A, and why

figma-ui-restore 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 10d 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.

.cursor/skills/figma-ui-restore/SKILL.md · 304 lines

How it starts

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

Figma UI 1:1 还原(Figma Agent Kit)

沟通:简体中文。

定位

本 Skill 指导 Agent 用 本仓库配套工具链完成通用 UI 稿还原:

组件 用途
Figma Agent Kit 插件 Figma Desktop 中运行;桥客户端、可选切图 UI
figma-agent-mcp stdio MCP:读节点 / 截图 / save_screenshots

不是:某一活动仓专用流水线;不绑定 partyActivity / hh-active / fe-prd-plan。
:任意前端项目里「对着 Figma scope 做结构还原 + 切图 + 验收」的通用流程。

前置文档(需要时 Read):

  • 上手 / 工具表:仓库 docs/zh/getting-started.mddocs/zh/tools.md 或文档站
  • 桥协议:docs/zh/bridge-protocol.md

一句话总览

锁 scope →(确认门)→ list_files → get_node 读结构 → TEXT 全量归类
  → 切图打标 → get_screenshot 基准图 → save_screenshots×3 落盘
  → bounds 落码 → 分块对照 → 验收清单勾完才能说「1:1」

默认 figmaMode: strict。仅用户明文「快速 / fast」时可压缩步骤 3 的冗长层级表、可省略步骤 5 落盘基准图;不得跳过 3b TEXT 清单步骤 4 切图粒度不得整页一图兜底。


流程总图

flowchart TD
  A[用户给 Figma URL] --> B[解析 scopeNodeId]
  B --> C{实现向确认门?}
  C -->|未确认| D[禁止 get_node / 切图 / 落码<br/>仅 list_files + 定输出目录]
  C -->|已确认| E[list_files → connected fileKey]
  E --> F[get_node 读子树结构 + bounds]
  F --> G[步骤 3b TEXT 全量清单归类]
  G --> H[步骤 4 非 TEXT 打标 skin/whole-btn/panel-bg]
  H --> I[get_screenshot 基准图]
  I --> J[save_screenshots scale3 落 images]
  J --> K[步骤 7 bounds→样式单位落码]
  K --> L[步骤 7b 分块对照基准图]
  L --> M{块通过?}
  M -->|否| K
  M -->|是| N[对照验收清单]
  N --> O{全通过?}
  O -->|否| K
  O -->|是| P[可写「已按 scope 1:1 对照验收」]

0. 前置检查(工具链)

- [ ] Figma Desktop 已打开目标文件(设计模式;勿依赖易休眠的浏览器标签)
- [ ] 已 Import 并运行 Plugins → Development → Figma Agent Kit
- [ ] 插件显示 MCP Bridge 已连接(绿色)
- [ ] Cursor(或其它宿主)已配置 figma-agent-mcp:npx -y figma-agent-mcp
- [ ] MCP 面板可见工具(约 37 tools)
- [ ] node-id:URL 中 1-234 → MCP 用 1:234

MCP 调用约定

  1. 优先使用已连接的 figma-agent-mcp(宿主里名称可能是 figma-agent-mcp / user-figma-agent-mcp 等)。
  2. list_files,用返回的 connected fileKey;勿只用 URL 里的 fileKey(易出现 No plugin connected)。
  3. 默认端口 1998(与 bridge.config.json / 插件构建一致);自定义端口须 MCP 与插件同改。
  4. 调用前用 GetMcpTools(若环境要求)确认参数 schema。

常用工具:

用途 工具
探活 / 取 fileKey list_files
读选区 get_selection
读节点树 get_nodenodeIds,可选 depth
选中 / 聚焦 set_selectionscroll_and_zoom_into_view
视觉基准(Agent 侧预览) get_screenshot(默认 PNG,scale 默认 2;基准建议 scale 1~2)
切图落盘 save_screenshotsscale: 3,PNG compress: true

Read the full file on GitHub · 304 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. 10d ago First seen · 304 lines · 135 tokens per session scan A fcc6f9f2bd86

Subscribe to this mod's changes

figma-ui-restore is a skill published in the GitHub repository ChinaCarlos/figma-agent-kit (4 stars, last pushed 1mo ago), licensed MIT. It adds 135 tokens to every session and 4,305 once invoked, about $0.0007 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

refero-design

Primary/default skill for UI design, product design, web design, landing pages, dashboards, product screens, redesigns, visual polish, frontend/CSS styling, design systems, components, responsive design, typography, color, spacing, motion, icons, accessibility, copywriting, conversion, and anti-AI-slop work. Use this…

referodesign/refero_skill · 191 tokens

tailwind-design-system

Build scalable design systems with Tailwind CSS v4, design tokens, component libraries, and responsive patterns. Use when creating component libraries, implementing design systems, or standardizing UI patterns.

calesthio/OpenMontage · 42 tokens

vercel-composition-patterns

React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.

calesthio/OpenMontage · 58 tokens

figma-codegen

Generate framework-aware code from a Figma design. Reads the project's stack profile and emits code matching the existing framework (React/Vue/Svelte/Next/etc.) and styling (Tailwind/CSS/CSS-in-JS), reusing existing components and design tokens instead of regenerating from scratch. Triggers whenever the user wants a…

awdr74100/figwright · 145 tokens

ui-ux-design-best-practices

UI/UX polish, component design, animation decisions, and Tailwind v4 patterns for making interfaces feel right. Use when reviewing, writing, or refactoring UI code involving animations, transitions, CSS transforms, gestures, Tailwind utility classes, or interactive component behavior. Triggers on tasks involving…

louisbrulenaudet/monorepo-template · 96 tokens

favicon-exporter

Prepare and export favicon assets from Figma in common web sizes and formats.

madebypan/FigCC · 19 tokens