Awesome-omni-skill figma-design
Access Figma designs, extract design systems, and retrieve component specifications. Use when implementing UI from Figma mockups, extracting design tokens, or analyzing design files.
git clone https://github.com/diegosouzapw/awesome-omni-skill
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/design/figma-design" ~/.claude/skills/diegosouzapw-awesome-omni-skill-figma-design && rm -rf "$T"
skills/design/figma-design/SKILL.mdFigma Design
Access Figma designs, design systems, and components for frontend implementation. Extract design tokens, component specifications, and visual assets to ensure pixel-perfect implementation.
Quick Start
- Identify design source - Get Figma file URL, frame names, or component IDs from designer
- Extract design tokens - Use
orget_design_system
for colors, typography, spacingexport_tokens - Get component details - Use
,get_node_info
for structure, variants, statesget_component - Download assets - Use
ordownload_design_assets
for images, iconsexport_node_as_image - Implement with fidelity - Apply
to extracted tokens, maintain visual qualityfrontend-philosophy
Workflow
0) If any MCP call fails because Figma MCP is not connected, pause and set it up:
- Add the Figma MCP:
codex mcp add figma --url https://mcp.figma.com/mcp
- Enable remote MCP client:
- Set
in[features].rmcp_client = true
or runconfig.tomlcodex --enable rmcp_client
- Set
- Log in with OAuth (or configure API token):
codex mcp login figma- OR set
environment variableFIGMA_ACCESS_TOKEN
After successful login, the user will have to restart codex. You should finish your answer and tell them so when they try again they can continue with Step 1.
1) Understand the Design Context
Before extracting any data, clarify:
- What Figma file or frame contains the design?
- Is there a design system or shared library?
- What component(s) need implementation?
- Are there specific variants or states (hover, active, disabled)?
- What framework is being used (React, Vue, HTML/CSS)?
Tools to use:
- Get file structure overviewget_document_info
- List all nodes in fileget_file_nodes
- Export file structure as ASCII treeget_tree
2) Extract Design System Tokens
Design tokens are the foundation of consistent UI implementation.
Colors:
- List all color stylesget_styles
- Export as CSS variablesexport_tokens({ format: "css" })
- Export as Tailwind configexport_tokens({ format: "tailwind" })
- Export as JSONexport_tokens({ format: "json" })
Typography:
- List all text stylesget_styles- Extract font families, sizes, weights, line heights
- Map to
distinctive fonts (avoid Inter, Roboto)frontend-philosophy
Spacing & Layout:
withget_node_info
projection - Get padding, gaps, auto-layout@layout- Extract spacing scale (4px, 8px, 16px, 24px, etc.)
- Identify layout patterns (flexbox, grid)
Effects:
- List effect styles (shadows, blurs)get_styles
- Extract exact CSS for shadows, borders, opacityget_css
3) Get Component Specifications
For each component to implement:
Structure:
- Get hierarchy and dimensionsget_node_info({ node_id, select: ["@structure", "@bounds"] })
- Get component details and variantsget_component
- Audit all project componentslist_local_components
- Access team library componentslist_remote_components
Styling:
- Extract CSS properties (fills, strokes, effects, corner radius)get_css({ node_id })
- Get detailed styling dataget_node_info({ node_id, select: ["@css"] })- Note: Apply
- enhance generic styles with intentional color and atmospherefrontend-philosophy
Variants & States:
returns all variants (Primary/Secondary, Small/Medium/Large)get_component
for each variant to understand differencesget_node_info- Map to component props (e.g.,
,variant="primary"
)size="large"
Accessibility:
- Check for accessibility labels in Figma annotations
- Extract semantic roles (button, link, heading)
- Verify color contrast meets WCAG standards
4) Download Visual Assets
Images & Icons:
- Export icons as SVGexport_node_as_image({ node_id, format: "svg" })
- Export images at 2xexport_node_as_image({ node_id, format: "png", scale: 2 })
- Batch download all assetsdownload_design_assets({ figma_url, local_path })
Reference Images:
includesdownload_design_assets
for visual contextreference.png- Use reference image with
tool for visual comparison during implementationzai-vision_*
5) Implement with Design Fidelity
Apply extracted tokens while maintaining
frontend-philosophy:
Typography:
- If Figma uses generic fonts (Inter, Roboto), suggest distinctive alternatives
- Maintain hierarchy and scale from design tokens
- Apply proper font weights and line heights
Color:
- Extract color palette from Figma
- If palette is generic gray/blue, propose bold intentional alternatives
- Maintain contrast ratios for accessibility
Spacing:
- Use exact padding, margins, gaps from auto-layout properties
- Apply brave spatial composition (generous negative space OR controlled density)
Effects:
- Extract shadows, blurs, gradients from Figma
- Layer visual richness (gradient meshes, noise textures) per
frontend-philosophy
Motion:
- Figma prototypes may specify transitions
- Add purposeful motion that enhances UX (not decorative)
6) Verify Implementation
Visual Comparison:
- Export Figma frame as PNG:
export_node_as_image - Screenshot implemented component
- Use
to compare for pixel-perfect accuracyzai-vision_*
Responsive Behavior:
- Check Figma constraints (fixed, stretch, scale)
- Implement responsive breakpoints
- Test on multiple viewport sizes
Accessibility:
- Verify color contrast with Figma accessibility plugin data
- Add ARIA labels and semantic HTML
- Test keyboard navigation
Available Tools
Document Navigation
- Get file overview and structureget_document_info
- List all nodes in fileget_file_nodes
- Export file structure as ASCII tree with node IDsget_tree
- Get currently selected elements in Figmaget_selection
- Switch to specific pageset_current_page
Design System Extraction
- List all styles (color, text, effect, grid)get_styles
- Export design tokens to CSS/JSON/Tailwindexport_tokens
- Extract CSS properties from nodesget_css
- Audit project componentsget_local_components
- Access team library componentsget_remote_components
Component Analysis
- Inspect specific node properties (use projections:get_node_info
,@structure
,@css
,@layout
,@typography
)@tokens
- Batch inspect multiple nodesget_nodes_info
- Get component details and variantsget_component
- Use components in designscreate_component_instance
Asset Export
- Export as PNG/SVG/JPGexport_node_as_image
- Batch download assets with reference imagedownload_design_assets
- Find all text layers for content auditscan_text_nodes
Query API (Advanced)
- Use Figma Query DSL for token-efficient searchesquery- Projections:
,@structure
,@bounds
,@css
,@layout
,@typography
,@tokens
,@images@all - Filters:
,$match
,$eq
,$in
,$gt$lt - Example:
{ "from": ["COMPONENT"], "where": { "name": { "$match": "Button*" } }, "select": ["@structure", "@css"] }
- Projections:
Practical Workflows
Design Handoff
Goal: Extract complete design specifications for implementation
- Understand file structureget_document_info
- Get node IDs for target framesget_tree
- Export design systemexport_tokens({ format: "tailwind" })
- Get component detailsget_node_info({ node_id, select: ["@all"] })
- Download assets + reference.pngdownload_design_assets- Implement component using extracted data
Design System Audit
Goal: Inventory design tokens and components for consistency
- List all color, text, effect stylesget_styles
- Get all components with usage countlist_local_components
- Export tokens for analysisexport_tokens({ format: "json" })- Identify inconsistencies (duplicate colors, similar components)
- Recommend consolidation or cleanup
Component Library Migration
Goal: Convert Figma components to code components
- Get component inventorylist_local_components- For each component:
- Get variants and propertiesget_component
- Extract stylingget_css
- Get layout propertiesget_node_info({ select: ["@layout"] })
- Generate component code (React, Vue, etc.)
- Create Storybook stories or documentation
Visual QA & Pixel Perfection
Goal: Ensure implementation matches design exactly
- Export designexport_node_as_image({ node_id, format: "png", scale: 2 })- Screenshot implemented component
- Use
for visual comparisonzai-vision_* - Identify discrepancies (spacing, colors, shadows)
- Fix implementation and re-verify
Design Token Synchronization
Goal: Keep code tokens in sync with Figma
- Export current tokensexport_tokens({ format: "css" })- Compare with existing CSS variables or Tailwind config
- Identify changes (new colors, updated spacing)
- Update code design system
- Document changes and notify team
Tips for Maximum Productivity
- Use projections for efficient queries -
fetches only needed dataselect: ["@structure", "@css"] - Batch node inspections - Use
for multiple nodes instead of individual callsget_nodes_info - Export tokens early - Get design system tokens before diving into components
- Download reference images - Visual context helps with implementation decisions
- Map Figma variants to props - Component variants become component props (e.g.,
,variant
,size
)state - Use Query DSL for large files - More token-efficient than fetching entire files
- Cache component IDs - Reuse node IDs across multiple queries
- Verify with visual comparison - Always compare exported design vs. implementation
Troubleshooting
- Authentication Errors: Re-run OAuth (
); verify workspace access; check API token permissionscodex mcp login figma - File Not Found: Verify Figma URL is correct and accessible; check file hasn't been moved or deleted
- Node Not Found: Use
to find correct node IDs; verify node hasn't been deletedget_tree - Export Failures: Check node type supports export (frames, components); verify export settings; try different format (PNG vs SVG)
- Missing Fonts: Pre-load custom fonts with
before setting font namesload_font_async - Component Import Timeout: Use
for local components; increase timeout for remote library componentsgetNodeByIdAsync - Token Export Issues: Verify design uses variables/styles (not raw values); check file has defined color/text styles
- Rate Limits: Batch operations; use Query DSL for efficient data fetching; implement exponential backoff
Integration with Frontend Workflow
When working with the
frontend agent:
- Load this skill first:
before implementationskill("figma-design") - Extract design tokens as foundation for styling
- Get component specs for structure and variants
- Apply frontend-philosophy to elevate generic Figma designs:
- Replace generic fonts with distinctive alternatives
- Enhance color palettes with bold, intentional choices
- Add atmosphere and depth (gradients, shadows, textures)
- Implement purposeful motion
- Verify visual fidelity with exported reference images
See
reference/design-handoff-workflow.md for detailed step-by-step process.
References and Examples
- How to export and apply design tokensreference/design-token-extraction.md
- Step-by-step component conversionreference/component-implementation-guide.md
- Query DSL syntax and examplesreference/figma-query-dsl.md
- Complete button component workflowexamples/button-component-extraction.md
- Migrating Figma design system to codeexamples/design-system-migration.md