npx claudepluginhub gbasin/figma-to-reactConvert Figma designs and screenshots into production-ready code components with accessibility built-in
Build frontend on autopilot. Pixel-perfect Figma-to-code with autonomous refinement.
Decode Figma's binary Kiwi wire protocol — extract scenegraph, SVGs, and CSS from WebSocket frames, bypassing REST API rate limits
Compiler-driven design generation in Figma — 100% design system compliant. Compiles component specs into verified Figma output via MCP.
Plugin that includes the Figma MCP server and Skills for common workflows
Memory compression system for Claude Code - persist context across sessions
External network access
Connects to servers outside your machine
Share bugs, ideas, or general feedback.
A Claude Code plugin that converts Figma designs into pixel-perfect TypeScript React components with Tailwind CSS.
Figma MCP Server — Either web or desktop, authenticated:
mcp__figma__whoami
React + Tailwind CSS project — Vite, Next.js, or CRA
Tools (auto-installed by the skill):
brew install imagemagick)# Add the marketplace
/plugin marketplace add gbasin/figma-to-react
# Install the plugin
/plugin install figma-to-react
# Restart Claude Code to activate hooks
Convert this Figma flow to React: https://www.figma.com/design/abc123/My-Flow?node-id=1-234
Or use the skill directly:
/figma-to-react
| Step | Description |
|---|---|
| 1. Setup | Install tools, create temp dirs, arm capture hooks |
| 2. Detect | Scan project for framework, paths, patterns |
| 3. Confirm | Present config to user for approval |
| 3b. Preview | Create standalone preview (Vite: HTML entry, Next.js: pages/) |
| 4. Generate | Process each screen in parallel via sub-agents |
| 4b. Dimensions | Validate dimension coverage, prompt for missing |
| 5. Tokens | Import extracted CSS variables into project |
| 6. Validate | Screenshot comparison loop with auto-fixes |
| 7. Rename | Intelligently rename assets from MCP descriptions |
| 8. Cleanup | Disarm hooks, remove temp files |
For each screen:
get_metadata → extract dimensions → save to /tmp/figma-to-react/metadata/
↓
get_design_context → hook captures response → /tmp/figma-to-react/captures/
↓
process-figma.sh → extract tokens, download assets, transform code
↓
fix-collapsed-containers.sh → add explicit dimensions where needed
↓
bun oxlint --fix → auto-fix ~90% of Tailwind issues
capture screenshot → compare to Figma reference → calculate diff %
↓
≤5% diff? → Done
↓
>5% diff? → LLM makes targeted fix → loop (max 10 passes)
↓
No improvement? → Revert, try different approach
src/{flow}/
├── screens/
│ ├── registry.ts
│ └── components/
│ ├── WelcomeScreen.tsx
│ ├── SelectBankScreen.tsx
│ └── ...
└── {Flow}DemoPage.tsx
public/{flow}-assets/
├── logo.svg
├── arrow-back.svg
└── ...
src/styles/
└── figma-tokens.css
| Script | Purpose |
|---|---|
process-figma.sh | Main processor: tokens, assets, code transform |
extract-tokens.sh | Parse CSS variables from MCP output |
fix-collapsed-containers.sh | Add explicit dimensions to collapsing containers |
validate-dimensions-coverage.sh | Check if all collapse-prone elements have dimensions |
add-missing-dimensions.sh | Add user-provided dimensions to metadata |
validate-component.sh | Orchestrate single validation pass (deterministic) |
validate-visual.sh | ImageMagick RMSE comparison |
capture-screenshot.ts | Playwright headless capture |
save-component-metadata.sh | Link component names to nodeIds |
rename-assets.sh | Semantic asset naming + deduplication |
find-shared-components.ts | Detect shared components across multiple screens |
The plugin uses PostToolUse hooks to capture Figma MCP responses:
| Hook | Trigger | Action |
|---|---|---|
capture-figma-response.sh | get_design_context | Save response, suppress output |
capture-figma-metadata.sh | get_metadata | Extract frame dimensions |
capture-figma-screenshot.sh | get_screenshot | Decode and save image |
Hooks always capture for debugging. Output suppression only activates when the skill is running (saves ~50KB context per screen).
Same icon across multiple screens = one file. Assets are downloaded once and deduplicated by MD5 hash.
Containers with only absolutely-positioned children would collapse. The plugin detects these and adds explicit h-[Xpx] dimensions from Figma metadata.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claim