figma-to-component

Convert Figma design URLs into React components with CSS, tests, and Storybook.

Updated Oct 17, 2025
One-click install
npx skills add https://github.com/gharam1234/trip --skill figma-to-component-gharam1234
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: figma-to-component
Source: https://github.com/gharam1234/trip/tree/main/.claude/skills/figma-to-component
Command: npx skills add https://github.com/gharam1234/trip --skill figma-to-component-gharam1234

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill analyzes Figma design URLs to generate a full React component scaffold, including code, styles, tests, and Storybook setup, reducing manual coding time.

Core Features & Use Cases

  • Parse Figma URL to extract fileKey and nodeId
  • Generate component structure: index.tsx, styles.module.css, tests/, stories/
  • Provide a complete TDD-friendly workflow with tests and Storybook
  • Support automated generation aligned with project rules and conventions

Quick Start

Provide a Figma URL and a component name; the Skill will scaffold a new component under src/components/YourComponent with index.tsx, styles.module.css, tests/, and stories/.

Frequently Asked Questions about figma-to-component

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I auto-generate React components from Figma designs?

Auto-generate React components by providing a Figma design URL. The Skill converts the design into a complete component scaffold with index.tsx, CSS Modules, TypeScript types, Playwright tests, and Storybook stories, enforcing project conventions like Flexbox layouts and data-testid attributes.

Can I generate React components with tests and Storybook in a TDD workflow?

Yes. The Skill scaffolds components with a complete TDD setup: unit tests, Playwright UI tests, and Storybook stories. It generates the full directory structure including test files and story files alongside your component code.

What does the generated React component structure include?

Generated components include index.tsx with TypeScript types, styles.module.css using CSS Modules and Flexbox, a tests/ directory with Playwright tests and binding tests, and a stories/ directory for Storybook documentation.

How do I update an existing component from a changed Figma design?

Provide the updated Figma design URL to regenerate the component. The Skill re-applies your project rules and validates visual fidelity against the Figma reference, keeping your component synchronized with design changes.

What project conventions does the code generation enforce?

The Skill enforces CSS Modules with Flexbox layouts, avoids absolute positioning, adds data-testid attributes for testing, generates TypeScript types, and emits a standard component directory structure compatible with your project rules.