From claude-dev-kit
Fetches Figma designs via API and generates a complete design deliverable: prototype HTML, design system, design philosophy, interactions, and copy guide. Supports web, mobile, and desktop platforms.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-dev-kit:figma2protoThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- AUTO-GENERATED by scripts/gen_skills.py — DO NOT EDIT. Edit SKILL.md.tmpl instead. -->
Run silently at the start:
python3 scripts/kit_update_check.py 2>/dev/null
If exit code is 1 (update available), show the output to the user once. Do not block the workflow.
Run these checks silently at the start. Use results to adapt behavior:
[ -f issues.md ] — if true, this project uses the sprint system. Respect issue numbering and STATUS.md.[ -f docs/sprint_state.md ] — if true and Status shows running, a sprint is active. Be aware of parallel work in worktrees.[ -f docs/prd_digest.md ] — if true, read it for quick project context before starting.gh auth status before any GitHub operation.At the start of this skill, check if contributor mode is enabled:
python3 scripts/kit_config.py get contributor_mode
If the result is true:
python3 scripts/contributor_report.py --skill <name> --step "<step>" --rating <N> --notes "<friction or suggestion>"
/uiux creates designs from scratch (PRD → design philosophy → design system → prototype).
/figma2proto starts from an existing Figma design and produces the same complete set of outputs — prototype, design system, design philosophy, interactions, and copy guide — so the downstream pipeline (/implement, /review, /ship) works identically regardless of which skill was used.
The Figma design is the source of truth. This skill describes and supplements it, never contradicts it.
| Platform | Prototype | Design System | Other Docs |
|---|---|---|---|
| web (default) | prototype/ | docs/design_system.md | docs/design_philosophy.md, docs/wireframes.md, docs/interactions.md, docs/copy_guide.md |
--mobile | prototype-mobile/ | docs/design_system_mobile.md | docs/design_philosophy.md, docs/wireframes_mobile.md, docs/interactions_mobile.md, docs/copy_guide.md |
--desktop | prototype-desktop/ | docs/design_system_desktop.md | docs/design_philosophy.md, docs/wireframes_desktop.md, docs/interactions_desktop.md, docs/copy_guide.md |
docs/design_philosophy.md and docs/copy_guide.md are shared across platforms.
FIGMA_TOKEN environment variable (Figma → Settings → Account → Personal access tokens)docs/ux_spec.md and docs/requirements.md are optional but improve quality if present (from /kickoff)Parse $ARGUMENTS for platform flag and URLs:
--mobile or --platform mobile → mobile mode--desktop or --platform desktop → desktop modeIf no URLs found: ask the user for Figma frame URLs.
Run the fetch script:
python3 scripts/figma_fetch.py [--mobile|--desktop] <url1> <url2> ...
If the script exits with non-zero (FIGMA_TOKEN not set, invalid URL, API error):
STOP and report the error message to the user.
This outputs figma-export/design_data.json with:
platform: web/mobile/desktopplatform_config: output paths for this platformframes: node trees with all design propertiessummary: deduplicated colors, text styles, spacings, radii, shadowsRead figma-export/design_data.json.
Read existing project context (if available) — parallel Read:
docs/ux_spec.md, docs/requirements.md, docs/architecture.md (from /kickoff)docs/design_philosophy.md (if exists from a previous run — reuse rather than regenerate)If docs/design_philosophy.md already exists: read it, confirm it aligns with the Figma design, and skip to Phase 3. If it contradicts the Figma design, warn the user and ask whether to update.
If it doesn't exist: analyze the Figma design data and reverse-engineer the design philosophy:
docs/design_philosophy.md describing what the design IS, not what it should beCRITICAL: This is descriptive, not prescriptive. You are documenting the designer's decisions, not making your own. If the Figma design uses Inter font — document Inter, don't suggest a "more distinctive" alternative.
Generate the platform-appropriate design system file from extracted Figma values:
docs/design_system.mddocs/design_system_mobile.mddocs/design_system_desktop.mdContents (all derived from design_data.json):
Platform-specific additions:
Generate wireframes from the Figma frame structure:
docs/wireframes.mddocs/wireframes_mobile.mddocs/wireframes_desktop.mdFor each frame in design_data.json:
Generate interactions spec:
docs/interactions.mddocs/interactions_mobile.mddocs/interactions_desktop.mdFigma is static — it doesn't contain animations, transitions, or state changes. Ask the user the following questions (present all at once):
a) "What loading states should screens show? (skeleton, spinner, or progressive?)" b) "What page transition style? (fade, slide, none?)" c) "Any drag-and-drop interactions?" d) "Any specific animation moments? (page load reveal, form submit, etc.)" e) "If any of these are hard to answer, say 'skip' and I'll use sensible defaults."
If user skips: derive reasonable defaults from the design philosophy and document them. Write the interactions spec with all states (default, loading, empty, error) per screen.
docs/copy_guide.md:
text_content fields in TEXT nodes)Read platform_config from design_data.json to determine output paths.
Ensure prototype directory and screens subdirectory exist.
Generate or update styles file (CSS for web, theme file for mobile/desktop):
For each frame, ask the figma-converter agent to generate a screen file:
prototype/screens/<name>.html — semantic HTML, Google Fonts, file:// compatibleprototype-mobile/src/screens/<name>.tsx — React Native componentsprototype-desktop/src/screens/<name>.html — Electron/Tauri compatible HTMLGenerate index/navigation file:
prototype/index.htmlprototype-mobile/App.tsxprototype-desktop/index.htmlArtifact check: Grep prototype files for Figma artifacts (position: absolute on layout elements, hardcoded hex that should be tokens). Fix any findings.
Value accounting: Cross-check summary values against output. No value should silently disappear.
Content check: Verify Figma text content appears in the output.
Doc completeness: Verify all expected docs exist for the platform.
Present deliverables to the user:
open prototype/index.html (or platform equivalent) to view/implement — the developer will match these prototypes."FIGMA_TOKEN not set: stop, provide setup instructions./uiux would, so downstream skills work identically.npx claudepluginhub pillip/claude-dev-kit --plugin claude-dev-kitUse this skill when the user has a Figma design and wants to turn it into a working prototype, asks "how do I turn my Figma into a prototype", "Figma to code", "take this design and make it interactive", or wants to use AI coding tools to implement a design that already exists in Figma.
Establishes a design philosophy from kickoff outputs and generates a design system, wireframes, and HTML prototypes. Run /kickoff first.
Bridges Designpowers specs and Figma in both directions: pushes visual decisions or code into Figma frames, pulls Figma files in for review or design-system source. Falls back to HTML prototype when Figma is unavailable.