Agent skill

Figma To Code

by stellar in stellar/laboratory

Bridge Figma MCP output to Stellar Lab code conventions. An agent skill from stellar/laboratory.

Apache-2.0Auto-check passedFrontend & Design

Install Figma To Code

skills CLI
$ npx skills add stellar/laboratory --skill figma-to-code -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install stellar/laboratory figma-to-code --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/stellar/laboratory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/figma-to-code .claude/skills/figma-to-code && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
figma-to-code
GitHub stars
112
Token cost
~520 tokens
SKILL.md length
196 words
Files
2
Skills in repo
6
Repo updated
First seen
Licence
Apache-2.0

At a glance

Bridge Figma MCP output to Stellar Lab code conventions. An agent skill from stellar/laboratory.

  • Works in 3 steps: Get the Figma design context → Translate the output → Verify against screenshot
  • Tasks that involve Design to code
  • SKILL.md covers Purpose, Workflow and Common Pitfalls
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Figma To Code is an agent skill from stellar/laboratory. Bridge Figma MCP output to Stellar Lab code conventions. Invoke after calling getdesigncontext to translate Figma's reference code into project-appropriate components, classes, and patterns.

Its SKILL.md is about 520 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `reference/figma-mapping.md`).

It sits in Frontend & Design, covering Design to code. It works with Figma. The repository describes itself as: A set of tools that enables developers to try out and learn about the Stellar network. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Design to code

Example prompts

  • “/figma-to-code”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Get the Figma design context
  2. Translate the output
  3. Verify against screenshot

What it can do on your machine

Read from SKILL.md and the folder at commit b4b6465. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Figma To Code loads about 520 tokens when it runs. Until then it costs about 52 tokens; SKILL.md has 196 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~520

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from stellar/laboratory at commit b4b6465, republished under its Apache-2.0 licence (© stellar). 196 words, ~520 tokens.

