figma-generate-design

figma/mcp-server-guide · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/figma/mcp-server-guide --skill figma-generate-design
0 commentsdiscussion
summary

Use this skill to create or update full-page screens in Figma by reusing the published design system — components, variables, and styles — rather than drawing primitives with hardcoded values. The key insight: the Figma file likely has a published design system with components, color/spacing variables, and text/effect styles that correspond to the codebase's UI components and tokens. Find and use those instead of drawing boxes with hex colors.

skill.md

Build / Update Screens from Design System

Use this skill to create or update full-page screens in Figma by reusing the published design system — components, variables, and styles — rather than drawing primitives with hardcoded values. The key insight: the Figma file likely has a published design system with components, color/spacing variables, and text/effect styles that correspond to the codebase's UI components and tokens. Find and use those instead of drawing boxes with hex colors.

MANDATORY: You MUST also load figma-use before any use_figma call. That skill contains critical rules (color ranges, font loading, etc.) that apply to every script you write.

Always pass skillNames: "figma-generate-design" when calling use_figma as part of this skill. This is a logging parameter — it does not affect execution.

Skill Boundaries

  • Use this skill when the deliverable is a Figma screen (new or updated) composed of design system component instances.
  • If the user wants to generate code from a Figma design, switch to figma-implement-design.
  • If the user wants to create new reusable components or variants, use figma-use directly.
  • If the user wants to write Code Connect mappings, switch to figma-code-connect-components.

Prerequisites

  • Figma MCP server must be connected
  • The target Figma file must have a published design system with components (or access to a team library)
  • User should provide either:
    • A Figma file URL / file key to work in
    • Or context about which file to target (the agent can discover pages)
  • Source code or description of the screen to build/update

Parallel Workflow with generate_figma_design (Web Apps Only)

When building a screen from a web app that can be rendered in a browser, the best results come from running both approaches in parallel:

  1. In parallel:
    • Start building the screen using this skill's workflow (use_figma + design system components)
    • Run generate_figma_design to capture a pixel-perfect screenshot of the running web app
  2. Once both complete: Update the use_figma output to match the pixel-perfect layout from the generate_figma_design capture. The capture provides the exact spacing, sizing, and visual treatment to aim for, while your use_figma output has proper component instances linked to the design system.
  3. Once confirmed looking good: Delete the generate_figma_design output — it was only used as a visual reference.

This combines the best of both: generate_figma_design gives pixel-perfect layout accuracy, while use_figma gives proper design system component instances that stay linked and updatable.

This workflow only applies to web apps where generate_figma_design can capture the running page. For non-web apps (iOS, Android, etc.) or when updating existing screens, use the standard workflow below.

Required Workflow

Follow these steps in order. Do not skip steps.

Step 1: Understand the Screen

Before touching Figma, understand what you're building:

  1. If building from code, read the relevant source files to understand the page structure, sections, and which components are used.
  2. Identify the major sections of the screen (e.g., Header, Hero, Content Panels, Pricing Grid, FAQ Accordion, Footer).
  3. For each section, list the UI components involved (buttons, inputs, cards, navigation pills, accordions, etc.).

Step 2: Discover Design System — Components, Variables, and Styles

You need three things from the design system: components (buttons, cards, etc.), variables (colors, spacing, radii), and styles (text styles, effect styles like shadows). Don't hardcode hex colors or pixel values when design system tokens exist.

2a: Discover components

Preferred: inspect existing screens first. If the target file already contains screens using the same design system, skip search_design_system and inspect existing instances directly. A single use_figma call that walks an existing frame's instances gives you an exact, authoritative component map:

const frame = figma.currentPage.findOne(n => n.name === "Existing Screen");
const uniqueSets = new Map();
frame.findAll(n => n.type === "INSTANCE").forEach(inst => {
  const mc = inst.mainComponent;
  const cs = mc?.parent?.type === "COMPONENT_SET" ? mc.parent : null;
  const key = cs ? cs.key : mc?.key;
  const name = cs ? cs.name : mc?.name;
  if (key && !uniqueSets.has(key)) {
    uniqueSets.set(key, { name, key, isSet: !!cs, sampleVariant: mc.name });
  }
});
return [...uniqueSets.values()];

Only fall back to search_design_system when the file has no existing screens to reference. When using it, search broadly — try multiple terms and synonyms (e.g., "button", "input", "nav", "card", "accordion", "header", "footer", "tag", "avatar", "toggle", "icon", etc.). Use includeComponents: true to focus on components.

