Implements Figma designs for Flutter with design token integration and optional example generation. Integrates Linear ticket context with Figma MCP tools.
This skill implements Figma designs from Linear tickets or direct Figma URLs into production-ready Flutter components.
KEPLR-1578) OR Figma URLexamples: widgetbook or none (if not provided, will ask user)Follow these steps in order. Do not skip steps or proceed without completing each one.
If Linear ticket ID provided:
[A-Z]+-\d+ (e.g., KEPLR-1578, LIN-123)mcp__linear__get_issue(id=":ticketId") to fetch ticket detailsIf Figma URL provided directly:
https://figma.com/design/:fileKey/:fileName?node-id=X-YOutput: Confirmed Figma URL to implement
examples parameter was provided via slash commandwidgetbook or noneOutput: Confirmed example generation preference
Parse Figma URL:
fileKey: segment after /design/ (or /branch/ if branch URL)nodeId: value of node-id query parameterX-Y ā X:Y for API callsFetch design context:
mcp__figma__get_design_context(
fileKey=":fileKey",
nodeId=":nodeId",
clientLanguages="dart",
clientFrameworks="flutter"
)
Fetch design screenshot:
mcp__figma__get_screenshot(
fileKey=":fileKey",
nodeId=":nodeId",
clientLanguages="dart",
clientFrameworks="flutter"
)
If design context is truncated:
mcp__figma__get_metadata(fileKey=":fileKey", nodeId=":nodeId") to get structureget_design_contextCheck for Code Connect mappings:
mcp__figma__get_code_connect_map(
fileKey=":fileKey",
nodeId=":nodeId"
)
Output: Full design context, screenshot, and any existing code mappings
Analysis:
Implementation Plan: Present a clear plan to user:
Component: [ComponentName]
Platform: Flutter
Files to create:
- packages/flutter/lib/src/components/dsp_[component_name].dart
- apps/widgetbook/lib/design_system/components/[component]/showcase/[component]_showcase.dart (if examples requested)
Files to modify:
- packages/flutter/lib/design_system_playground.dart (add export)
- apps/widgetbook/lib/main.dart (register showcase if examples requested)
Detected properties:
- Variants: [list]
- Sizes: [list]
- States: [list]
- Other props: [list]
Reference components:
- [Similar component 1]
- [Similar component 2]
CRITICAL: Ask user for confirmation before proceeding: "Does this plan look correct? Should I proceed with implementation?"
Output: User-approved implementation plan
Component Location: packages/flutter/lib/src/components/
Read reference patterns:
references/flutter-patterns.md for template and community standardsdsp_button.dart for structure../theme/dsp_theme.dart for theme access../../tokens.dart for available tokensCreate component file:
StatefulWidget pattern for interactive componentsDspTheme.of(context) for theme accessDspTokens.* for design tokens (NEVER hardcode values)AnimatedContainer for smooth transitionsExport component:
packages/flutter/lib/design_system_playground.dart:export 'src/components/dsp_component_name.dart';
Custom Rules:
references/implementation-rules.md for project-specific guidelinesOutput: Component file created and exported
For Widgetbook (Flutter):
Create showcase file: apps/widgetbook/lib/design_system/components/[component_name]/showcase/[component_name]_showcase.dart
Follow existing Widgetbook patterns:
package:design_system_playground/design_system_playground.dartRegister in main.dart:
WidgetbookFolder in apps/widgetbook/lib/main.dartWidgetbookLeafComponent(
name: 'ComponentName',
useCase: WidgetbookUseCase(
name: 'Component Showcase',
builder: (context) => const ComponentNameShowcase(),
),
),
Output: Widgetbook showcase created and registered
Visual Validation:
Code Validation:
Build Recommendation:
yarn widgetbookcd apps/widgetbook && flutter run -d chromeOutput: Validation report and build instructions
For detailed project-specific rules, consult:
references/implementation-rules.md - User-defined custom rulesGeneral:
Flutter Specific:
Dsp (e.g., DspButton, DspCheckbox)dsp_ prefix for file names (e.g., dsp_button.dart)AnimatedContainer for transitions (150ms)DspTheme.of(context) for theme accessDspTokens.* for design tokensLocation: references/flutter-patterns.md
Key patterns:
Location: references/implementation-rules.md
Project-specific guidelines and conventions (user-editable).
Input:
/implement-design KEPLR-1578
Actions:
widgetbookpackages/flutter/lib/src/components/dsp_checkbox.dartpackages/flutter/lib/design_system_playground.dartapps/widgetbook/lib/design_system/components/checkbox/showcase/checkbox_showcase.dartapps/widgetbook/lib/main.dartInput:
/implement-design https://figma.com/design/abc123/file?node-id=21-45 --examples widgetbook
Actions:
abc123, nodeId=21:45)widgetbookInput:
/implement-design LIN-123 --examples none
Actions:
noneLinear ticket not found:
Figma link not found in Linear ticket:
Invalid Figma URL:
Design context truncated:
get_metadata to get structureā Component matches Figma design visually (1:1) ā All variants implemented ā All states implemented (hover, active, disabled, etc.) ā No hardcoded values (uses design tokens) ā Component exported in package index ā Examples created (if requested) ā Follows existing patterns ā Enums defined for variants/sizes ā Follows community standards (Effective Dart, Widget Composition, StatefulWidget Performance) ā Build succeeds without errors