# Figma from code

> Figma from code is an open-source agent skill for design and media. Rebuilds an existing web screen as an editable Figma design with auto-layout. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/kennedy122112/figma-steroids/tree/main/skills/figma-from-code
- **Repository:** https://github.com/kennedy122112/figma-steroids
- **GitHub stars:** 6
- **License:** MIT
- **Skill name:** figma-from-code
- **Collection:** https://github.com/kennedy122112/figma-steroids
- **Categories:** [design and media](https://ai-powered.com/categories/design-and-media)
- **Listing updated:** 2026-12-04

## About

This skill takes a screen or component that already runs in the browser and rebuilds it in Figma as editable frames. It reads the rendered page rather than only the source code, so measurements, resolved layout and combined styles come through as they appear on screen. Flex and grid layouts become auto-layout, colors are linked to the file's variables where a matching token exists, and text is matched to existing text styles.

The workflow reads the page with a bundled script that walks the DOM, including shadow roots and slots, and returns a JSX-like tree plus a report of unmapped colors, icons and unstyled text. Icons are matched to named icon libraries by name or by shape, and unmatched SVGs are copied as vectors. Large screens are rendered in pieces, and components already in the Figma file can be placed as instances. A final step compares measurements against the browser and binds spacing and radius to variables by value.

It expects an active Figma connection through the figma-cli tooling, a running dev server or static page URL, and Node.js with Playwright for the one-step script. Instructions are written in Spanish, and the skill targets Angular, React, Lit and plain HTML/CSS/JS projects.

## When your agent uses it

> Reconstruye en Figma, como diseño editable, una pantalla o componente que ya existe en el código del proyecto (Angular, React, Lit, HTML/CSS/JS u otro), con auto-layout, las variables y estilos de texto del archivo y las instancias de sus componentes. Úsala cuando el usuario diga "pasa esta pantalla a Figma", "lleva este componente a Figma", "reconstruye la app en Figma", "documenta en Figma lo que ya está hecho", "code to design", "import this page into Figma".

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs JavaScript scripts](https://github.com/kennedy122112/figma-steroids/tree/HEAD/skills/figma-from-code)
- [Network calls found in its scripts](https://github.com/kennedy122112/figma-steroids/tree/HEAD/skills/figma-from-code)
- [License: MIT](https://github.com/kennedy122112/figma-steroids/tree/HEAD/skills/figma-from-code)

## Features

- **Auto-layout from flex and grid:** Converts flex containers into Figma auto-layout with gaps, padding and alignment, and grid rows into wrapping rows.
- **Variable and style mapping:** Links colors and spacing to the file's variables and matches text to existing text styles by size, weight and line height.
- **Icon recognition:** Identifies Lucide and Material icons by name and matches unnamed SVGs by shape, copying the rest as editable vectors.
- **Component instances:** Places elements mapped to existing Figma components as instances rather than copies.
- **Chunked rendering:** Renders large screens piece by piece and removes duplicate copies left by retries.
- **Fidelity check:** Compares Figma measurements with browser bounding boxes to verify the rebuild.

## Good for

- Turn this dashboard page into an editable Figma design
- Document an existing login component in Figma
- Rebuild the app's profile card as auto-layout frames
- Import a running page into Figma with the project's color tokens

## Install

### Claude Code

This skill ships in the `figma-steroids` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add kennedy122112/figma-steroids
/plugin install figma-steroids@figma-steroids
```

Or copy only this skill to `~/.claude/skills/figma-from-code`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/kennedy122112/figma-steroids.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/figma-from-code &&
cp -R "$tmp/skills/figma-from-code" ~/.claude/skills/figma-from-code &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/figma-from-code` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/figma-from-code` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/kennedy122112/figma-steroids.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/figma-from-code &&
cp -R "$tmp/skills/figma-from-code" ~/.agents/skills/figma-from-code &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/figma-from-code` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/figma-from-code` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/kennedy122112/figma-steroids.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/figma-from-code &&
cp -R "$tmp/skills/figma-from-code" ~/.cursor/skills/figma-from-code &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/figma-from-code` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/kennedy122112/figma-steroids.git --path skills/figma-from-code
```

Or copy the folder to `~/.gemini/skills/figma-from-code` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/figma-from-code`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/kennedy122112/figma-steroids.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/figma-from-code &&
cp -R "$tmp/skills/figma-from-code" ~/.copilot/skills/figma-from-code &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/figma-from-code` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/kennedy122112/figma-steroids.git
```

Then copy `figma-steroids/skills/figma-from-code` into your agent's skills folder as `figma-from-code`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need before Figma from code runs?

It needs an active Figma connection through the figma-cli skill and a URL where the page is running, such as a dev server, Storybook or static HTML. The one-step script also needs Playwright.

### Does Figma from code change existing Figma content?

The skill instructions say not to delete or modify anything already in the file and to create the output in a new page or area.

### Which clients can use Figma from code?

It is a standard agent skill folder, so it works with the listed AI coding clients. It is published as a Claude Code plugin in the figma-steroids marketplace.

### How do I install Figma from code in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/figma-from-code to use it in all your projects, or to .claude/skills/figma-from-code in one project. Or install the figma-steroids plugin, which includes it: /plugin marketplace add kennedy122112/figma-steroids, then /plugin install figma-steroids@figma-steroids.

### Does Figma from code run scripts?

Yes. It runs JavaScript scripts. Its scripts contain network calls. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Figma from code?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Figma from code?

The closest alternatives to Figma from code are Figma build UI, Figma generate design, Figma to code, Figma to page and Figma implement design.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Figma build UI](https://ai-powered.com/skills/figma-build-ui): Figma build UI is an open-source agent skill for design and media.
- [Figma generate design](https://ai-powered.com/skills/figma-generate-design): Figma generate design is a free agent skill for design and media.
- [Figma to code](https://ai-powered.com/skills/figma-to-code-kennedy122112): Figma to code is an open-source agent skill for design and media.
- [Figma to page](https://ai-powered.com/skills/figma-to-page): Figma to page is an open-source agent skill for design and media.
- [Figma implement design](https://ai-powered.com/skills/figma-implement-design-mtarcure): Figma implement design is an open-source agent skill for design and media.
- [Figma to react](https://ai-powered.com/skills/figma-to-react): Figma to react is an open-source agent skill for design and media.
- [Figma](https://ai-powered.com/skills/figma-openai): Figma is a free agent skill for design and media.
- [Figma implement design](https://ai-powered.com/skills/figma-implement-design): Figma implement design is a free agent skill for design and media.

---
Source: https://ai-powered.com/skills/figma-from-code
