figma-design-to-code

figma-design-to-code is a skill for Codex from PracticalSwan/agent-skills. It costs 117 tokens per session (1,713 once invoked), scanned A, original, MIT.

A workflow for turning a Figma design into code in an existing project. Figma is a design tool used to create screen layouts and visual specifications.

In plain words
What is it for?
Use it when implementing, translating, or porting a Figma screen or component into code.
Why use it?
It provides the required process for reading a Figma design and adapting it to the project's real technology stack.

Skill for Codex

Written for Codex: reads ~/.codex or $CODEX_HOME. Also seen: mentions Claude Code; mentions Codex.

Good fit Use it when implementing, translating, or porting a Figma screen or component into code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/practicalswan/agent-skills/figma-design-to-code
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 PracticalSwan/agent-skills --skill figma-design-to-code
Clone the repo
git clone --depth 1 https://github.com/PracticalSwan/agent-skills

Made for: 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-design-to-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/practicalswan/agent-skills/figma-design-to-code.svg)](https://agentmods.dev/skills/practicalswan/agent-skills/figma-design-to-code)
Your own site
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/figma-design-to-code"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/figma-design-to-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,713 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.
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.00117 $0.01713
Opus 5 $0.00059 $0.00856
Sonnet 5 $0.00023 $0.00343
Haiku 4.5 $0.00012 $0.00171

Measured yesterday against content hash 657bcb193368, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

figma-design-to-code 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 yesterday.

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.

figma-design-to-code/SKILL.md · 113 lines

How it starts

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

Implement a Figma Design as Code (Design → Code)

Use this skill to turn a Figma design into code in a target codebase. This is the read-FROM-Figma direction: pull design context out of Figma with get_design_context, then adapt it into the project's real stack. For the reverse direction — building or updating a design in Figma from code — use figma-generate-design instead.

This skill owns the workflow for design-to-code. Parameter mechanics (nodeId / fileKey / branchKey extraction, URL parsing, format/query options, response shape) live on the get_design_context tool description itself — follow them there.

Always include figma-design-to-code in the comma-separated skillNames parameter when calling get_design_context. If this skill was loaded via an MCP resource, you MUST prefix the name with resource: (e.g. resource:figma-design-to-code). This is a logging parameter used to track skill usage — it does not affect execution.

Direction and Scope

  • You MUST use this skill for design → code: implementing, translating, or porting a Figma node into code.
  • You MUST NOT use this skill to write to Figma.

Workflow

1. Call get_design_context first

  • You MUST call get_design_context on the target node before writing any code. It is your primary tool — a single call returns reference code, a screenshot, and contextual hints.
  • You MUST NOT reach for get_metadata or get_screenshot as a substitute. Use them only to orient (e.g. picking a node) or to validate, not in place of get_design_context.

2. Treat the output as a reference, not final code

  • The returned code is React + Tailwind enriched with hints. You MUST treat it as a REFERENCE, not as final code to paste verbatim.
  • You MUST adapt it to the target project's language, framework, component library, styling system, and conventions. Match the surrounding code.

3. Reuse what the project already has

  • Before writing new code, You MUST check the target project for existing components, layout patterns, and design tokens that match the design intent.
  • You MUST reuse the project's existing components and tokens instead of generating new equivalents from scratch.

Read the full file on GitHub · 113 lines

Files

What ships with it

1 file 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. yesterday Changed 657bcb193368
  2. 3d ago Changed 78add4a80e33
  3. 7d ago First seen · 113 lines · 117 tokens per session scan A da79e4259431

Subscribe to this mod's changes

figma-design-to-code is a skill published in the GitHub repository PracticalSwan/agent-skills (13 stars, last pushed yesterday), licensed MIT. It adds 117 tokens to every session and 1,713 once invoked, about $0.0006 per session on Opus 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

Other skills, from other repositories

create-anatomy

Generate a visual anatomy annotation in Figma showing numbered markers on a component instance with an attribute table. Use when the user mentions "anatomy", "anatomy annotation", "component anatomy", "create anatomy", or wants to annotate a component's structural elements.

redongreen/uSpec · 59 tokens

create-component-md

Generate a canonical JSON contract and a self-contained implementation Markdown specification for a Figma component covering API, structure, color, and screen-reader behavior. Reads a base.json produced by the uSpec Extract plugin, runs four read-only interpretation skills in parallel, reconciles their outputs, and…

redongreen/uSpec · 107 tokens

design-system

Use this skill BEFORE writing or restyling ANY user-facing interface in WrongStack. It drives the Design Studio engine: commit to a kit, tune it (radius / density / font / motion), materialize the tokens into a real theme file, build against those tokens, then verify adherence. Trigger it whenever the user asks to…

WrongStack/WrongStack · 248 tokens

create-color

Generate color annotation specifications mapping UI elements to design tokens. Use when the user mentions "color", "color annotation", "color spec", "tokens", "design tokens", or wants to document which color tokens a component uses.

redongreen/uSpec · 48 tokens

create-voice

Generate screen reader accessibility specifications for VoiceOver (iOS), TalkBack (Android), and ARIA (Web). Use when the user mentions "voice", "voiceover", "screen reader", "accessibility spec", "talkback", "aria", or wants to create accessibility documentation for a UI component.

redongreen/uSpec · 66 tokens

figma-codegen

Generate framework-aware code from a Figma design. Reads the project's stack profile and emits code matching the existing framework (React/Vue/Svelte/Next/etc.) and styling (Tailwind/CSS/CSS-in-JS), reusing existing components and design tokens instead of regenerating from scratch. Triggers whenever the user wants a…

awdr74100/figwright · 145 tokens