Convert Claude Code prototypes into structured Figma design files with component mapping, state flows, and interaction annotations
triggers
["convert this prototype to figma","explode this into figma frames for review","create figma specs from my prototype","put this prototype in figma so the team can review it","make this reviewable by designers in figma","generate figma frames from this working prototype","turn this into a figma file with annotations","export this prototype to figma with design system components"]
Converts working Claude Code prototypes into structured Figma design files by exploding interaction flows into state-by-state frames, mapping components to your Figma design system, and annotating triggers, transitions, and edge cases natively in Figma.
What This Skill Does
When a user builds a prototype in Claude Code, this skill:
Analyzes the prototype source — inventories components, maps interaction flows, identifies all UI states
Maps to design system — searches linked Figma libraries for matching DS components; flags unmatched elements with "No DS match" badges
Creates one frame per interaction state — every meaningful step in a user flow becomes a separate Figma frame
Annotates interactions — adds native Figma Dev Mode annotations with filterable categories (Interaction, Navigation, Validation, Error Handling, etc.)
Adds flow arrows — visual connectors showing user path through states
Creates overview frame — table of contents with legend and open questions for reviewers
Optionally links Code Connect — maps Figma components back to codebase
Key Capabilities
Design system aware — uses real components from target file's linked libraries
Before using this skill, verify Figma MCP is installed:
# Check Claude Desktop configcat ~/Library/Application\ Support/Claude/claude_desktop_config.json | grep figma
# Or for Claude Codecat ~/.claude/mcp_config.json | grep figma
Expected output should include @figma/mcp-server or similar.
// Get user infoconst user = awaitwhoami();
// Create new fileconst newFile = awaitcreate_new_file({
name: `${prototypeName} — Prototype Review`,
team_id: user.team_id// or user.default_team_id
});
awaituse_figma({ url: newFile.url });
2. Analyze Prototype Source
Read the prototype files and extract:
Component inventory (Button, Input, Modal, etc.)
Interaction flows (user actions → state changes)
UI states (initial, loading, success, error, etc.)
Data flows (form submissions, API calls, etc.)
Example analysis structure:
interfacePrototypeAnalysis {
components: {
name: string; // e.g. "PrimaryButton"type: string; // e.g. "Button"props: string[]; // e.g. ["label", "onClick", "disabled"]variants: string[]; // e.g. ["default", "hover", "disabled"]
}[];
flows: {
name: string; // e.g. "Login Flow"states: {
id: string; // e.g. "login-initial"label: string; // e.g. "Login Form (Empty)"components: string[];
interactions: {
trigger: string; // e.g. "Click 'Sign In'"action: string; // e.g. "Validate and submit"nextState: string; // e.g. "login-loading"condition?: string; // e.g. "If fields valid"
}[];
}[];
}[];
}
3. Map to Design System
For each component in the prototype:
// Search for matching DS componentconst results = awaitsearch_design_system({
query: componentName,
component_type: componentType, // "Button", "Input", etc.limit: 5
});
// If match found, get metadataif (results.length > 0) {
const metadata = awaitget_metadata({
node_id: results[0].node_id
});
// Store mapping
componentMap.set(componentName, {
figma_node_id: results[0].node_id,
figma_name: results[0].name,
variants: metadata.variants,
props: metadata.properties
});
} else {
// Mark for primitive fallback
componentMap.set(componentName, {
needs_primitive_fallback: true,
primitive_type: componentType
});
}
4. Plan Page Structure
Organize frames by flow:
Page: "Login Flow"
├─ Overview Frame (legend + TOC)
├─ State 1: Login Form (Empty)
├─ State 2: Login Form (Validation Error)
├─ State 3: Login Form (Loading)
├─ State 4: Login Success
└─ State 5: Login Error (Network)
Calculate frame positions:
constFRAME_WIDTH = 1440; // desktop, or 390 for mobileconstFRAME_HEIGHT = 900; // desktop, or 844 for mobileconstHORIZONTAL_SPACING = 200;
constVERTICAL_SPACING = 200;
functioncalculateFramePosition(index: number, perRow: number = 3) {
const row = Math.floor(index / perRow);
const col = index % perRow;
return {
x: col * (FRAME_WIDTH + HORIZONTAL_SPACING),
y: row * (FRAME_HEIGHT + VERTICAL_SPACING)
};
}
5. Build Frames in Figma
CRITICAL: Never call createComponent() — always use createInstance() for DS components or primitives for fallbacks.