Figma Developer
Extract components from Figma, convert designs to React components, sync design tokens, and generate code from designs. Bridge the gap between design and code with automated workflows.
What this skill does
# Figma Developer
Turn Figma designs into production-ready code.
## Core Principle
**Design is the single source of truth.**
Designers work in Figma. Developers build from Figma. The bridge between them should be automated, not manual.
---
## Phase 1: Setup & Authentication
### Get Figma Access Token
1. Go to [Figma Settings](https://www.figma.com/settings)
2. Scroll to "Personal access tokens"
3. Click "Generate new token"
4. Name it (e.g., "Development")
5. Copy and save securely
### Environment Setup
```bash
# .env
FIGMA_ACCESS_TOKEN=figd_...
```
### Install Figma Client
```bash
npm install node-fetch
```
### Test Connection
```typescript
import { FigmaClient } from '@/integrations/design-tools/figma/client'
const client = new FigmaClient({
accessToken: process.env.FIGMA_ACCESS_TOKEN
})
// Test with a public file
const file = await client.getFile('abc123xyz')
console.log('Connected! File:', file.name)
```
---
## Phase 2: Extract Design Tokens
### What Are Design Tokens?
Design tokens are design decisions (colors, typography, spacing) stored as code.
**Benefits:**
- Single source of truth
- Consistent across platforms
- Easy to update
- Type-safe
### Extract Tokens from Figma
```typescript
// scripts/sync-design-tokens.ts
import { FigmaClient } from '@/integrations/design-tools/figma/client'
import fs from 'fs/promises'
async function syncDesignTokens() {
const client = new FigmaClient()
const fileKey = 'YOUR_FIGMA_FILE_KEY'
console.log('Extracting design tokens...')
// Extract tokens
const tokens = await client.extractDesignTokens(fileKey)
console.log(`Found:`)
console.log(` ${tokens.colors.length} colors`)
console.log(` ${tokens.typography.length} text styles`)
console.log(` ${tokens.spacing.length} spacing values`)
// Export as CSS
const css = await client.exportTokensAsCSS(fileKey)
await fs.writeFile('src/styles/design-tokens.css', css)
// Export as JSON
const json = await client.exportTokensAsJSON(fileKey)
await fs.writeFile('src/styles/design-tokens.json', json)
console.log('Design tokens synced!')
}
syncDesignTokens()
```
### Use Tokens in Code
```typescript
// src/styles/design-tokens.css
:root {
/* Colors */
--color-primary: #0066cc;
--color-secondary: #10b981;
--color-neutral-100: #f9fafb;
--color-neutral-900: #111827;
/* Typography */
--font-heading-family: Inter;
--font-heading-size: 48px;
--font-heading-weight: 700;
/* Spacing */
--space-4: 16px;
--space-8: 32px;
}
```
**Usage in React:**
```tsx
// components/Button.tsx
export function Button({ children }: { children: React.ReactNode }) {
return (
<button
style={{
backgroundColor: 'var(--color-primary)',
color: 'white',
padding: 'var(--space-4)',
fontFamily: 'var(--font-heading-family)',
fontWeight: 'var(--font-heading-weight)',
border: 'none',
borderRadius: '8px',
cursor: 'pointer'
}}
>
{children}
</button>
)
}
```
---
## Phase 3: Export Assets
### Export Icons as SVG
```typescript
// scripts/export-icons.ts
import { FigmaClient } from '@/integrations/design-tools/figma/client'
import fs from 'fs/promises'
async function exportIcons() {
const client = new FigmaClient()
const fileKey = 'YOUR_FIGMA_FILE_KEY'
// Get file
const file = await client.getFile(fileKey)
// Find "Icons" frame
const iconsFrame = findNode(file.document, 'Icons')
if (!iconsFrame || !iconsFrame.children) {
throw new Error('Icons frame not found')
}
console.log(`Found ${iconsFrame.children.length} icons`)
// Export as SVG
const iconIds = iconsFrame.children.map(child => child.id)
const svgs = await client.exportImages(fileKey, iconIds, {
format: 'svg'
})
// Save each SVG
for (const svg of svgs) {
const response = await fetch(svg.url)
const content = await response.text()
await fs.writeFile(`public/icons/${svg.name}.svg`, content)
console.log(` ✓ ${svg.name}.svg`)
}
console.log('Icons exported!')
}
function findNode(node: any, name: string): any {
if (node.name === name) return node
if (node.children) {
for (const child of node.children) {
const found = findNode(child, name)
if (found) return found
}
}
return null
}
exportIcons()
```
### Generate React Icon Components
```typescript
// scripts/generate-icon-components.ts
import { FigmaClient } from '@/integrations/design-tools/figma/client'
import fs from 'fs/promises'
async function generateIconComponents() {
const client = new FigmaClient()
const fileKey = 'YOUR_FIGMA_FILE_KEY'
const file = await client.getFile(fileKey)
const iconsFrame = findNode(file.document, 'Icons')
if (!iconsFrame || !iconsFrame.children) {
throw new Error('Icons frame not found')
}
// Export icons
const iconIds = iconsFrame.children.map(child => child.id)
const svgs = await client.exportImages(fileKey, iconIds, {
format: 'svg'
})
// Generate React components
for (const svg of svgs) {
const response = await fetch(svg.url)
const svgContent = await response.text()
// Convert to React component
const componentName = toPascalCase(svg.name)
const component = `
import React from 'react'
export function ${componentName}Icon(props: React.SVGProps<SVGSVGElement>) {
return (
${svgContent.replace('<svg', '<svg {...props}')}
)
}
`.trim()
await fs.writeFile(`components/icons/${componentName}Icon.tsx`, component)
console.log(` ✓ ${componentName}Icon.tsx`)
}
// Generate index file
const indexContent = svgs
.map(svg => {
const componentName = toPascalCase(svg.name)
return `export { ${componentName}Icon } from './${componentName}Icon'`
})
.join('\n')
await fs.writeFile('components/icons/index.ts', indexContent)
console.log('Icon components generated!')
}
function toPascalCase(str: string): string {
return str
.split(/[-_\s]+/)
.map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
.join('')
}
function findNode(node: any, name: string): any {
if (node.name === name) return node
if (node.children) {
for (const child of node.children) {
const found = findNode(child, name)
if (found) return found
}
}
return null
}
generateIconComponents()
```
**Usage:**
```tsx
import { HomeIcon, UserIcon, SettingsIcon } from '@/components/icons'
export function Navigation() {
return (
<nav>
<HomeIcon width={24} height={24} />
<UserIcon width={24} height={24} />
<SettingsIcon width={24} height={24} />
</nav>
)
}
```
---
## Phase 4: Component Generation
### Extract Component Structure
```typescript
// scripts/extract-components.ts
import { FigmaClient } from '@/integrations/design-tools/figma/client'
async function extractComponents() {
const client = new FigmaClient()
const fileKey = 'YOUR_FIGMA_FILE_KEY'
// Get components
const components = await client.getFileComponents(fileKey)
console.log('Components:')
for (const [key, component] of Object.entries(components)) {
console.log(` ${component.name}`)
console.log(` Key: ${component.key}`)
console.log(` Description: ${component.description}`)
}
// Get component sets (variants)
const componentSets = await client.getComponentSets(fileKey)
console.log('\nComponent Sets:')
for (const [setId, variants] of Object.entries(componentSets)) {
console.log(` Set: ${setId}`)
for (const variant of variants) {
console.log(` - ${variant.name}`)
}
}
}
extractComponents()
```
### Generate Button Component from Figma
```typescript
// scripts/generate-button.ts
import { FigmaClient } from '@/integrations/design-tools/figma/client'
import fs from 'fs/promises'
async function generateButtonComponent() {
const client = new FigmaClient()
const fileKey = 'YOUR_FIGMA_FILE_KEY'
// Get button component
const compoRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.