design-to-code

design-to-code is a skill for Claude Code, Codex from KunanonJ/ai-skills-hub. It costs 52 tokens per session (1,312 once invoked), scanned A, a copy of design-to-code, MIT.

A workflow for turning Figma designs into React and TypeScript components using Vite and Tailwind CSS. Figma is a tool for creating and sharing interface designs.

In plain words
What is it for?
Use it to create production-ready front-end components from Figma screens, including their structure, properties, and assets.
Why use it?
It reduces the manual work and visual differences involved in rebuilding a design as working code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to create production-ready front-end components from Figma screens, including their structure, properties, and assets.

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

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 design-to-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/kunanonj/ai-skills-hub/design-to-code/github.svg)](https://agentmods.dev/skills/kunanonj/ai-skills-hub/design-to-code)
Your own site
<a href="https://agentmods.dev/skills/kunanonj/ai-skills-hub/design-to-code"><img src="https://agentmods.dev/badge/skills/kunanonj/ai-skills-hub/design-to-code/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 design-to-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/kunanonj/ai-skills-hub/design-to-code"><img src="https://agentmods.dev/badge/skills/kunanonj/ai-skills-hub/design-to-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,312 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 100% copy Near-identical to another mod 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.00052 $0.01312
Opus 5 $0.00026 $0.00656
Sonnet 5 $0.00010 $0.00262
Haiku 4.5 $0.00005 $0.00131

Measured 10d ago against content hash 6c788e228329, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

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 10d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/coderio-skill.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

This is a copy

100% identical to design-to-code — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/design-to-code/SKILL.md · 159 lines

How it starts

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

Design to Code

High-fidelity UI restoration from Figma designs to production-ready React + TypeScript components. This SKILL uses a robust helper script to minimize manual errors and ensure pixel-perfect results.

Prerequisites

  1. Figma API Token: Get from Figma → Settings → Personal Access Tokens
  2. Node.js: Version 18+
  3. coderio: Installed in scripts/ folder (handled by Setup phase)

Workflow Overview

Phase 0: SETUP    → Create helper script and script environment
Phase 1: PROTOCOL → Generate design protocol (Structure & Props)
Phase 2: CODE     → Generate components and assets

Phase 0: Setup

Step 0.1: Initialize Helper Script

User Action: Run these commands to create the execution helper and isolate its dependencies.

mkdir -p scripts

# 1. Copy script files
# Note: Ensure you have the 'skills/design-to-code/scripts' directory available
cp skills/design-to-code/scripts/package.json scripts/package.json
cp skills/design-to-code/scripts/coderio-skill.mjs scripts/coderio-skill.mjs

# 2. Install coderio in scripts directory (adjust version if needed)
cd scripts && pnpm install && cd ..

Step 0.2: Scaffold Project (Optional)

If starting a new project:

  1. Run: node scripts/coderio-skill.mjs scaffold-prompt "MyApp"
  2. AI Task: Follow the instructions output by the command to create files.

Phase 1: Protocol Generation

Step 1.1: Fetch Data

# Replace with your URL and Token
node scripts/coderio-skill.mjs fetch-figma "https://figma.com/file/..." "figd_..."

Verify: process/thumbnail.png should exist.

Step 1.2: Generate Structure

  1. Generate Prompt:

    node scripts/coderio-skill.mjs structure-prompt > scripts/structure-prompt.md
    
  2. AI Task (Structure):

    • ATTACH: process/thumbnail.png (MANDATORY)
    • READ: scripts/structure-prompt.md
    • INSTRUCTION: "Generate the component structure JSON based on the prompt and the attached thumbnail. Focus on visual grouping. Use text content to name components accurately (e.g. 'SafeProducts', not 'FAQ')."
    • SAVE: Paste the JSON result into scripts/structure-output.json.

Read the full file on GitHub · 159 lines

Files

What ships with it

4 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. 10d ago First seen · 159 lines · 52 tokens per session scan A 6c788e228329

Subscribe to this mod's changes

design-to-code is a skill published in the GitHub repository KunanonJ/ai-skills-hub (5 stars, last pushed 1mo ago), licensed MIT. It adds 52 tokens to every session and 1,312 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to design-to-code, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

generic-react-ux-designer

Professional UI/UX design expertise for React applications. Covers design thinking, user psychology (Hick's/Fitts's/Jakob's Law), visual hierarchy, interaction patterns, accessibility, performance-driven design, and design critique. Use when designing features, improving UX, solving user problems, or conducting design…

travisjneuman/.claude · 69 tokens

generic-react-design-system

Complete design system reference for React applications. Covers colors, typography, spacing, component patterns, glassmorphism effects, GPU-accelerated animations, and WCAG AA accessibility. Use when implementing UI, choosing colors, applying spacing, creating components, or ensuring brand consistency.

travisjneuman/.claude · 59 tokens

web-artifacts-builder

Modern web development patterns using React + Tailwind CSS + shadcn/ui for building production-quality, accessible, and performant web applications.

bejranonda/LLM-Autonomous-Agent-Plugin-for-Claude · 31 tokens

ss-studio

Turn a product brief and optional references into three distinct creative directions, a human-selected StyleSeed interaction plan, generated image/video asset jobs, a working UI prototype, and a verified prototype-first showcase reel. Use for client concepts, app interaction exploration, trendy but coherent UI…

bitjaru/styleseed · 75 tokens

ss-copy

Generate UX microcopy (button labels, error messages, empty states, toasts) following a casual-but-polite voice and tone.

bitjaru/styleseed · 29 tokens

ss-lint

Quick automated lint — detects common design system violations in seconds.

bitjaru/styleseed · 15 tokens