# Figma to Code

> Turn a Figma frame into clean, production-ready Next.js, Tailwind CSS, and shadcn/ui code.

Figma to Code is a free AI agent skill on Agensi by Ilham Febri, in Frontend & Web Apps. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Ilham Febri](https://www.agensi.io/creators/ilham-febri)
- Category: [Frontend & Web Apps](https://www.agensi.io/skills/frontend-web-apps)
- Version: 1.0
- Last updated: 2026-11-29
- Security: scan passed (2026-11-29); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/figma-to-code
- Tags: web-design, nextjs, tailwind-css, shadcn-ui, figma

## About this skill

Turn a Figma frame into clean, production-ready Next.js, Tailwind CSS, and shadcn/ui code.

Figma to Code reads the Figma structure first, builds a token map before writing code (three tiers: primitive, semantic, component), maps auto-layout to flexbox (HUG becomes w-fit, FILL becomes flex-1), maps components to shadcn/ui instead of rebuilding them from divs, and verifies the result against the design at 1440px and 390px. It includes a worked example (a revenue stat card, from Figma structure to token map to finished component) and a list of the mistakes that ruin most Figma-to-code conversions.

Install: copy skills/figma-to-code into ~/.claude/skills/ (or .claude/skills/ for one project), restart Claude Code, or run /skills to confirm. No build step, no dependencies, no server. You need a Figma file URL or node ID, and a screenshot of the frame for verification.

License: MIT. Free to use in commercial work.

## Known limitations

Requires Figma API access via MCP or node data. Does not support non-Tailwind stacks by default. Rounded spacing values (e.g. 13px to 12px) are enforced to match tokens.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Figma to Code skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill handle Figma designs differently than a standard LLM prompt?

Unlike generic AI prompts that create absolute-positioned code, this skill translates Figma auto-layout directly into CSS Flexbox/Grid and maps colors to a semantic token system (Primitive, Semantic, Component) for professional maintainability.

### Which frameworks and AI agents is this skill compatible with?

This skill is optimized for Next.js App Router environments using Tailwind CSS and shadcn/ui; it works best with AI agents that have access to the Figma API or can process detailed Figma node data.

### Does the skill create new components from scratch or use my existing shadcn/ui library?

The skill identifies repeated Figma instances and automatically maps them to their equivalent shadcn/ui components, ensuring your codebase remains DRY and consistent with your existing library.

### What specific information do I need to provide from Figma to start the conversion?

For optimal results, you should provide a Figma file URL or specific Node IDs, though the skill can also process structured design data exported from Figma's developer mode.

### Are there any specific design elements that the skill cannot convert into code?

While it excels at complex layouts and tokenization, it cannot generate code for intricate custom SVG icons; these should be exported as assets and imported into your project separately.

### Does the generated code support responsive design and dark mode out of the box?

Yes, the skill includes a built-in verification step that checks for responsive behavior across breakpoints and ensures that all components are fully compliant with light and dark mode tokens.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
