figma-generate-component
Generate production-ready code from a Figma component or frame using the Figma MCP server
What this skill does
# Generate Component from Figma
## Name
figma:figma-generate-component - Generate production-ready code from Figma designs
## Synopsis
Convert Figma frames and components into production code (React, Vue, HTML/CSS) using the Figma Desktop MCP server with support for Code Connect mappings and design tokens.
## Description
You are tasked with generating production-ready code from a Figma design using the Figma MCP server. This command bridges the design-to-code workflow by analyzing Figma frames and converting them into semantic, accessible, framework-specific components.
## Implementation
Uses the Figma Desktop MCP server (HTTP transport at `http://127.0.0.1:3845/mcp`) to access selected frames or node IDs from Figma URLs. Leverages Code Connect mappings when available to prefer design system components over generating code from scratch.
## Input Methods
The user can provide Figma context in two ways:
1. **Selection-based**: User has selected a frame in Figma desktop app
2. **Link-based**: User provides a Figma URL with node ID
## Your Task
1. **Understand the Context**:
- If the user selected a frame in Figma, access it via MCP
- If the user provided a URL, extract the node ID and access the design
- If neither is provided, ask the user to either:
- Select a frame in Figma and try again, OR
- Provide a Figma URL with a node ID
2. **Analyze the Design**:
- Use Figma MCP tools to extract the frame structure
- Identify components, layout, styling, and content
- Note any design tokens or variables used
- Check for Code Connect mappings if available
3. **Generate Code**:
- Ask the user what framework/language they want (React, Vue, HTML/CSS, etc.)
- Generate clean, production-ready code that matches the design
- Use semantic HTML and accessible markup
- Apply proper component patterns for the target framework
- Use design system components if Code Connect mappings exist
- Include comments explaining key decisions
4. **Provide Context**:
- Explain the component structure
- Note any design tokens that should be added to the design system
- Suggest any improvements or accessibility enhancements
- Mention responsive behavior considerations
## Best Practices
- **Semantic HTML**: Use appropriate HTML elements (nav, main, article, etc.)
- **Accessibility**: Include ARIA labels, proper heading hierarchy, keyboard navigation
- **Design Tokens**: Use variables for colors, spacing, typography when possible
- **Component Composition**: Break complex UIs into smaller, reusable components
- **Responsive Design**: Consider mobile, tablet, desktop breakpoints
- **Code Connect**: Prefer mapped components over generating from scratch
## Example Output Format
When generating a React component, structure it like:
```tsx
// ComponentName.tsx
import React from 'react';
import { DesignSystemButton } from '@/components/Button'; // Using Code Connect mapping
interface ComponentNameProps {
// Props based on Figma variants
}
/**
* ComponentName - Brief description
*
* Figma: [Link to Figma frame]
* Design tokens used: --color-primary, --spacing-md, --font-heading
*/
export const ComponentName: React.FC<ComponentNameProps> = ({ ...props }) => {
return (
// JSX matching Figma layout
);
};
```
## Validation
Before finishing:
1. Verify the code compiles/is valid syntax
2. Check that layout matches Figma design
3. Ensure all interactive elements are accessible
4. Confirm design tokens are properly referenced
5. Note any missing assets or resources needed
## Notes
- If the Figma MCP server is not connected, provide setup instructions
- If the frame is very complex, offer to break it into multiple components
- Always respect the user's framework preference
- Suggest testing in different viewports/screen sizes
Related 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.