Include component properties in your map — you need to know which TEXT properties each component exposes for text overrides. Create a temporary instance, read its componentProperties (and those of nested instances), then remove the temp instance.

Example component map with property info:

Component Map:
- Button → key: "abc123", type: COMPONENT_SET
  Properties: { "Label#2:0": TEXT, "Has Icon#4:64": BOOLEAN }
- PricingCard → key: "ghi789", type: COMPONENT_SET
  Properties: { "Device": VARIANT, "Variant": VARIANT }
  Nested "Text Heading" has: { "Text#2104:5": TEXT }
  Nested "Button" has: { "Label#2:0": TEXT }

2b: Discover variables (colors, spacing, radii)

Inspect existing screens first (same as components). Or use search_design_system with includeVariables: true.

WARNING: Two different variable discovery methods — do not confuse them.

  • use_figma with figma.variables.getLocalVariableCollectionsAsync() — returns only local variables defined in the current file. If this returns empty, it does not mean no variables exist. Remote/published library variables are invisible to this API.
  • search_design_system with includeVariables: true — searches across all linked libraries, including remote and published ones. This is the correct tool for discovering design system variables.

Never conclude "no variables exist" based solely on getLocalVariableCollectionsAsync() returning empty. Always also run search_design_system with includeVariables: true to check for library variables before deciding to create your own.

Query strategy: search_design_system matches against variable names (e.g., "Gray/gray-9", "core/gray/100", "space/400"), not categories. Run multiple short, simple queries in parallel rather than one compound query:

  • Primitive colors: "gray", "red", "blue", "green", "white", "brand"
  • Semantic colors: "background", "foreground", "border", "surface", "text"
  • Spacing/sizing: "space", "radius", "gap", "padding"

If initial searches return empty, try shorter fragments or different naming conventions — libraries vary widely ("grey" vs "gray", "spacing" vs "space", "color/bg" vs "background").

Inspect an existing screen's bound variables for the most authoritative results:

const frame = figma.currentPage.findOne(n => n.name === "Existing Screen");
const varMap = new Map();
frame.findAll(() => true).forEach(node => {
  const bv = node.boundVariables;
  if (!bv) return;
  for (const [prop, binding] of Object.entries(bv)) {
    const bindings = Array.isArray(binding) ? binding : [binding];
    for (const b of bindings) {
      if (b?.id && !varMap.has(b.id)) {
        const v = await figma.variables.getVariableByIdAsync(b.id);
        if (v) varMap.set(b.id, { name: v.name, id: v.id, key: v.key, type: v.resolvedType, remote: v.remote });
      }
    }
  }
});
return [...varMap.values()];

For library variables (remote = true), import them by key with figma.variables.importVariableByKeyAsync(key). For local variables, use figma.variables.getVariableByIdAsync(id) directly.

See variable-patterns.md for binding patterns.

2c: Discover styles (text styles, effect styles)

Search for styles using search_design_system with includeStyles: true and terms like "heading", "body", "shadow", "elevation". Or inspect what an existing screen uses:

const frame = figma.currentPage.findOne(n => n.name === "Existing Screen");
const styles = { text: new Map(), effect: new Map() 
how to use figma-generate-design

How to use figma-generate-design on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add figma-generate-design
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/figma/mcp-server-guide --skill figma-generate-design

The skills CLI fetches figma-generate-design from GitHub repository figma/mcp-server-guide and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/figma-generate-design

Reload or restart Cursor to activate figma-generate-design. Access the skill through slash commands (e.g., /figma-generate-design) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.726 reviews
  • Aanya Nasser· Dec 20, 2024

    I recommend figma-generate-design for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Shikha Mishra· Dec 12, 2024

    Useful defaults in figma-generate-design — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Yuki Sethi· Nov 11, 2024

    Keeps context tight: figma-generate-design is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Rahul Santra· Nov 3, 2024

    figma-generate-design is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Pratham Ware· Oct 22, 2024

    Keeps context tight: figma-generate-design is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Yuki Haddad· Oct 2, 2024

    figma-generate-design is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Sakura Huang· Sep 25, 2024

    I recommend figma-generate-design for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Oshnikdeep· Sep 13, 2024

    We added figma-generate-design from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Mia Ramirez· Aug 16, 2024

    Useful defaults in figma-generate-design — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Ganesh Mohane· Aug 4, 2024

    figma-generate-design fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

showing 1-10 of 26

1 / 3