Figma Design Extraction
Purpose
Extract complete design specifications from Figma MCP once during planning to enable accurate implementation without re-fetching.
Core Principle
Extract everything once, implement accurately forever.
The goal is to capture ALL design information during /create-plan so that /execute-plan never needs to access Figma MCP again. Complete extraction prevents:
- Implementation guesswork
- Design inconsistencies
- Re-fetching during coding
- Context loss from incomplete specs
Pre-Extraction Validation
Check MCP Connection
Before extraction, verify:
- Figma MCP server is available and responding
- Authentication is valid
- Can access the specific file/frame
- User has read permissions
If validation fails:
- Inform user: "Figma MCP connection failed. Options: 1) Fix connection, 2) Provide design specs manually, 3) Continue without design"
- Do NOT proceed with incomplete extraction
- Do NOT assume or guess design values
Identify Extraction Scope
Ask user to clarify (if not obvious):
- Which Figma file? (URL or file key)
- Which frame(s)? (specific page/frame name)
- What device sizes? (mobile/tablet/desktop frames)
- Any specific components to focus on?
Why: Prevents extracting irrelevant designs or missing critical frames.
What to Extract
1. Design Tokens (Foundation)
Colors - Extract ALL colors used:
- Primary palette (with shades: 50, 100, 200...900)
- Secondary/accent colors
- Neutral/gray scale
- Semantic colors (success, warning, error, info)
- Text colors (heading, body, caption, disabled)
- Background colors
- Border colors
Document format:
Primary-500: #3b82f6 (Usage: buttons, links, primary actions)
Primary-600: #2563eb (Usage: button hover state)
Neutral-700: #374151 (Usage: body text)
Error-500: #ef4444 (Usage: error messages, destructive actions)
Typography - Extract ALL text styles:
- Font families (with fallbacks)
- All font sizes used
- Font weights
- Line heights
- Letter spacing (if significant)
Document format:
Heading-1: Inter, 32px, 700 (bold), 40px line-height
Body: Inter, 16px, 400 (regular), 24px line-height
Caption: Inter, 14px, 400 (regular), 20px line-height
Spacing System:
- Identify spacing scale (e.g., 4, 8, 16, 24, 32, 48, 64px)
- Note padding/margin patterns
- Document container widths
Other Tokens:
- Border radius values
- Shadow definitions (elevation system)
- Opacity values (if used systematically)
- Transition durations (if specified)
2. Component Specifications
For EACH interactive component:
States - Document all states:
- Default (resting state)
- Hover (mouse over)
- Active (pressed/clicked)
- Focus (keyboard navigation)
- Disabled (non-interactive)
- Loading (async operations)
- Error (validation failure)
- Success (validation pass)
Variants - Document all variants:
- Size variants (small, medium, large)
- Style variants (primary, secondary, outline, ghost, link)
- Intent variants (default, success, warning, error)
Dimensions:
- Width (fixed, min-width, max-width, or responsive)
- Height (fixed or min/max)
- Aspect ratios (for images/media)
Spacing:
- Padding (all sides or specific)
- Margins/gaps (between elements)
- Internal spacing (icon to text gap, etc.)
Visual Properties:
- Background colors (per state/variant)
- Text colors (per state/variant)
- Border (width, style, color, radius)
- Shadows (per state if different)
- Icons (names, sizes, colors)
Example documentation:
Button Component (figma-id: abc123)
States: default, hover, active, disabled, loading
Variants: primary, secondary, outline
Primary Variant - Default State:
- Dimensions: auto width (min 120px), 44px height
- Padding: 12px vertical, 24px horizontal
- Background: Primary-500 (#3b82f6)
- Text: White (#ffffff), Body-Bold (Inter 16px 600)
- Border: none
- Border radius: 8px
- Shadow: sm (0 1px 2px rgba(0,0,0,0.05))
- Icon: (if present) 20px, 8px gap to text
Primary Variant - Hover State:
- Background: Primary-600 (#2563eb)
- Shadow: md (0 4px 6px rgba(0,0,0,0.1))
- (Other props same as default)
Primary Variant - Disabled State:
- Background: Neutral-200 (#e5e7eb)
- Text: Neutral-400 (#9ca3af)
- Cursor: not-allowed
- (Other props same as default)
3. Layout Specifications
Page Structure:
- Overall layout (header, main, sidebar, footer)
- Container max-widths
- Sections and their purposes
- Navigation patterns
Grid Systems:
- Number of columns (e.g., 12-column grid)
- Gutters (spacing between columns)
- Container padding/margins
- Responsive behavior
Component Hierarchy:
- Parent-child relationships
- Nesting patterns
- Z-index layers (if critical)
4. Responsive Specifications
Extract designs for ALL breakpoints:
Mobile (320-640px):
- Layout changes (stack vs. row)
- Typography scaling
- Component size adjustments
- Hidden/shown elements
- Touch target sizes (44x44px minimum)
Tablet (641-1024px):
- Layout transitions
- Column changes (1 col → 2 col)
- Component adaptations
Desktop (1025px+):
- Full layout
- Hover states (not applicable on mobile)
- Maximum widths
- Multi-column layouts
Document differences explicitly:
Header Component:
- Mobile: Logo center, hamburger menu, height 64px
- Tablet: Logo left, visible nav items, height 72px
- Desktop: Logo left, full nav + search, height 80px
5. Assets
Icons:
- List all icons used (name, source)
- Sizes (multiple sizes if responsive)
- Colors (if not inheriting from text color)
- Stroke widths (if line icons)
Images:
- Source URLs or file references
- Dimensions and aspect ratios
- Alt text (if specified in Figma)
- Lazy loading considerations
Illustrations/Graphics:
- Export formats needed (SVG, PNG, etc.)
- Color variations (if theme-aware)
Extraction Quality Checklist
Before marking extraction complete, verify:
Common Extraction Mistakes
Incomplete state documentation - Only extracting default state, missing hover/active/disabled
→ Fix: Extract ALL states for every interactive element
Approximating values - Guessing "about 16px" instead of measuring exactly
→ Fix: Use Figma inspector for exact values
Missing responsive specs - Only extracting desktop design
→ Fix: Check for mobile/tablet frames and document differences
Vague color descriptions - "blue" instead of exact hex
→ Fix: Always use hex codes with usage notes
Ignoring component variants - Only documenting primary button, missing secondary/outline
→ Fix: Systematically extract all variants
Assuming spacing - Not documenting padding/margins
→ Fix: Measure and document all spacing explicitly
Forgetting disabled states - Functional states only
→ Fix: Disabled, loading, and error states are critical
No component hierarchy - Flat list without relationships
→ Fix: Show parent-child relationships and nesting
Documentation Format
Structure in planning doc:
## Design Specifications (Figma)
### Reference
- File: {Name}
- Frame: {Frame name/path}
- Link: {URL}
- Extracted: {ISO date}
### Design Tokens
[Complete token documentation]
### Component Breakdown
[Each component with all states/variants]
### Layout Specifications
[Page structure and grid system]
### Responsive Specifications
[Mobile/tablet/desktop differences]
### Assets
[Icons, images, illustrations]
Validation Before Implementation
When /execute-plan reads design specs:
Check completeness:
- Can implement without guessing any values?
- Are all states documented?
- Are responsive changes clear?
- Are color references unambiguous?
If incomplete:
- Do NOT guess or assume
- Flag missing specs to user
- Either: Re-extract from Figma or ask user for clarification
Key Takeaway
Completeness prevents re-work.
Spending extra time on thorough extraction during planning saves hours during implementation. Exact specifications eliminate guesswork, reduce design inconsistencies, and enable confident implementation without accessing Figma MCP again.
Extract once, extract completely, implement accurately.
1---2name: figma-design-extraction3description: Complete Figma design extraction for pixel-perfect implementation. Extracts design tokens, component specs, layouts, and responsive behavior systematically. Use when user provides Figma design: - Figma URL or file link provided - User mentions "Figma", "design file", "mockup", or "design system" - During /create-plan phase when design needs extraction - User says "extract from Figma" or references Figma link Extract systematically: - Design tokens: ALL colors (hex + usage), typography (sizes, weights, line heights), spacing scale, border radius, shadows, opacity values - Components: ALL states (default, hover, active, focus, disabled, loading, error), ALL variants (size/style/intent), exact dimensions, spacing, visual properties - Layouts: page structure, grid systems (columns, gutters), component hierarchy - Responsive: mobile/tablet/desktop differences explicitly documented - Assets: icons (names, sizes), images (dimensions, alt text), illustrations Goal: Extract ONCE completely during planning phase. Imple4---5
6# Figma Design Extraction
7
8## Purpose
9Extract complete design specifications from Figma MCP once during planning to enable accurate implementation without re-fetching.
10
11---
12
13## Core Principle
14
15**Extract everything once, implement accurately forever.**
16
17The goal is to capture ALL design information during `/create-plan` so that `/execute-plan` never needs to access Figma MCP again. Complete extraction prevents:
18- Implementation guesswork
19- Design inconsistencies
20- Re-fetching during coding
21- Context loss from incomplete specs
22
23---
24
25## Pre-Extraction Validation
26
27### Check MCP Connection
28
29**Before extraction, verify**:
301. Figma MCP server is available and responding
312. Authentication is valid
323. Can access the specific file/frame
334. User has read permissions
34
35**If validation fails**:
36- Inform user: "Figma MCP connection failed. Options: 1) Fix connection, 2) Provide design specs manually, 3) Continue without design"
37- Do NOT proceed with incomplete extraction
38- Do NOT assume or guess design values
39
40### Identify Extraction Scope
41
42**Ask user to clarify** (if not obvious):
43- Which Figma file? (URL or file key)
44- Which frame(s)? (specific page/frame name)
45- What device sizes? (mobile/tablet/desktop frames)
46- Any specific components to focus on?
47
48**Why**: Prevents extracting irrelevant designs or missing critical frames.
49
50---
51
52## What to Extract
53
54### 1. Design Tokens (Foundation)
55
56**Colors** - Extract ALL colors used:
57- Primary palette (with shades: 50, 100, 200...900)
58- Secondary/accent colors
59- Neutral/gray scale
60- Semantic colors (success, warning, error, info)
61- Text colors (heading, body, caption, disabled)
62- Background colors
63- Border colors
64
65**Document format**:
66```
67Primary-500: #3b82f6 (Usage: buttons, links, primary actions)
68Primary-600: #2563eb (Usage: button hover state)
69Neutral-700: #374151 (Usage: body text)
70Error-500: #ef4444 (Usage: error messages, destructive actions)
71```
72
73**Typography** - Extract ALL text styles:
74- Font families (with fallbacks)
75- All font sizes used
76- Font weights
77- Line heights
78- Letter spacing (if significant)
79
80**Document format**:
81```
82Heading-1: Inter, 32px, 700 (bold), 40px line-height
83Body: Inter, 16px, 400 (regular), 24px line-height
84Caption: Inter, 14px, 400 (regular), 20px line-height
85```
86
87**Spacing System**:
88- Identify spacing scale (e.g., 4, 8, 16, 24, 32, 48, 64px)
89- Note padding/margin patterns
90- Document container widths
91
92**Other Tokens**:
93- Border radius values
94- Shadow definitions (elevation system)
95- Opacity values (if used systematically)
96- Transition durations (if specified)
97
98---
99
100### 2. Component Specifications
101
102**For EACH interactive component**:
103
104**States** - Document all states:
105- Default (resting state)
106- Hover (mouse over)
107- Active (pressed/clicked)
108- Focus (keyboard navigation)
109- Disabled (non-interactive)
110- Loading (async operations)
111- Error (validation failure)
112- Success (validation pass)
113
114**Variants** - Document all variants:
115- Size variants (small, medium, large)
116- Style variants (primary, secondary, outline, ghost, link)
117- Intent variants (default, success, warning, error)
118
119**Dimensions**:
120- Width (fixed, min-width, max-width, or responsive)
121- Height (fixed or min/max)
122- Aspect ratios (for images/media)
123
124**Spacing**:
125- Padding (all sides or specific)
126- Margins/gaps (between elements)
127- Internal spacing (icon to text gap, etc.)
128
129**Visual Properties**:
130- Background colors (per state/variant)
131- Text colors (per state/variant)
132- Border (width, style, color, radius)
133- Shadows (per state if different)
134- Icons (names, sizes, colors)
135
136**Example documentation**:
137```
138Button Component (figma-id: abc123)
139
140States: default, hover, active, disabled, loading
141Variants: primary, secondary, outline
142
143Primary Variant - Default State:
144- Dimensions: auto width (min 120px), 44px height
145- Padding: 12px vertical, 24px horizontal
146- Background: Primary-500 (#3b82f6)
147- Text: White (#ffffff), Body-Bold (Inter 16px 600)
148- Border: none
149- Border radius: 8px
150- Shadow: sm (0 1px 2px rgba(0,0,0,0.05))
151- Icon: (if present) 20px, 8px gap to text
152
153Primary Variant - Hover State:
154- Background: Primary-600 (#2563eb)
155- Shadow: md (0 4px 6px rgba(0,0,0,0.1))
156- (Other props same as default)
157
158Primary Variant - Disabled State:
159- Background: Neutral-200 (#e5e7eb)
160- Text: Neutral-400 (#9ca3af)
161- Cursor: not-allowed
162- (Other props same as default)
163```
164
165---
166
167### 3. Layout Specifications
168
169**Page Structure**:
170- Overall layout (header, main, sidebar, footer)
171- Container max-widths
172- Sections and their purposes
173- Navigation patterns
174
175**Grid Systems**:
176- Number of columns (e.g., 12-column grid)
177- Gutters (spacing between columns)
178- Container padding/margins
179- Responsive behavior
180
181**Component Hierarchy**:
182- Parent-child relationships
183- Nesting patterns
184- Z-index layers (if critical)
185
186---
187
188### 4. Responsive Specifications
189
190**Extract designs for ALL breakpoints**:
191
192**Mobile (320-640px)**:
193- Layout changes (stack vs. row)
194- Typography scaling
195- Component size adjustments
196- Hidden/shown elements
197- Touch target sizes (44x44px minimum)
198
199**Tablet (641-1024px)**:
200- Layout transitions
201- Column changes (1 col → 2 col)
202- Component adaptations
203
204**Desktop (1025px+)**:
205- Full layout
206- Hover states (not applicable on mobile)
207- Maximum widths
208- Multi-column layouts
209
210**Document differences explicitly**:
211```
212Header Component:
213- Mobile: Logo center, hamburger menu, height 64px
214- Tablet: Logo left, visible nav items, height 72px
215- Desktop: Logo left, full nav + search, height 80px
216```
217
218---
219
220### 5. Assets
221
222**Icons**:
223- List all icons used (name, source)
224- Sizes (multiple sizes if responsive)
225- Colors (if not inheriting from text color)
226- Stroke widths (if line icons)
227
228**Images**:
229- Source URLs or file references
230- Dimensions and aspect ratios
231- Alt text (if specified in Figma)
232- Lazy loading considerations
233
234**Illustrations/Graphics**:
235- Export formats needed (SVG, PNG, etc.)
236- Color variations (if theme-aware)
237
238---
239
240## Extraction Quality Checklist
241
242Before marking extraction complete, verify:
243
244- [ ] All colors documented with hex codes and usage notes
245- [ ] All typography styles captured with complete specs
246- [ ] Spacing scale identified and documented
247- [ ] ALL component states documented (not just default)
248- [ ] ALL component variants documented
249- [ ] Responsive specifications for mobile/tablet/desktop
250- [ ] Dimensions include min/max where applicable
251- [ ] Interactive states (hover, active, focus) specified
252- [ ] Error states and loading states captured
253- [ ] Icons and assets listed with sources
254- [ ] Shadows and border radius values documented
255- [ ] No "approximate" or "similar to" values - exact only
256
257---
258
259## Common Extraction Mistakes
260
2611. **Incomplete state documentation** - Only extracting default state, missing hover/active/disabled
262 → Fix: Extract ALL states for every interactive element
263
2642. **Approximating values** - Guessing "about 16px" instead of measuring exactly
265 → Fix: Use Figma inspector for exact values
266
2673. **Missing responsive specs** - Only extracting desktop design
268 → Fix: Check for mobile/tablet frames and document differences
269
2704. **Vague color descriptions** - "blue" instead of exact hex
271 → Fix: Always use hex codes with usage notes
272
2735. **Ignoring component variants** - Only documenting primary button, missing secondary/outline
274 → Fix: Systematically extract all variants
275
2766. **Assuming spacing** - Not documenting padding/margins
277 → Fix: Measure and document all spacing explicitly
278
2797. **Forgetting disabled states** - Functional states only
280 → Fix: Disabled, loading, and error states are critical
281
2828. **No component hierarchy** - Flat list without relationships
283 → Fix: Show parent-child relationships and nesting
284
285---
286
287## Documentation Format
288
289**Structure in planning doc**:
290
291```markdown
292## Design Specifications (Figma)
293
294### Reference
295- File: {Name}
296- Frame: {Frame name/path}
297- Link: {URL}
298- Extracted: {ISO date}
299
300### Design Tokens
301[Complete token documentation]
302
303### Component Breakdown
304[Each component with all states/variants]
305
306### Layout Specifications
307[Page structure and grid system]
308
309### Responsive Specifications
310[Mobile/tablet/desktop differences]
311
312### Assets
313[Icons, images, illustrations]
314```
315
316---
317
318## Validation Before Implementation
319
320When `/execute-plan` reads design specs:
321
322**Check completeness**:
323- Can implement without guessing any values?
324- Are all states documented?
325- Are responsive changes clear?
326- Are color references unambiguous?
327
328**If incomplete**:
329- Do NOT guess or assume
330- Flag missing specs to user
331- Either: Re-extract from Figma or ask user for clarification
332
333---
334
335## Key Takeaway
336
337**Completeness prevents re-work.**
338
339Spending extra time on thorough extraction during planning saves hours during implementation. Exact specifications eliminate guesswork, reduce design inconsistencies, and enable confident implementation without accessing Figma MCP again.
340
341Extract once, extract completely, implement accurately.