본문으로 건너뛰기
Skillpedia
인터페이스 (UI/UX)33k · #8719

design-to-code

하는 일

이 스킬은 AI 에이전트가 Figma 디자인을 운영 수준의 React 코드로 바꾸는 과정을 안내합니다. 디자인 파일에서 정확한 화면을 만들고 싶은 개발자를 위한 것입니다.

사용하는 경우

  • ✓React 컴포넌트로 만들고 싶은 Figma 디자인이 있을 때.
  • ✓TypeScript와 Tailwind로 Figma 프레임에 가깝게 맞춰야 할 때.
  • ✓Figma에서 코드를 생성하기 전에 에이전트가 도우미 스크립트를 설정하기를 원하는 경우.

스킬 링크

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/design-to-code/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/design-to-code/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 Figma 프레임을 디자인과 가깝게 맞춘 React 컴포넌트로 바꿔 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 설정, 페이지 구조와 props에 대한 디자인 계획, 그리고 컴포넌트와 에셋 생성 단계로 에이전트를 이끕니다. 수동 실수를 줄이기 위해 도우미 스크립트를 사용합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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.
  3. Process Result:

    node scripts/coderio-skill.mjs save-structure
    

Step 1.3: Extract Props (Iterative)

  1. List Components:

    node scripts/coderio-skill.mjs list-components
    
  2. For EACH component in the list:

    a. Generate Prompt:

    node scripts/coderio-skill.mjs props-prompt "ComponentName" > scripts/current-props-prompt.md
    

    b. AI Task (Props):

    • ATTACH: process/thumbnail.png (MANDATORY)
    • READ: scripts/current-props-prompt.md
    • INSTRUCTION: "Extract props and state data. Be pixel-perfect with text and image paths."
    • SAVE: Paste the JSON result into scripts/ComponentName-props.json.

    c. Save & Validate:

    node scripts/coderio-skill.mjs save-props "ComponentName"
    # If this fails, re-do step 'b' with better attention to the thumbnail
    

Phase 2: Code Generation

Step 2.1: Plan Tasks

node scripts/coderio-skill.mjs list-gen-tasks

This outputs a list of tasks with indices (0, 1, 2...).

Step 2.2: Generate Components (Iterative)

For EACH task index (starting from 0):

  1. Generate Prompt:

    node scripts/coderio-skill.mjs code-prompt 0 > scripts/code-prompt.md
    # Replace '0' with current task index
    
  2. AI Task (Code):

    • ATTACH: process/thumbnail.png (MANDATORY)
    • READ: scripts/code-prompt.md
    • INSTRUCTION: "Generate the React component code. Match the thumbnail EXACTLY. Use STRICT text content from input data, do not hallucinate."
    • SAVE: Paste the code block into scripts/code-output.txt.
  3. Save Code:

    node scripts/coderio-skill.mjs save-code 0
    # Replace '0' with current task index
    

Step 2.3: Final Integration

Inject the root component into App.tsx. Use the path found in the last task of Phase 2.1.


Troubleshooting

  • "Props validation failed": The AI generated empty props. Check if process/thumbnail.png was attached and visible to the AI. Retry the props generation step.
  • "Module not found": Ensure node scripts/coderio-skill.mjs save-code was run for the child component before the parent component. Phase 2
자주 묻는 질문

시작하기 전에 무엇이 필요한가요?

Figma 개인 액세스 토큰, Node.js 18 이상, 설정 중에 설치되는 coderio 도구가 필요합니다.

어떤 스택으로 만드나요?

Vite와 Tailwind CSS 4 버전을 사용하는 React 및 TypeScript 코드를 만듭니다.

새 프로젝트도 만들어 주나요?

네. 생성된 코드를 위한 새 프로젝트 구조를 만드는 선택 단계가 있습니다.

상세 정보

작성자의 원본 설명

Pixel-perfect Figma to React conversion using coderio. Generates production-ready code (TypeScript, Vite, TailwindCSS V4) with high visual fidelity. Features robust error handling, checkpoint recovery, and streamlined execution via helper script.

repo: davila7/claude-code-templates

인기도

GitHub 스타
33k
순위
#8719
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