skills/ai-agent-platform/figma/SKILL.md
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.
npx skillsauth add seaworld008/commonly-used-high-value-skills figmaInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Figma MCP 是连接设计稿与生产代码的超级引擎。它通过 Figma API 获取结构化设计上下文、变量定义及原始素材,并结合大模型的推理能力,将视觉稿一键转化为符合项目规范的 React/Tailwind/Vue 代码。
# 确保已安装 Figma MCP Server
mcp_call({ action: "search", keyword: "figma" });
# 获取访问令牌 (PAT)
# 详见 references/figma-mcp-config.md
为了确保 1:1 的视觉还原度和高性能的代码实现,必须严格遵循以下流程:
get_metadata 获取高层级节点地图,再精准抓取需要的子节点。get_screenshot 获取节点的实时渲染图片,作为实现时的绝对参考。cornerRadius: 8)映射到项目的 Design Tokens(如 rounded-lg)。tailwind.config.js 对比。mcp_call({ name: "get_design_context", arguments: { fileKey, nodeIds } })。children 数组,识别 TEXT, VECTOR, INSTANCE 等节点类型。#3B82F6 -> brand-primary)。get_file_variables 获取全局主题定义。variable-id 而非硬编码颜色。get_screenshot 的结果传入多模态模型进行视觉校验。image_edit 技能在截图上标注出具体的像素间距,辅助编码。icon-user-profile.svg)。svgr 转化为 React 组件。### 🎨 设计稿信息
- **File Key**: [例如:vO3S...]
- **Node ID**: [例如:12:456]
- **截图参考**: [URL 或本地路径]
### 🛠️ 实现要求
- **框架**: Next.js + Tailwind CSS
- **组件库**: 优先复用 `src/components/ui/` 下的 ShadcnUI。
- **交互**: 悬浮状态需增加 `hover:scale-105` 动画。
### 📦 素材处理
- 所有图标导出为 Inline SVG。
- 背景图放在 `public/images/`。
// 示例:获取整个 Figma 文件的页面结构
mcp_call({
name: "get_metadata",
arguments: {
fileKey: "XYZ789..."
}
});
i18n-expert 技能,自动生成多语言 JSON 文件并替换设计稿中的占位符。get_screenshot 调用有严格限制,需注意缓存。undefined。header, nav, main)。SVGO 压缩,禁止直接引入未经过滤的大型图片。MEMORY.md。webapp-testing 技能中运行一次视觉差异分析。.env.local,严禁提交到代码仓库。tools
飞书审批:查询和处理审批待办/已办/实例,搜索可发起审批定义、查看定义详情并发起原生审批实例。当用户要处理审批任务、查看审批实例、搜索或发起审批时使用。审批待办不是飞书任务;非审批类待办走 lark-task。不负责创建审批定义;三方审批定义不走原生提单。
development
Use when a user needs reproducible repository sizing, language composition, file counts, or code-versus-comment ratios with pygount; record exclusions and verify measurement scope before interpreting results.
development
Route a development task to the official Hermes Agent skill, Graphify Codex artifact set, Open GSD Core bundle, or optional GSD Pi bundle without duplicating their installers or state machines.
development
飞书 / Lark 通讯录:按姓名 / 邮箱解析成 open_id,或按 open_id 反查姓名 / 部门 / 邮箱 / 联系方式 / 个人状态 / 签名,以及按关键词搜索当前用户可见的机器人 / 智能体(agent)。当用户提到一个名字要下一步发消息 / 排日程,或拿到 open_id 想查具体信息时使用。不负责部门树遍历、按部门列员工、组织架构图,这类需求走原生 OpenAPI。