From common-skills
当需要根据已有的 figma-context.md 和设计 plan 文件实现 UI 代码时加载。触发场景:执行阶段要 1:1 还原 Figma 设计、Codex 或 agent 拿到 plan 后开始写前端代码、目录下已有 figma-context.md 需要据此实现组件。只要是从已落盘的设计数据实现代码(而非直接从 Figma MCP 读取),都应加载此 skill。
How this skill is triggered — by the user, by Claude, or both
Slash command
/common-skills:figma-executeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
基于 figma-plan 阶段产出的 `figma-context.md`、截图和 plan 文件,实现 1:1 设计还原。本 skill 不依赖 Figma MCP——所有设计数据已在规划阶段沉淀到文件中。
基于 figma-plan 阶段产出的 figma-context.md、截图和 plan 文件,实现 1:1 设计还原。本 skill 不依赖 Figma MCP——所有设计数据已在规划阶段沉淀到文件中。
figma-context.md 已存在(由 figma-plan 产出),包含完整的 Figma 设计数据attachments/ 目录| 需要什么 | 在哪里找 |
|---|---|
| 设计数值(layout、spacing、typography、color、token) | figma-context.md 的 ## Figma Design Context section |
| 视觉参照 | attachments/figma-screenshot.png |
| 组件映射(Figma 节点 → 代码组件) | plan 文件的 Design Reference section |
| 状态/交互逻辑 | plan 文件的 Design Reference section |
| 资产文件 | attachments/ 目录 |
| 实现步骤和文件路径 | plan 文件的方案 section |
Follow these steps in order. Do not skip steps.
figma-context.md 获取完整设计数据Translate the Figma output into this project's framework, styles, and conventions.
Key principles:
Strive for pixel-perfect visual parity with the Figma design.
Guidelines:
Before marking complete, use the Read tool to open the screenshot referenced in figma-context.md (the ![[attachments/figma-screenshot.png]] embed). Compare your implemented code against this visual reference to verify each item below.
Validation checklist:
Never implement based on assumptions. Always read figma-context.md and the screenshot first.
Validate frequently during implementation, not just at the end. This catches issues early.
If you must deviate from the Figma design (e.g., for accessibility or technical constraints), document why in code comments.
Always check for existing components before creating new ones. Consistency across the codebase is more important than exact Figma replication.
When in doubt, prefer the project's design system patterns over literal Figma translation.
Actions:
figma-context.md for button design data (colors, padding, border radius, typography)primary-500, primary-hover)Result: Button component matching Figma design, integrated with project design system.
Actions:
figma-context.md for full layout structure (sections, spacing, components)attachments/ for logos, icons, chartsResult: Complete dashboard matching Figma design with responsive layout.
Cause: Visual discrepancies between the implemented code and the original Figma design.
Solution: Compare side-by-side with the screenshot. Check spacing, colors, and typography values in figma-context.md.
Cause: Assets were not properly downloaded during the plan phase.
Solution: Check attachments/ directory for the required assets. If missing, the plan phase needs to be re-run.
Cause: The project's design system tokens have different values than those specified in the Figma design. Solution: When project tokens differ from Figma values, prefer project tokens for consistency but adjust spacing/sizing to maintain visual fidelity.
The Figma implementation workflow establishes a reliable process for translating designs to code:
For designers: Confidence that implementations will match their designs with pixel-perfect accuracy. For developers: A structured approach that eliminates guesswork and reduces back-and-forth revisions. For teams: Consistent, high-quality implementations that maintain design system integrity.
By following this workflow, you ensure that every Figma design is implemented with the same level of care and attention to detail.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub sampeng87/skills --plugin common-skills