figma-codegen

figma-codegen is a skill for Claude Code, Codex from awdr74100/figwright. It costs 145 tokens per session (4,269 once invoked), scanned A, original, MIT.

A Figma-to-code tool that reads a design and the project’s existing technology choices, such as React, Vue, or Svelte. It generates code that follows the project’s components, styling approach, and named design values.

In plain words
What is it for?
Building new interface components from Figma selections or adapting existing components to match a Figma design while reusing the project’s code and design system.
Why use it?
It reduces guesswork when turning a Figma frame into code and avoids recreating components or styles that the project already has. The design data provides the layout and component details to implement.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: $skill-name invocation.

Good fit Building new interface components from Figma selections or adapting existing components to match a Figma design while reusing the project’s code and design system.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/awdr74100/figwright/figma-codegen
About the project

Figwright is a two-way Model Context Protocol server that lets coding agents exchange information with Figma through a companion plugin, turning designs into framework-aware code and editing the Figma canvas from code. Developers use it with agents such as Claude Code, Cursor, or Codex to read design context and create or modify Figma elements, and the catalogue contains skills and other workflow components for those interactions.

awdr74100/figwright · 1,622 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add awdr74100/figwright --skill figma-codegen
Clone the repo
git clone --depth 1 https://github.com/awdr74100/figwright

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for figma-codegen

README.md
[![agentmods](https://agentmods.dev/badge/skills/awdr74100/figwright/figma-codegen/github.svg)](https://agentmods.dev/skills/awdr74100/figwright/figma-codegen)
Your own site
<a href="https://agentmods.dev/skills/awdr74100/figwright/figma-codegen"><img src="https://agentmods.dev/badge/skills/awdr74100/figwright/figma-codegen/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for figma-codegen

Your own site · 80×15
<a href="https://agentmods.dev/skills/awdr74100/figwright/figma-codegen"><img src="https://agentmods.dev/badge/skills/awdr74100/figwright/figma-codegen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 145 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,269 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 14 Nov 2026
  • Snyk warn 20 Nov 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00145 $0.04269
Opus 5.5 $0.00058 $0.01708
Sonnet 5.5 $0.00029 $0.00854
Haiku 4.5 $0.00015 $0.00427

Measured 1mo ago against content hash 6e31662c85bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

figma-codegen scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/figma-codegen/SKILL.md · 227 lines

How it starts

The opening of the file, as written. The whole thing — 227 lines — stays where its author put it; the contents beside it link to each section on GitHub.

figma-codegen

Turn a Figma selection into code that looks like the rest of the project: reuse the components and tokens that already exist, only build what's genuinely missing. The grounded tools do the heavy lifting so you are not guessing from a screenshot. This file is the router; deep detail lives in references/ — load a reference when its step is in play.

When to use

  • The user pastes a Figma URL/selection and asks for code ("code this", "build this component").
  • The user wants to extend an existing component to match a Figma frame.

More than one Figma file open

Every tool result says so when it applies, so you do not have to check up front: with two or more files connected and none claimed, results carry a MORE THAN ONE FIGMA FILE IS OPEN block naming them. It matters because calls otherwise follow whichever file the user last touched, which changes when they switch tabs — so a task can read one file and write to another and report success.

When you see it, claim the file before doing anything else: list_files names every connected file, use_file({ fileName }) claims one for this session (use_file({ sessionId }) when two open files share a name — Figma allows that, and x (Copy) is how it happens). Every later call then reaches that file whatever is in front, including while its tab sits in the background. If the user has not said which file, ask — do not guess from the names.

Workflow

Run the grounded tools against the selection, then generate — trust them over the rendered image.

  1. get_design_context (detail full, dedupeComponents: true) → the structural tree with tokens resolved to names (Primary/500, spacing/4), styles deduped into globalVars, and each instance's mainComponent / componentProperties. This is the layout + binding source of truth. Keep dedupeComponents: true and don't depth-limit a subtree you'll build from. → How to read the tree, the per-node fidelity catalog (effects, per-side borders, stroke align, per-corner radius, blend, masks, gradients, image-fit, patterns, Figma Draw repeat groups / brush strokes / text on a path, auto-layout/grid, aspect-ratio, scroll/sticky, stack & stroke-space), Dev Mode annotations as ground truth, and grounding a page too big for one call: references/grounding.md.

Read the full file on GitHub · 227 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +2 lines 6e31662c85bf
  2. 1mo ago Changed · +4 lines 8ff2a6e4c0da
  3. 2mo ago Changed · +8 lines 7e719354f128
  4. 2mo ago Changed · +6 lines 21b16e655356
  5. 2mo ago Changed · +13 lines 9ae551ed3710
  6. 3mo ago First seen · 194 lines · 145 tokens per session scan A b1acd5cb8e96

Subscribe to this mod's changes

figma-codegen is a skill published in the GitHub repository awdr74100/figwright (1,622 stars, last pushed today), licensed MIT. It adds 145 tokens to every session and 4,269 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

figma-codegen compared with skills from other repositories

figma-codegen next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
figma-codegenawdr74100/figwrightSkill1.6ktodayMITA145Claude Code, Codex
visual-qa-verificationPMDevSolutions/AureliusSkill912d agoMITA81Claude Code
figma-intakePMDevSolutions/AureliusSkill912d agoMITA0Claude Code
indesign-conversionPMDevSolutions/AureliusSkill912d agoMITA0Claude Code
vibefigmavibeflowing-inc/vibe_figmaSkill8551mo agoAGPL-3.0A77Claude Code, Codex
design-pipelinesodam-ai/SoDam-Design-KitSkill620d agoApache-2.0A77Claude Code
high-plains-drifteralexconner-79/high-plains-drifterSkill212d agoMITA148Claude Code, Codex