← スキル一覧に戻る

figma-to-code
by yairbederman
⭐ 0🍴 0📅 2026年1月19日
SKILL.md
name: figma-to-code description: Translate Figma designs into production-ready code with pixel-perfect accuracy. Use when implementing UI from Figma mockups.
Figma to Code
Structured workflow for translating Figma designs into production-ready code with pixel-perfect accuracy.
When to Use
- Implementing new UI from Figma designs
- Converting design mockups to React/Next.js components
- Extracting design tokens from Figma
- Design handoff automation
Prerequisites
- Access to Figma file via MCP or design tokens export
- Target component library defined (React, Vue, etc.)
- Design system tokens available
Workflow
Phase 1: Design Analysis
-
Identify Components
- List all unique UI elements
- Map to existing component library
- Identify new components needed
-
Extract Design Tokens
{ "colors": { "primary": "#3B82F6", "secondary": "#10B981" }, "typography": { "heading": { "font": "Inter", "size": "24px", "weight": 600 }, "body": { "font": "Inter", "size": "16px", "weight": 400 } }, "spacing": { "xs": "4px", "sm": "8px", "md": "16px", "lg": "24px" } } -
Document Measurements
- Widths, heights, padding, margins
- Border radii, shadows
- Responsive breakpoints
Phase 2: Component Mapping
| Figma Layer | Component | Props |
|---|---|---|
| Button/Primary | <Button variant="primary"> | size, disabled |
| Input/Text | <Input type="text"> | placeholder, error |
| Card/Default | <Card> | elevation, clickable |
Phase 3: Implementation
-
Create Component Structure
// Component from Figma interface Props { // Props derived from Figma variants } export const Component = ({ ...props }: Props) => { return ( <div className={styles.container}> {/* Match Figma layer hierarchy */} </div> ) } -
Apply Styles
- Use design tokens, not magic numbers
- Match Figma spacing exactly
- Implement responsive variants
-
Handle States
- Default, hover, active, disabled
- Loading states
- Error states
Phase 4: Verification
-
Visual Comparison
- Overlay implementation on Figma design
- Check pixel alignment
- Verify colors match tokens
-
Responsive Check
- Test all breakpoints
- Verify mobile layout
-
Interaction Check
- All states work correctly
- Animations match spec
Best Practices
DO
- ✅ Use design tokens from Figma
- ✅ Match component hierarchy to Figma layers
- ✅ Implement all states shown in design
- ✅ Test at exact Figma frame sizes
- ✅ Document deviations from design
DON'T
- ❌ Eyeball measurements
- ❌ Use magic numbers for spacing
- ❌ Ignore design variants
- ❌ Skip responsive testing
- ❌ Forget hover/active states
Output Checklist
Before marking implementation complete:
- All design tokens extracted
- Components match Figma hierarchy
- Spacing matches design exactly
- Colors use token values
- Typography matches font specs
- All states implemented
- Responsive breakpoints work
- Visual diff shows < 1% deviation
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です