build-figma
它能做什么
让智能体使用项目中已有的组件和样式,根据 Figma 设计构建一个页面。适合实现 Figma 设计的设计师和开发者。
适用场景
- ✓当你分享一个指向特定画框的 Figma 链接,并要求实现它的时候。
- ✓当你希望用项目自己的组件构建某个 Figma 设计的时候。
- ✓当你希望将结果与原始设计进行视觉比对的时候。
技能链接
https://github.com/cursor/plugins/blob/main/dyl-stack/skills/build-figma/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请用我们现有的组件,在我们的网页应用中实现这个 Figma 画框,并告诉我它与设计稿的接近程度。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体通过已连接的 Figma 工具读取 Figma 节点,将设计映射到你项目中的组件和样式,构建界面,然后与设计稿做一次视觉检查。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Build Figma
Orchestrator for Figma → production UI. It does not replace the skills below. Read each when that phase starts; do not restate them here.
Requires figma (plugin and connected MCP) and cursor-team-kit. Check first with ../dyl-mode/references/requirements.md. Missing → stop and tell the user to run /add-plugin <name>.
Failure modes that shaped the gates: references/failure-lessons.md.
Delegate to (do not copy)
| Phase | Read |
|---|---|
| Figma MCP mechanics | figma-design-to-code from the Figma plugin, before every get_design_context |
| Design-system inventory | references/design-system-discovery.md, then any repo-local design-system skill or rule it finds |
| Visual claim / verdict shape | verify-this from cursor-team-kit + references/visual-judge.md |
| Drive live UI | control-ui from cursor-team-kit, or the repo's own control skill for that surface |
Gates
Build-figma progress:
- [ ] 0. Parse fileKey + nodeId (refuse file-only URLs)
- [ ] 1. Intake done before any product UI edit (see below)
- [ ] 2. Mapped to the repo's primitives/tokens only
- [ ] 3. Styling in the surface's own styling system
- [ ] 4. Visual judge VERIFIED per visual-judge.md (verify-this claim shape)
Gate 1 blocks coding. "Functional first, polish visuals later" is the main failure mode.
Workflow (thin)
0. Parse URL
figma.com/design/:fileKey/...?node-id=1-2 → fileKey, nodeId (1-2 → 1:2). Branch URLs use branchKey as fileKey. No node-id → stop.
1. Intake (blocking)
Follow figma-design-to-code. Call get_design_context and get_screenshot. If the response is sparse or too large, split to implementable child nodes. Download brand assets from MCP URLs; never redraw logos.
Run design-system discovery. Then write /tmp/build-figma/<slug>/intake.md:
- Target surface, code path, and how you will drive it live.
- Node tree.
- Metric table. Figma px → token, or pinned value when no token matches.
- Node → primitive map. Each Figma node to an existing component. Mark any node with no match as new, with why.
2. Implement
Use the surface's styling system and the mapped components. When Figma px disagree with a primitive's default size, pin the Figma metric in that styling system. Do not bend the primitive's defaults globally. Hard bans below.
3. Visual judge (blocking)
Specialize verify-this with references/visual-judge.md. Treat the Figma shot as baseline and the live capture as treatment. Match theme polarity first, then apply the rubric and write the verdict. After NOT VERIFIED, fix the failed rows, recapture, and apply the rubric again. Repeat until VERIFIED or INCONCLUSIVE. Stop and report the blocker after INCONCLUSIVE; do not claim Gate 4 complete.
4. Report
Intake path, map highlights, verdict + evidence paths, remaining gaps.
Hard bans
- Paste Figma MCP Tailwind/React as product code.
- Invent brand assets when Figma or the repo has them.
- "Close enough" primitive for a distinct Figma structure.
- Trust text/button/dialog size tokens without checking Figma px.
- Claim visual done without the judge.
- Edit product UI before
intake.mdexists.
常见问题
它需要指向特定画框的链接吗?
需要。它要求 Figma 链接中包含节点 ID,并拒绝整个文件的链接。
需要设置哪些工具?
需要可用的 Figma 插件及其已连接的工具,还需要团队工具包插件。
它会直接粘贴 Figma 生成的 Tailwind 代码吗?
不会。该技能要求不粘贴 Figma 生成的 Tailwind 代码,而是使用项目自己的基础组件。
详情
作者的原始描述
Use for \"/build-figma\", a figma.com/design URL with node-id, or \"implement this Figma\" into a web, desktop, or shared UI. Orchestrates Figma MCP intake, maps nodes to the repo's own design system, then a verify-this visual judge. Do not paste Figma Tailwind.
repo: cursor/plugins
热度
- GitHub 星标
- 15k
- 排名
- #10948
- 许可证
- —
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
advisor
15k如果你开启该功能,让你的智能体在关键节点咨询一个更强的第二模型,例如在重大决定之前,或在错误上卡住时。
check-agent-compatibility
15k全面检查 AI 编程智能体能否启动、验证和记录某个代码仓库,并返回一个兼容性评分以及主要问题。
cli-for-agents
15k教你的智能体设计或审查命令行工具,使 AI 智能体无需提示即可运行,并提供清晰的帮助文字和示例。
continual-learning
15k通过把回顾过往对话的工作交给专门的记忆更新程序,使你的 AGENTS.md 笔记保持最新。