npx claudepluginhub ravnhq/ai-toolkitThis skill is limited to using the following tools:
Convert Figma component designs into production-ready React components with full design token integration, accessibility support via React Aria, and comprehensive documentation. Works with any design token system (SCSS variables, CSS custom properties, Tailwind, or JavaScript tokens).
references/component-patterns.mdreferences/figma-property-conventions.mdreferences/props-template.mdreferences/spec-driven-development.mdreferences/token-mapping-guide.mdrules/_sections.mdrules/aria-focus-visible-only.mdrules/aria-use-react-aria-hooks.mdrules/naming-bem-methodology.mdrules/tokens-never-hardcode.mdrules/tokens-use-semantic-names.mdExtracts components and design tokens from Figma, converts designs to React components, exports tokens as CSS/JSON, and automates design-to-code sync. Ideal for React apps using Figma designs.
Generates production-ready React, Vue, or HTML/CSS code from Figma components or frames via Figma MCP server with Code Connect support. For design-to-code workflows.
Translates Figma designs into production-ready UI code with 1:1 visual fidelity using MCP server. Use for Figma node URLs, selections, or 'implement design' requests.
Share bugs, ideas, or general feedback.
Convert Figma component designs into production-ready React components with full design token integration, accessibility support via React Aria, and comprehensive documentation. Works with any design token system (SCSS variables, CSS custom properties, Tailwind, or JavaScript tokens).
react-aria and react-stately installedOn first use in a project, discover the local configuration before generating code. Search the codebase to determine:
Token import path — Where tokens are imported from. Search for existing token files:
@import 'styles/tokens' or @import 'path/to/variables'@import 'tokens.css' or custom properties in :roottailwind.config.ts theme extensionimport { tokens } from './tokens'Component output directory — Where components live (e.g., src/components/)
Stories directory — Where Storybook stories live (e.g., stories/ or co-located)
Styling approach — SCSS modules, CSS modules, Tailwind utility classes, styled-components, etc.
Icon/asset strategy — Project icon library location and import convention
Cache these findings for the session. If unsure about any setting, ask the user before generating code.
Follow these phases in order:
Use Figma MCP tools to gather component information:
Figma:get_design_context(fileKey, nodeId) # Component structure and tokens
Figma:get_variable_defs(fileKey, nodeId) # Variable definitions for token mapping
Figma:get_screenshot(fileKey, nodeId) # Visual reference
What to extract:
If the project has existing tokens: Cross-reference Figma variables to the project's token system using references/token-mapping-guide.md.
If the project has NO token files: Extract tokens directly from Figma and generate token files. See references/token-mapping-guide.md § "Extracting Tokens from Figma" for the full workflow:
get_variable_defs to pull all variable collections from the Figma fileToken categories to map (or generate):
Important: Use the project's token variable names, never raw values (see rules/tokens-never-hardcode.md).
Create props documentation following references/props-template.md.
Required sections:
Prop naming: Follow conventions in references/figma-property-conventions.md.
Create the component following references/component-patterns.md.
Requirements:
rules/aria-use-react-aria-hooks.md)rules/naming-bem-methodology.md):focus-visible (see rules/aria-focus-visible-only.md)Create the stylesheet using the project's token system.
Structure:
:hover, :active, :disabled, :focus-visible)rules/tokens-use-semantic-names.md)Generate Storybook documentation showing all variants:
aria-label, aria-labelledby, aria-describedby)After implementation, validate:
The Figma MCP sometimes generates temporary files during extraction:
Deliver all artifacts in this order:
Props Documentation ([ComponentName]-props.md)
React Component ([ComponentName].tsx)
Styles ([ComponentName].[scss|module.scss|css])
Storybook Story ([ComponentName].stories.tsx)
See rules index for token, accessibility, and naming rules.
User: "Convert this Figma button component to React with all its variants and states."
Expected behavior: Use figma-to-react-components guidance — extract Figma context via MCP, map tokens, generate typed React component with React Aria, create styles using project tokens, and produce Storybook story.
User: "Write unit tests for this payment service."
Expected behavior: Do not prioritize figma-to-react-components; choose a more relevant skill or proceed without it.
references/token-mapping-guide.md. If no token files exist, extract tokens from Figma using get_variable_defs and generate token files — see references/token-mapping-guide.md § "Extracting Tokens from Figma".rules/aria-use-react-aria-hooks.md. For complex components, compose multiple hooks or use useFocusRing as a baseline./* TODO */ comment.get_design_context and rebuild props from actual Figma component definitions. Follow naming conventions in references/figma-property-conventions.md.