Guides design-to-code workflow using Figma integration. Helps extract designs, analyze components, and generate implementation specs. Auto-activates when users mention Figma URLs, design implementation, component conversion, or design-to-code workflows. Works with /ccpm:plan, design-approve, design-refine, and /ccpm:figma-refresh commands.
Generates implementation specs from Figma designs with automated component analysis and design-to-code workflow.
/plugin marketplace add duongdev/ccpm/plugin install ccpm@duongdev-ccpm-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Transform Figma designs into implementation-ready specifications with CCPM's design-to-code workflow.
This skill auto-activates when:
/ccpm:plan (starts design process)/ccpm:plan (refine designs)/ccpm:plan (generate specs)/ccpm:figma-refresh (refresh cached designs)Command: /ccpm:plan ISSUE-ID
Start the design process by attaching Figma links to your Linear issue:
1. Create/update Linear issue with task description
2. Attach Figma design link in issue description
3. Run /ccpm:plan TASK-123
4. CCPM extracts design metadata and creates options
What happens:
Example:
/ccpm:plan PSN-123
ā
Detected Figma link: https://figma.com/file/ABC123/UserDashboard
š¦ Design Analysis:
- 12 frames found
- 15 components detected
- Color palette: 8 colors
- Typography: 4 font families
- Spacing pattern: 4px, 8px, 16px grid
Ready for design review. Run: /ccpm:plan PSN-123
Command: /ccpm:plan ISSUE-ID [OPTION] [FEEDBACK]
Iterate on designs based on feedback:
1. Review design options from Phase 1
2. Provide feedback or request changes
3. Run /ccpm:plan TASK-123 "feedback"
4. CCPM creates refined design options
What happens:
Example:
/ccpm:plan PSN-123 1 "Make the buttons larger, use primary color"
šØ Refining Design Option 1...
Changes applied:
- Button height: 36px ā 44px
- Button color: #6366F1 ā primary color
- Button spacing: 12px ā 16px
Preview: [design-option-1-v2]
Ready for approval? Run: /ccpm:plan PSN-123 1
Command: /ccpm:plan ISSUE-ID OPTION-NUMBER
Approve final design and generate implementation specifications:
1. Review refined design options
2. Choose best option
3. Run /ccpm:plan TASK-123 1
4. CCPM generates comprehensive specs
What happens:
Example:
/ccpm:plan PSN-123 1
ā
Design Approved!
Generated Implementation Specs:
š Component Specifications
š Styling Guidelines
š Responsive Rules
š Accessibility Checklist
Specs saved to: https://linear.app/doc/ABC123
Ready for implementation!
Command: /ccpm:figma-refresh ISSUE-ID
Refresh cached design data when designs change:
1. Update Figma designs
2. Run /ccpm:figma-refresh TASK-123
3. CCPM re-extracts design data
4. Cache is updated with latest designs
When to refresh:
Component Structure:
Dashboard
āāā Header
ā āāā Logo
ā āāā Navigation
ā āāā UserMenu
āāā Sidebar
ā āāā NavItems
ā āāā UserProfile
āāā MainContent
āāā Cards
āāā Charts
Design Tokens:
Component Metadata:
CCPM automatically identifies:
Example detection:
Frame: "Button / Primary / Large"
āāā Detection: UI Component (Button)
āāā Style: Primary (blue)
āāā Size: Large (44px height)
āāā State: Default
āāā Variations: [Hover, Active, Disabled]
When you approve a design, CCPM creates specs including:
1. Component Definition
Component: PrimaryButton
Props:
- label: string (required)
- size: "sm" | "md" | "lg" (default: "md")
- disabled: boolean (default: false)
- onClick: () => void
- icon?: React.ReactNode
State:
- loading: boolean
- hover: boolean
- focus: boolean
2. Visual Specifications
Sizing:
- Small: 32px height
- Medium: 40px height
- Large: 44px height
Spacing:
- Horizontal padding: 16px
- Vertical padding: 8px
Typography:
- Font: Inter
- Weight: 600 (semibold)
- Size: 14px
Colors:
- Background: #6366F1
- Text: #FFFFFF
- Hover: #4F46E5
3. Responsive Rules
Breakpoints:
- Mobile (< 768px): Single column
- Tablet (768px - 1024px): Two columns
- Desktop (> 1024px): Three columns
Mobile adjustments:
- Button height: 40px ā 36px
- Padding: 16px ā 12px
- Font size: 14px ā 12px
4. Accessibility Checklist
WCAG 2.1 AA Compliance:
- [ ] Color contrast ratio ā„ 4.5:1 for text
- [ ] Button hit target ā„ 44x44px
- [ ] Focus indicators visible
- [ ] ARIA labels for icons
- [ ] Keyboard navigation support
Start the workflow:
1. Create Linear issue: PSN-100 "Design primary button"
2. Add Figma link to issue description:
https://figma.com/file/ABC123/Components?node-id=15:2
3. Run: /ccpm:plan PSN-100
Design phase output:
ā
Design Analysis Complete
Component: Button / Primary
āāā Size: 44px height
āāā Color: #6366F1
āāā Typography: Inter, 600, 14px
āāā States: Default, Hover, Active, Disabled
Generated specs location: [Linear Document]
Ready for implementation.
Developer implements:
export function PrimaryButton({ label, onClick }) {
return (
<button
onClick={onClick}
className="h-11 px-4 bg-indigo-600 text-white font-semibold
rounded hover:bg-indigo-700 focus:outline-none
focus:ring-2 focus:ring-indigo-500"
>
{label}
</button>
);
}
Complex multi-component design:
1. Create issue: PSN-200 "Design dashboard page"
2. Add Figma file: https://figma.com/file/XYZ789/Dashboard
3. Run: /ccpm:plan PSN-200
Analysis reveals:
ā
Design Analysis Complete
Components detected: 12
āāā Header (1)
āāā Sidebar (1)
āāā Cards (5)
āāā Charts (3)
āāā Tables (2)
Color palette:
āāā Primary: #6366F1
āāā Secondary: #EC4899
āāā Neutral: #F3F4F6 - #1F2937
āāā Success: #10B981
Typography:
āāā Display: Space Mono
āāā Body: Inter
āāā Code: Monaco
Generated breakdown: [Linear Document]
Recommended approach:
1. Build layout shell (Header + Sidebar)
2. Implement card components
3. Add data visualization
4. Connect to API
Design refinement:
/ccpm:plan PSN-200 1 "Increase sidebar width to 280px,
make cards taller"
ā
Refined Design Option 1
Adjustments:
- Sidebar width: 240px ā 280px
- Card height: 220px ā 280px
- Card padding: 16px ā 20px
- Grid gap: 16px ā 20px
Side-by-side comparison: [View]
Ready for approval!
Final approval:
/ccpm:plan PSN-200 1
ā
Dashboard Design Approved!
Implementation specs generated:
š Layout Specification (Header, Sidebar, Grid)
š Card Component Specs (5 variations)
š Chart Integration Guide
š Responsive Breakpoints
š Accessibility Requirements
Linear Document: [docs/specs/dashboard-implementation]
Next: Run /ccpm:work PSN-200
Scenario: Design changed mid-implementation
Situation:
- Approved design shows 3-column layout
- Designer changes it to 2-column layout
- Specs are now outdated
Solution:
1. Update Figma file with new layout
2. Run: /ccpm:figma-refresh PSN-300
3. Specs automatically update
Cache refresh process:
/ccpm:figma-refresh PSN-300
š Refreshing Figma cache...
Changes detected:
- ā
Layout changed: 3-column ā 2-column
- ā
Card sizes updated
- ā
Color palette modified (1 color added)
- ā
Typography updated
Updated specs: [Linear Document]
Notified: Design changes affect layout components
Action items:
- Review responsive breakpoints
- Update card widths
- Check new color usage
Organize your Figma file
Keep designs up-to-date
Use descriptive Figma links
/file/ABC123?node-id=15:2Attach Figma links to Linear issues
Review extracted specs
Don't implement without approved specs
Don't ignore cache invalidation
Don't use vague frame names
Don't skip accessibility specs
Don't bypass refinement phase
CCPM caches Figma data to provide instant access:
Cache storage:
Cache includes:
Example cache entry:
## šØ Figma Design Cache (PSN-123)
Design File: Dashboard.fig
Cached: 2025-11-21 14:30:00 UTC
Expires: 2025-11-21 15:30:00 UTC
Server: figma-repeat
Components: 12
Colors: 8
Typography: 4 styles
Spacing grid: [4, 8, 16, 32]px
Status: ā
Valid cache
Action: Use `figma-refresh` to update
Cache automatically invalidates if:
figma-refreshWhat happens when cache expires:
CCPM respects Figma API rate limits:
Official Figma API (6 calls/month):
Community servers (60 calls/hour):
Check rate limit status:
/ccpm:figma-refresh PSN-123 --status
š Figma Rate Limit Status
Official API: 4/6 used (66%)
Community (figma-repeat): 42/60 used (70%)
Recommendation: Use community server to preserve official API calls
/ccpm:plan
/ccpm:plan
/ccpm:plan
/ccpm:work
/ccpm:sync
/ccpm:figma-refresh
/ccpm:work
Problem: Figma link not found in issue
Solutions:
Verify link is in issue description
Add to issue: https://figma.com/file/ABC123/Project
Check link format
ā
Correct: https://figma.com/file/ABC123/Project
ā Wrong: figma.com/file (missing protocol)
Try explicit link parameter
/ccpm:plan PSN-123 --figma-url "https://..."
Problem: Design colors not in generated specs
Solutions:
Ensure colors are defined in Figma file
Refresh cache
/ccpm:figma-refresh PSN-123
Check server configuration
/ccpm:figma-refresh PSN-123 --status
Problem: Too many Figma API calls
Solutions:
Switch to community server (higher limits)
Wait for rate limit reset
Use cached data
figma-refresh only when neededProblem: Linear Document creation failed
Solutions:
Check Linear permissions
Try again with larger issue ID
/ccpm:plan PSN-123 1 --retry
Check cache validity
/ccpm:figma-refresh PSN-123
This skill enables:
Typical workflow time:
Key commands:
/ccpm:plan PSN-123 # Start design
/ccpm:plan PSN-123 # Iterate
/ccpm:plan PSN-123 1 # Generate specs
/ccpm:figma-refresh PSN-123 # Refresh cache
Integration: Works with /ccpm:plan and /ccpm:figma-refresh commands
MCP Servers: Figma MCP (figma-repeat, figma-trainer-guru, etc.)
Linear Integration: Stores designs and specs in Linear Documents
Shared Module: Uses _shared-figma-detection.md for link detection
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.