Fetch designs from Figma, generate React/React Native code, and sync design tokens. Use when the user shares a Figma URL, asks to implement a design, or wants to extract design tokens.
Fetch designs from Figma, generate code, and sync design tokens using the Figma MCP server.
Parse the Figma URL from: $ARGUMENTS
A Figma URL typically looks like:
https://www.figma.com/file/{file_key}/{file_name}?node-id={node_id}https://www.figma.com/design/{file_key}/{file_name}?node-id={node_id}Extract the file_key and node_id from the URL.
Use the Figma MCP tools to fetch design data:
mcp__figma__get_file - Get full file datamcp__figma__get_file_nodes - Get specific nodes from a filemcp__figma__get_images - Export images/SVGs from nodesmcp__figma__get_styles - Get styles from a filemcp__figma__get_components - Get components from a filepackages/ui/src for similar componentsWhen generating React/React Native code:
Use existing design tokens from the project:
packages/ui/src for theme/token filesFollow project conventions:
packages/ui/srcComponent structure:
import { View, Text, Pressable } from 'react-native';
interface ComponentNameProps {
// Props based on Figma variants
}
export function ComponentName({ ...props }: ComponentNameProps) {
return (
// Implementation
);
}
When syncing design tokens:
Extract tokens from Figma:
Update token files in the project:
packages/ui/src