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.
curl -O https://raw.githubusercontent.com/ChinaCarlos/figma-agent-kit/main/.cursor/skills/figma-ui-restore/SKILL.mdgit clone --depth 1 https://github.com/ChinaCarlos/figma-agent-kitWrote 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.
[](https://agentmods.dev/skills/chinacarlos/figma-agent-kit/figma-ui-restore)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.md、docs/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 调用约定
- 优先使用已连接的 figma-agent-mcp(宿主里名称可能是
figma-agent-mcp/user-figma-agent-mcp等)。 - 先
list_files,用返回的 connectedfileKey;勿只用 URL 里的 fileKey(易出现 No plugin connected)。 - 默认端口 1998(与
bridge.config.json/ 插件构建一致);自定义端口须 MCP 与插件同改。 - 调用前用
GetMcpTools(若环境要求)确认参数 schema。
常用工具:
| 用途 | 工具 |
|---|---|
| 探活 / 取 fileKey | list_files |
| 读选区 | get_selection |
| 读节点树 | get_node(nodeIds,可选 depth) |
| 选中 / 聚焦 | set_selection、scroll_and_zoom_into_view |
| 视觉基准(Agent 侧预览) | get_screenshot(默认 PNG,scale 默认 2;基准建议 scale 1~2) |
| 切图落盘 | save_screenshots(scale: 3,PNG compress: true) |
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.
- 10d ago First seen · 304 lines · 135 tokens per session scan A fcc6f9f2bd86
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.
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…
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.
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.
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…
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…
favicon-exporter
Prepare and export favicon assets from Figma in common web sizes and formats.