Use when converting a screenshot, mockup, or UI reference image into a Figma design. Triggers on requests like "recreate this in Figma", "make a Figma mockup of this screenshot", "build this UI in Figma", or when a user pastes a screenshot with a Figma file URL.
Convert a UI screenshot into a structured Figma mockup using the Figma Plugin API and Lucide icons.
Analyze a reference image, decompose it into layout sections, build each section incrementally in Figma, and source all icons from Lucide rather than drawing SVGs by hand. Validate spacing and layout with screenshots after each section.
mcp__plugin_figma_figma__* tools available)figma:figma-use and figma:figma-generate-design skills before any use_figma callBefore touching Figma, fully decompose the image:
Before creating anything:
get_metadata on the target node to understand existing content.search_design_system for components, variables, and styles. Run multiple queries (buttons, cards, colors, spacing, text styles).use_figma to list pages and top-level frames — understand file conventions.Never hand-draw SVG icons. Always fetch from Lucide.
Reason about each icon — match the visual in the screenshot to a Lucide icon name:
| Visual in Screenshot | Lucide Icon Name |
|---|---|
| Magic wand with stars | wand-sparkles |
| Three horizontal dots | ellipsis |
| Magnifying glass | search |
| Person silhouette | user |
| Chat bubble | message-circle |
| Plus sign | plus |
| Open envelope | mail-open |
| Signal bars | signal |
| WiFi arcs | wifi |
Fetch SVG data from https://lucide.dev/api/icons/{icon-name} using WebFetch.
All Lucide icons use viewBox 0 0 24 24, stroke-width="2", stroke-linecap="round", stroke-linejoin="round".
For filled/active icons, add fill="black" to the SVG element.
One section per use_figma call. Never build the entire screen in one script.
Call 1: Create wrapper frame (device size, auto-layout VERTICAL, clip content)
→ return wrapperId
Call 2: Build status bar (time text + signal/wifi/battery icons via SVG)
→ return sectionId
Call 3: Build header (tabs + filter icon)
→ return sectionId
Call 4: Build content area (grid columns, cards with placeholder fills)
→ return sectionId
Call 5: Build bottom nav (Lucide icon SVGs in auto-layout)
→ return sectionId
Key patterns:
figma.createNodeFromSvg(svgString) to insert Lucide iconslayoutSizingHorizontal = "FILL") to push elements apartlayoutSizingHorizontal = "FILL" AFTER parent.appendChild(child)After each use_figma call:
get_screenshot of the section node — check for:
get_screenshot of the full wrapper — check overall composition.use_figma calls — don't rebuild entire sections.After all sections are built, do a final comparison:
For iOS-style status bars, build these elements:
| Element | Implementation |
|---|---|
| Time | Text node, Inter Semi Bold 17px |
| Signal | 4 rectangles with increasing heights (4/6/9/12px), 1.5px gap, aligned bottom |
| WiFi | Lucide wifi SVG, 16x12px |
| Battery | Rectangle outline (24x12, cornerRadius 3, stroke 1.5) + fill rectangle inside + small tip nub |
Use SPACE_BETWEEN or a FILL spacer to push time left and indicators right.
| Mistake | Fix |
|---|---|
| Drawing icons as shapes/text | Fetch from Lucide API instead |
Building entire screen in one use_figma | One section per call, validate between |
| Spacer not set to FILL | Set layoutSizingHorizontal = "FILL" after appending |
| Icons too small/large | Lucide default is 24x24; resize to match context (16-26px typical) |
Forgetting loadFontAsync | Must call before any text property changes |
| Hardcoding colors when design system has variables | Search design system first, fall back to hex only when needed |
| Not returning node IDs | Always return { createdNodeIds, mutatedNodeIds } |