Download SKILL.mdSave it as .claude/skills/figma-to-code/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
figma-to-code
description
Bridge Figma MCP output to Stellar Lab code conventions. Invoke after calling get_design_context to translate Figma's reference code into project-appropriate components, classes, and patterns.
read_files
.claude/skills/figma-to-code/reference/*.md

Figma to Code

Purpose

The Figma MCP's get_design_context returns generic reference code (often plain HTML/CSS). This skill bridges the gap between that output and the project's actual conventions: @stellar/design-system components, SCSS with BEM-ish naming, and specific layout patterns.

For the full SDS component catalog, props, SCSS conventions, and usage examples, invoke /component-guide.

For element mapping tables, spacing/layout patterns, and Figma variable mappings, see reference/figma-mapping.md (loaded automatically).

Workflow

1. Get the Figma design context
mcp__figma-desktop__get_design_context({
  nodeId: "1234:5678",
  artifactType: "COMPONENT_WITHIN_A_WEB_PAGE_OR_APP_SCREEN",
  clientFrameworks: "react",
  clientLanguages: "typescript,scss"
})

Also get a screenshot for visual reference:

mcp__figma-desktop__get_screenshot({ nodeId: "1234:5678" })
2. Translate the output

Do NOT copy the Figma reference code directly. Instead, map each element to the project's conventions using the mapping rules in reference/figma-mapping.md.

3. Verify against screenshot

After implementing, visually compare the rendered component against the Figma screenshot. Focus on: layout, spacing, typography hierarchy, and interactive states.

Common Pitfalls

  1. Don't copy Figma's HTML structure literally — Figma groups elements for design purposes, not component architecture. Think about what makes sense as React components.

  2. Don't use arbitrary colors — Figma may show raw hex values. Map them to SDS color tokens (--sds-clr-*).

  3. Don't ignore interactive states — Figma may show one state. Consider hover, focus, disabled, loading, and error states using design system props.

© stellar, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .claude/skills/figma-to-code of stellar/laboratory.

  • SKILL.md
  • reference/figma-mapping.md

Open the folder on GitHubat commit b4b6465

Compare with similar skills

Figma To Code next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Figma To Code compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Figma To Code this skillstellar/laboratory112—~520Automated safety check: PassApache-2.0
Figma use_figma Plugin API Ruleswarpdotdev/warp65k4 repos~4.4kAutomated safety check: PassAGPL-3.0
Figma Design to Codewarpdotdev/warp65k4 repos~2.9kAutomated safety check: PassAGPL-3.0
Figma Design System Rules Generatorwarpdotdev/warp65k3 repos~4.6kAutomated safety check: PassAGPL-3.0
Figma Code Connect Componentswarpdotdev/warp65k2 repos~4.2kAutomated safety check: PassAGPL-3.0
Design To CodeMigoXLab/coderio1142 repos~1.2kAutomated safety check: PassApache-2.0

Similar skills

  • Required groundwork before any use_figma call: the rules and reference files for running JavaScript in a Figma file through the Plugin API without common failures.

    65k GitHub starsUsed in 4 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • Figma Design to Code

    warpdotdev/warp

    Turns a Figma frame or component into production code that matches the design, using the Figma MCP server and the project's own design system.

    65k GitHub starsUsed in 4 repos~2.9k tokens
    Frontend & DesignAuto-check passed
  • Creates project-specific design system rules from your codebase so coding agents implement Figma designs with your components, naming and tokens.

    65k GitHub starsUsed in 3 repos~4.6k tokens
    Frontend & DesignAuto-check passed
  • Maps published Figma components to their code implementations with Code Connect, using the Figma MCP suggestion and mapping tools.

    65k GitHub starsUsed in 2 repos~4.2k tokens
    Frontend & DesignAuto-check passed
  • Design To Code

    MigoXLab/coderio

    Pixel-perfect Figma to React conversion using coderio. An agent skill from MigoXLab/coderio.

    114 GitHub starsUsed in 2 repos~1.2k tokens
    Frontend & DesignAuto-check passed
  • Figma Screen Generator

    warpdotdev/warp

    Builds or updates full Figma screens from code or a description by reusing the file's published design system components, variables and styles.

    65k GitHub starsUsed in 2 repos~5k tokens
    Frontend & DesignAuto-check passed

More from stellar/laboratory

  • Component Guide

    stellar/laboratory

    Guide for building React components using @stellar/design-system and project SCSS conventions.

    112 GitHub stars~999 tokensUpdated 5 days ago
    Auto-check passed
  • Correct mental models for React re-renders and memoization. An agent skill from stellar/laboratory.

    112 GitHub stars~1.1k tokensUpdated 5 days ago
    Auto-check passed
  • Zustand Store Patterns

    stellar/laboratory

    Reference for the two Zustand store patterns in Stellar Lab — main store (querystring) and transaction flow store (sessionStorage).

    112 GitHub stars~1.4k tokensUpdated 5 days ago
    Auto-check passed
  • Commit Progress

    stellar/laboratory

    Commit a logical unit of work with a descriptive message. An agent skill from stellar/laboratory.

    112 GitHub stars~774 tokensUpdated 5 days ago
    Auto-check: notes
  • Test Changed

    stellar/laboratory

    Run e2e and unit tests related to files changed on the current branch.

    112 GitHub stars~836 tokensUpdated 5 days ago
    Auto-check passed

Works with

Questions about Figma To Code

What does Figma To Code do?

Bridge Figma MCP output to Stellar Lab code conventions. An agent skill from stellar/laboratory. Figma To Code is an agent skill from stellar/laboratory. Bridge Figma MCP output to Stellar Lab code conventions.

When should I use Figma To Code?

Figma To Code fits situations like: tasks that involve Design to code.

How do I install Figma To Code in Claude Code?

Run `npx skills add stellar/laboratory --skill figma-to-code -a claude-code`. Or copy the skill folder (.claude/skills/figma-to-code in stellar/laboratory) into .claude/skills/figma-to-code in your project. Claude Code loads it when a task matches its description.

How do I install Figma To Code in Codex?

Run `npx skills add stellar/laboratory --skill figma-to-code -a codex`. Or copy the skill folder (.claude/skills/figma-to-code in stellar/laboratory) into .agents/skills/figma-to-code in your project. Codex loads it when a task matches its description.

Can I use Figma To Code in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add stellar/laboratory --skill figma-to-code -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/figma-to-code, .gemini/skills/figma-to-code, .github/skills/figma-to-code and .opencode/skills/figma-to-code in your project.

What does Figma To Code need to run?

SKILL.md names no scripts, command-line tools or credentials: Figma To Code is instructions for the agent only.

Does Figma To Code access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Figma To Code safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Figma To Code use?

Figma To Code is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Figma To Code use?

About 520 tokens (SKILL.md is roughly 2.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Figma To Code?

Skills that share tags, products or a category with Figma To Code: Figma use_figma Plugin API Rules (warpdotdev/warp, 65k stars), Figma Design to Code (warpdotdev/warp, 65k stars), Figma Design System Rules Generator (warpdotdev/warp, 65k stars) and Figma Code Connect Components (warpdotdev/warp, 65k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Figma To Code?

stellar (a GitHub organization) maintains it in stellar/laboratory, which has 112 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 3, 2026.

Source: stellar/laboratory on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.