A Figma plugin that extracts design data into structured JSON and AI-ready markdown prompts β paste into ChatGPT, Claude, or any LLM to generate frontend components.
- JSON Export β Full hierarchical JSON of any frame (layout, styles, typography, colors, design tokens)
- AI Prompt β Auto-generates a framework-agnostic markdown prompt with embedded JSON spec
- Multi-selection β Select any number of nodes; all image fills are collected into one export
- Image Export β PNG / JPG / SVG at 1Γβ4Γ scale, or Original (uploaded raster)
- Per-image or Merged β Export each image fill separately, or composite the whole selection into one file
- Custom filenames β Rename each image asset inline before download; names sync into the prompt
- Copy / Download β One-click clipboard copy and zip download
- Real-time β Updates instantly when you change your selection
- Go to Releases and download the latest
.zip - Unzip β you'll get a folder with
manifest.jsonanddist/
Then follow Import into Figma.
git clone https://github.com/runkids/figma-to-prompt.git
cd figma-to-prompt
pnpm install
pnpm buildThen follow Import into Figma.
Note: Figma plugins can only be loaded in the Figma Desktop app, not in the browser.
-
Open Figma Desktop and any design file
-
Click the + button in the top-right, then select Import plugin from manifest...

-
Select the
manifest.jsonfrom the unzipped folder (or cloned repo root) -
Done! Figma to Prompt appears under Plugins β Development
- Menu: Plugins β Development β Figma to Prompt
- Quick search:
β /(Mac) orCtrl /(Windows), typeFigma to Prompt
- Launch the plugin in Figma
- Select a frame, component, or group on the canvas
- Switch between tabs:
- JSON β Structured design data
- Prompt β AI-ready markdown prompt
- Copy β Click the copy button to copy to clipboard
- Download β Save as images (PNG/JPG/SVG, 1xβ4x)
- Paste the prompt into your AI tool and generate frontend code
This repo includes a design-to-code skill that teaches AI agents how to interpret plugin output and generate accurate UI components. Compatible with any agent that supports the skillshare format.
skillshare install runkids/figma-to-promptOnce installed, paste the copied prompt or JSON β the agent will automatically understand the node structure, map layout to flexbox, convert styles to CSS, and handle component dependencies.
No setup needed β paste the Prompt tab output directly into ChatGPT, Claude, Gemini, Copilot, or any LLM. The prompt includes conversion guidelines, design tokens, and the full component structure.
The plugin generates a UISerializedNode tree:
{
"id": "1:23",
"name": "Card",
"type": "FRAME",
"layout": {
"mode": "vertical",
"width": 320,
"height": 200,
"gap": 12,
"padding": { "top": 16, "right": 16, "bottom": 16, "left": 16 },
"primaryAxisAlign": "min",
"counterAxisAlign": "min",
"sizing": { "horizontal": "hug", "vertical": "fixed" }
},
"style": {
"backgroundColor": "#FFFFFF",
"borderRadius": 8
},
"children": [...]
}The Prompt tab wraps this in a markdown template with conversion guidelines, ready to use.
- Node.js >= 18
- pnpm
- Figma Desktop
Run both watchers in separate terminals:
# Terminal 1 β sandbox (Figma API side)
pnpm dev:sandbox
# Terminal 2 β UI (plugin panel)
pnpm dev:uiSave triggers a rebuild. Reopen the plugin in Figma to load the latest version.
pnpm test # single run
pnpm test:watch # watch modepnpm buildOutputs dist/code.js (sandbox) and dist/ui.html (UI panel).
- TypeScript
- Preact β UI framework (with React-compat alias for ecosystem libs)
- Vite β Dual config bundler (sandbox + UI)
- Vitest β Unit testing
- Tailwind CSS v4 β UI styling
- vite-plugin-singlefile β Inlines everything into a single
ui.html
