Extract and analyze Figma designs to create structured design specifications. Use this skill when you need to analyze Figma nodes, extract design properties (layout, spacing, typography), classify components using Atomic Design principles, and generate design specification documents that can be used for implementation.
/plugin marketplace add xtone/ai_development_tools/plugin install frontend-nextjs-development@xtone-ai-development-toolsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/atomic-design-classification.mdreferences/layout-analysis-guide.mdreferences/semantic-html-guide.mdreferences/spacing-extraction-guide.mdreferences/typography-extraction-guide.mdSystematically analyze Figma designs and extract structured design specifications. This skill focuses on understanding design intent, extracting accurate properties, and creating comprehensive design specification documents that serve as blueprints for implementation.
Use this skill when:
When given a Figma URL or node ID, use Figma MCP tools to extract design data:
Parse the Figma URL to extract node ID:
URL: https://figma.com/design/fileKey/fileName?node-id=1-2
Node ID: 1:2 (replace - with :)
Extract node design context:
mcp__figma-dev__get_design_context(
nodeId: "1:2",
dirForAssetWrites: "/absolute/path/to/project/public/assets",
clientLanguages: "typescript",
clientFrameworks: "react,nextjs"
)
This returns the design code, including HTML structure and CSS properties.
Get component metadata for structure overview:
mcp__figma-dev__get_metadata(
nodeId: "1:2",
clientLanguages: "typescript",
clientFrameworks: "react,nextjs"
)
Use this to understand the component hierarchy before detailed analysis.
Check for Figma variables (design tokens):
mcp__figma-dev__get_variable_defs(
nodeId: "1:2",
clientLanguages: "typescript",
clientFrameworks: "react,nextjs"
)
Extract design system tokens for colors, typography, spacing, etc.
Verify Code Connect mappings:
mcp__figma-dev__get_code_connect_map(
nodeId: "1:2",
clientLanguages: "typescript",
clientFrameworks: "react,nextjs"
)
Check if the component is already mapped to existing code.
Important: When the node is a component instance:
Identify if it's an instance:
Get the main component:
get_design_context on the main component nodeExtract instance-specific properties:
Handle variants:
Use Atomic Design principles to classify the component:
Read the classification guide:
Read references/atomic-design-classification.md
Apply the decision tree:
Determine the component category:
atomicCategory: Atom | Molecule | OrganismExtract accurate layout information:
Read layout analysis guide:
Read references/layout-analysis-guide.md
Determine layout method:
Extract spacing values:
Read references/spacing-extraction-guide.md
Map to Tailwind classes:
[value] for custom sizes (p-[18px])Document in specification:
## Layout
- Method: Flexbox
- Direction: row
- Justify: center
- Align: center
## Spacing
- Padding: px-6 py-3
- Gap: gap-2
- Border Radius: rounded-lg
Extract accurate text styling:
Read typography guide:
Read references/typography-extraction-guide.md
Extract font properties:
Map to Tailwind classes:
Document in specification:
## Typography
- Font: text-base font-semibold
- Color: text-white
- Line Height: leading-normal
- Alignment: text-center
Select appropriate HTML elements:
Read semantic HTML guide:
Read references/semantic-html-guide.md
Apply semantic rules:
<header>, <nav>, <main>, <aside>, <footer><h1> to <h6> (respect hierarchy)<button> for actions, <a> for navigation<article>, <section> for grouping<form>, <input>, <label>, <select>, <textarea><ul>, <ol>, <li> for lists<img>, <video>, <audio>, <figure>, <figcaption>Consider accessibility:
Document in specification:
## Semantic HTML
- Root Element: button
- ARIA: role="button" aria-label="Submit"
Extract color and visual styling:
Extract color properties:
Extract visual properties:
Check Figma variables:
Document in specification:
## Colors
- Background: bg-blue-500
- Hover: hover:bg-blue-600
- Text: text-white
- Border: border-transparent
## Visual Properties
- Border Radius: rounded-lg
- Shadow: shadow-md
When multiple Figma nodes represent different device sizes:
Extract all node IDs from provided URLs
Analyze each node:
Document responsive variations:
## Responsive Behavior
- Mobile (default): flex-col gap-4 text-sm
- Tablet (md): md:flex-row md:gap-6 md:text-base
- Desktop (lg): lg:gap-8 lg:text-lg
Create a comprehensive design specification:
Use Markdown format with front matter:
---
componentName: Button
atomicCategory: Atom
semanticElement: button
figmaNodeId: "123:456"
figmaUrl: "https://figma.com/design/..."
---
# Button Component Specification
## Overview
A primary action button component.
## Atomic Design Classification
- Category: Atom
- Reason: Single, indivisible interactive element
## Layout
- Method: Flexbox
- Direction: row
- Justify: center
- Align: center
## Spacing
- Padding: px-6 py-3
- Gap: gap-2
- Border Radius: rounded-lg
## Typography
- Font: text-base font-semibold
- Color: text-white
- Line Height: leading-normal
- Alignment: text-center
## Colors
- Background: bg-blue-500
- Hover: hover:bg-blue-600
- Active: active:bg-blue-700
- Disabled: disabled:bg-gray-300
## Visual Properties
- Border: border-transparent
- Shadow: shadow-md
- Transition: transition-colors duration-200
## Semantic HTML
- Root Element: button
- ARIA: aria-label when no text content
## Variants
- variant: primary | secondary | tertiary
- primary: bg-blue-500 text-white
- secondary: bg-white text-blue-500 border-blue-500
- tertiary: bg-transparent text-blue-500
- size: small | medium | large
- small: px-4 py-2 text-sm
- medium: px-6 py-3 text-base
- large: px-8 py-4 text-lg
## States
- Default: As specified above
- Hover: Darker background
- Active: Even darker background
- Disabled: Gray background, reduced opacity
- Focus: Ring outline for keyboard navigation
## Responsive Behavior
- Mobile: Full width, smaller padding
- Tablet: Inline, medium padding
- Desktop: Inline, larger padding
## Accessibility
- Keyboard: Focusable, Enter/Space to activate
- Screen Reader: Announced as "button"
- Color Contrast: WCAG AA compliant
## Assets
- Icons: /public/assets/icon-arrow.svg (if any)
- Images: None
## Notes
- Always use semantic <button> element
- Avoid using <a> styled as button
- Include loading state if used for async actions
Save the specification:
{ComponentName}.design.md/design-specs/ or project-specific locationWhen asked to compare an existing component with Figma:
## Design Differences Report
### Component: Button
#### Spacing
- Design: px-6 py-3 gap-2
- Implementation: px-4 py-2 gap-3
- Status: ❌ Mismatch
- Impact: Button appears smaller and less comfortable
#### Typography
- Design: text-base font-semibold
- Implementation: text-base font-semibold
- Status: ✅ Match
#### Colors
- Design: bg-blue-500 hover:bg-blue-600
- Implementation: bg-blue-600 hover:bg-blue-700
- Status: ❌ Mismatch
- Impact: Button is darker than intended
### Recommendations
1. Update padding to px-6 py-3
2. Update gap to gap-2
3. Update background colors to match design
When given a full page Figma node:
Get page metadata to understand structure
Identify major sections:
For each section:
Create component tree:
Page (Template)
├─ Header (Organism)
│ ├─ Logo (Atom)
│ ├─ Navigation (Molecule)
│ └─ UserMenu (Molecule)
├─ Hero (Organism)
│ ├─ Heading (Atom)
│ ├─ Paragraph (Atom)
│ └─ CTAButton (Atom)
├─ Features (Organism)
│ └─ FeatureCard (Molecule) × 3
│ ├─ Icon (Atom)
│ ├─ Title (Atom)
│ └─ Description (Atom)
└─ Footer (Organism)
├─ Logo (Atom)
└─ Links (Molecule)
Generate specifications from bottom-up:
Always read guides before starting:
Prioritize pixel-perfect accuracy:
Document thoroughly:
Consider implementation:
Maintain consistency:
This skill includes comprehensive guides:
Usage: Always read relevant guides before starting analysis to ensure accuracy.
Not handling component instances properly:
Ignoring variants:
Using wrong layout method:
Skipping semantic HTML:
<div> for everythingForgetting responsive behavior:
Not checking existing code:
The final output should be a Markdown document with:
This specification document will be used by the nextjs-react-implementation skill to generate actual code.
This skill systematically analyzes Figma designs and creates structured specifications for accurate implementation.