/figma:figma-generate-componentfrom figma
Converts Figma frames and components into production-ready code (React, Vue, HTML/CSS) using the Figma Desktop MCP server. Bridges design-to-code workflow with Code Connect mappings and design tokens.
Ships in figma. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
figma:figma-generate-component - Generate production-ready code from Figma designs
Convert Figma frames and components into production code (React, Vue, HTML/CSS) using the Figma Desktop MCP server with support for Code Connect mappings and design tokens.
You are tasked with generating production-ready code from a Figma design using the Figma MCP server. This command bridges the design-to-code workflow by analyzing Figma frames and converting them into semantic, accessible, framework-specific components.
Uses the Figma Desktop MCP server (HTTP transport at http://127.0.0.1:3845/mcp) to access selected frames or node IDs from Figma URLs. Leverages Code Connect mappings when available to prefer design system components over generating code from scratch.
The user can provide Figma context in two ways:
Understand the Context:
Analyze the Design:
Generate Code:
Provide Context:
When generating a React component, structure it like:
// ComponentName.tsx
import React from 'react';
import { DesignSystemButton } from '@/components/Button'; // Using Code Connect mapping
interface ComponentNameProps {
// Props based on Figma variants
}
/**
* ComponentName - Brief description
*
* Figma: [Link to Figma frame]
* Design tokens used: --color-primary, --spacing-md, --font-heading
*/
export const ComponentName: React.FC<ComponentNameProps> = ({ ...props }) => {
return (
// JSX matching Figma layout
);
};
Before finishing:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
figma-to-code, design-to-code, component-generation, figma-mcp
npx claudepluginhub thebushidocollective/han --plugin figma4 skills in this plugin
/figma-analyze-frameAnalyze a Figma frame's structure, properties, and implementation considerations/figma-extract-tokensExtract design tokens and variables from a Figma file to create or update a design system/figma-sync-design-systemSync design system components between Figma and code using Code Connect mappingsOther plugins' skills for the same job