figma
它能做什么
这个技能教你的智能体如何通过 Figma 连接读取设计,并在你的项目中构建相匹配的页面。适合希望把设计转为代码、并保证准确性的设计师和开发者。
适用场景
- ✓当你分享一个 Figma 链接,并希望将其构建为页面或组件时。
- ✓当你需要把 Figma 文件中的颜色、间距或文字样式复用到代码中时。
- ✓当 Figma 连接不工作,你需要帮助设置时。
技能链接
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/creative-design/figma/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请在我的应用中,完全按照我发给你的 Figma 链接来构建这个页面。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体首先读取所选 Figma 元素的结构,并截取屏幕截图以便对照。然后它会使用你项目现有的风格和组件编写代码,并对照设计检查结果。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Figma MCP
Use the Figma MCP server for Figma-driven implementation. For setup and debugging details (env vars, config, verification), see references/figma-mcp-config.md.
Figma MCP Integration Rules
These rules define how to translate Figma inputs into code for this project and must be followed for every Figma-driven change.
Required flow (do not skip)
- Run get_design_context first to fetch the structured representation for the exact node(s).
- If the response is too large or truncated, run get_metadata to get the high-level node map and then re-fetch only the required node(s) with get_design_context.
- Run get_screenshot for a visual reference of the node variant being implemented.
- Only after you have both get_design_context and get_screenshot, download any assets needed and start implementation.
- Translate the output (usually React + Tailwind) into this project's conventions, styles and framework. Reuse the project's color tokens, components, and typography wherever possible.
- Validate against Figma for 1:1 look and behavior before marking complete.
Implementation rules
- Treat the Figma MCP output (React + Tailwind) as a representation of design and behavior, not as final code style.
- Replace Tailwind utility classes with the project's preferred utilities/design-system tokens when applicable.
- Reuse existing components (e.g., buttons, inputs, typography, icon wrappers) instead of duplicating functionality.
- Use the project's color system, typography scale, and spacing tokens consistently.
- Respect existing routing, state management, and data-fetch patterns already adopted in the repo.
- Strive for 1:1 visual parity with the Figma design. When conflicts arise, prefer design-system tokens and adjust spacing or sizes minimally to match visuals.
- Validate the final UI against the Figma screenshot for both look and behavior.
Asset handling
- The Figma MCP Server provides an assets endpoint which can serve image and SVG assets.
- IMPORTANT: If the Figma MCP Server returns a localhost source for an image or an SVG, use that image or SVG source directly.
- IMPORTANT: DO NOT import/add new icon packages, all the assets should be in the Figma payload.
- IMPORTANT: do NOT use or create placeholders if a localhost source is provided.
Link-based prompting
- The server is link-based: copy the Figma frame/layer link and give that URL to the MCP client when asking for implementation help.
- The client cannot browse the URL but extracts the node ID from the link; always ensure the link points to the exact node/variant you want.
References
references/figma-mcp-config.md— setup, verification, troubleshooting, and link-based usage reminders.references/figma-tools-and-prompts.md— tool catalog and prompt patterns for selecting frameworks/components and fetching metadata.
常见问题
我需要有 Figma 文件的访问权限吗?
需要。智能体需要文件的访问权限,以及可用的 Figma 连接,才能读取设计。
代码会和 Figma 文件完全一样吗?
该技能力求接近,并复用你项目的颜色和组件,因此仍可能存在细微差别。
如果设计太大,无法一次读取怎么办?
智能体会先查看设计的高层结构图,然后只读取所需的部分。
详情
作者的原始描述
Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.
热度
- GitHub 星标
- 33k
- 排名
- #8689
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
owasp-security
33k教你的智能体掌握面向网页应用、API、移动端、容器和 AI 智能体的 OWASP 安全指南,以便发现常见弱点并提出修复建议。
agent-management
33k让你的智能体使用 AI Maestro 命令行工具创建、列出、休眠、唤醒、重命名和删除 AI 智能体,管理每个智能体的生命周期。
agent-messaging
33k让你的智能体使用智能体消息协议,在 AI 智能体之间发送、接收和回复带签名的消息,大部分在你自己的电脑上完成。
docs-search
33k让你的智能体搜索自动生成的代码文档,查找函数签名、类定义和注释,从而在修改代码之前核对真实的 API。