/figma-react:figma-component-syncfrom figma-react
Compares a React component against its Figma design source to identify differences. Use when reviewing component implementations, syncing designs, auditing visual accuracy, or updating components to match new Figma designs.
Ships in figma-react. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill checks a component's implementation against its Figma design source and helps you decide which differences to accept, ignore, or implement.
README.md with a Figma link in the format:
## Figma Source
https://www.figma.com/design/{fileKey}/{fileName}?node-id={nodeId}&m=dev
┌─────────────────────────────────────────────────────────────────┐
│ 1. FETCH - Get Figma design context and current component code │
├─────────────────────────────────────────────────────────────────┤
│ 2. TRACE DEPENDENCIES - Identify internal components used │
├─────────────────────────────────────────────────────────────────┤
│ 3. ANALYZE - Compare design vs implementation (all files) │
├─────────────────────────────────────────────────────────────────┤
│ 4. REVIEW - User decides: implement, ignore, or accept each │
├─────────────────────────────────────────────────────────────────┤
│ 5. APPLY - Implement approved changes │
├─────────────────────────────────────────────────────────────────┤
│ 6. TEST - Verify implementation matches Figma │
└─────────────────────────────────────────────────────────────────┘
Given a component path (e.g., packages/client/src/components/inline-edit/EditableText):
Create output directory:
.temp/component-updates/{component-name}/
Find and read the component's README.md to extract Figma link
Check parent folder for additional README.md with relevant Figma context
Fetch Figma design context using mcp_figma_get_design_context:
fileKey and nodeId from the Figma URL.temp/component-updates/{component-name}/figma-context.mdRead current component implementation:
.tsx).temp/component-updates/{component-name}/current-implementation.mdIdentify internal components that may implement Figma-specified styles:
Parse imports from the main component file:
../BaseEditable, ../EditControls)react, lucide-react, @/components/ui/*)For each internal dependency:
Map Figma properties to responsible files:
Save dependency analysis to .temp/component-updates/{component-name}/dependencies.md:
# Dependency Analysis: {ComponentName}
## Internal Dependencies
| Component | Path | Has Figma Source? |
|-----------|------|-------------------|
| BaseEditable | ../BaseEditable | Yes (node 1252-9022) |
| EditControls | ../EditControls | No |
## Property Ownership Map
| Figma Property | Responsible File | Current Value |
|----------------|------------------|---------------|
| Label-Content Gap | BaseEditable.tsx | gap-1 (4px) |
| Content Padding | BaseEditable.tsx | py-0.5 (2px) |
| Button Shadow | EditControls.tsx | shadow-sm |
| Input Border | EditableText.tsx | border-input |
Create .temp/component-updates/{component-name}/comparison.md:
IMPORTANT: Only include differences and decisions. Do NOT include:
# Component Comparison: {ComponentName}
> Figma: https://www.figma.com/design/...?node-id=...
## Differences
### 📁 {ComponentName}.tsx
#### 1. Border color
- **Figma:** `border-gray-300`
- **Code:** `border-input`
- **Impact:** Low
**Decision:**
- [ ] 🔧 IMPLEMENT
- [ ] ✅ ACCEPT - Reason:
- [ ] ⏭️ SKIP
---
### 📁 BaseEditable.tsx (dependency)
#### 1. Label-Content Gap
- **Figma:** `0px` (no gap)
- **Code:** `gap-1` (4px)
- **Impact:** Medium
**Decision:**
- [ ] 🔧 IMPLEMENT
- [ ] ✅ ACCEPT - Reason:
- [ ] ⏭️ SKIP
#### 2. Content Padding
- **Figma:** `py-2` (8px)
- **Code:** `py-0.5` (2px)
- **Impact:** Medium
**Decision:**
- [ ] 🔧 IMPLEMENT
- [ ] ✅ ACCEPT - Reason:
- [ ] ⏭️ SKIP
---
## Previously Accepted
| Category | Figma | Code | File | Reason |
|----------|-------|------|------|--------|
| Width | fixed | `w-full` | {ComponentName}.tsx | Container flexibility |
Prompt the user to:
comparison.md fileUse this prompt format:
📋 Component sync analysis complete!
Found differences in {N} files:
- {ComponentName}.tsx: {n} differences
- BaseEditable.tsx (dependency): {n} differences
- EditControls.tsx (dependency): {n} differences
Please review and make decisions:
1. Open: `.temp/component-updates/{component-name}/comparison.md`
2. For each difference, choose: IMPLEMENT, ACCEPT, or SKIP
3. Save the file
4. Tell me to apply the decisions
After user completes review:
Important: When changing dependency files (like BaseEditable), consider:
.temp/component-updates/{component-name}/
├── figma-context.md # Raw Figma MCP output
├── dependencies.md # Internal dependency analysis & property mapping
├── technical-comparison.md # Side-by-side property comparison
├── decisions.md # Grouped changes with decision checkboxes
└── implementation-plan.md # Generated after review (if changes needed)
Components should document accepted differences in their README:
# ComponentName
Description...
## Figma Source
https://www.figma.com/design/...
## Accepted Design Differences
| Category | Figma | Implementation | File | Reason |
|----------|-------|----------------|------|--------|
| Width | Fixed 200px | `w-full` | EditableText.tsx | Container flexibility |
| Gap | 0px | `gap-1` (4px) | BaseEditable.tsx | Visual breathing room |
| Shadow | `shadow-lg` | `shadow-sm` | EditControls.tsx | Subtler appearance |
When tracing dependencies, include a component if:
It's imported from a relative path within the same component family
import { BaseEditable } from '../BaseEditable'import { EditControls } from '../EditControls'import { Button } from '@/components/ui/button' (external UI lib)import { cn } from '@/lib/utils' (utility, not component)It renders visual elements (not just hooks or utilities)
It implements styling that corresponds to Figma properties:
When determining which file "owns" a Figma property:
| Figma Element | Usually Owned By |
|---|---|
| Label styling | Base/wrapper component |
| Content area styling | Base/wrapper component |
| Edit mode container | Target component |
| Input field styling | Target component |
| Save/Cancel buttons | Controls component |
| Hover states | Base/wrapper component |
| Focus rings | Usually the focused element's component |
Check a single component:
Check the EditableText component against its Figma design
Check all inline-edit components:
Check all components in packages/client/src/components/inline-edit/ against their Figma designs
Apply decisions after review:
Apply the figma sync decisions for EditableText
After generating comparison.md, provide these follow-up prompts:
@workspace Read .temp/component-updates/{component-name}/comparison.md and implement all changes marked as IMPLEMENT
@workspace Read .temp/component-updates/{component-name}/comparison.md and add all ACCEPT decisions to the component's README.md
| Category | Figma Property | Code Equivalent |
|---|---|---|
| Colors | Fill colors | bg-*, text-*, CSS colors |
| Typography | Font size/weight | text-*, font-* |
| Spacing | Auto layout gaps | gap-*, space-*, p-*, m-* |
| Borders | Stroke | border-*, ring-* |
| Shadows | Effects | shadow-* |
| Corners | Corner radius | rounded-* |
| Sizing | Width/Height | w-*, h-*, min-*, max-* |
mcp_figma_whoami to check auth statusWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub bitovi/ai-enablement-prompts --plugin figma-react4 skills in this plugin
/figma-connect-componentGenerate Figma Code Connect mappings that link React components to their Figma counterparts. Use when a component exists in code and needs a Code Connect file so Figma shows real code snippets in Dev Mode. Also triggers on phrases like "connect this component to Figma", "generate Code Connect", "publish to Figma", "add figma.connect for this component", "link this to Figma Dev Mode"./figma-design-reactDesign React components from Figma files. Use when given a Figma URL to analyze a design and propose React component architecture, props API, and variant handling. Outputs design analysis and suggested API - does not build components./figma-Other plugins' skills for the same job