alekspetrov avatar

product-design

Automates design review, token extraction, component mapping, and implementation planning. Reduces d

by alekspetrov|Open Source

Product Design Skill

Automate Figma design handoff with Navigator's intelligent design system integration.

Time Savings: 6-10 hours β†’ 15 minutes (95% reduction)


Features

✨ Direct Figma MCP Integration - Python connects directly to Figma Desktop (no manual orchestration) 🎯 Progressive Refinement - Smart token usage (fetches only needed data) πŸ”„ Design Token Sync - Auto-extract variables in W3C DTCG format πŸ—ΊοΈ Component Mapping - Figma β†’ codebase with similarity detection πŸ“Š Drift Detection - Compare design vs implementation automatically πŸ“ Task Generation - Phased implementation plans for Navigator


Quick Start

1. Install

cd skills/product-design
./setup.sh

What this does:

  • βœ… Checks Python 3.10+ installed
  • βœ… Creates virtual environment
  • βœ… Installs mcp SDK (1.2.1+)
  • βœ… Verifies Figma Desktop connection
  • βœ… Tests MCP server availability

Expected output:

βœ… Setup Complete!

2. Enable Figma MCP

  1. Open Figma Desktop
  2. Go to Figma β†’ Preferences
  3. Enable "Enable local MCP Server"
  4. Confirm server running at http://127.0.0.1:3845/mcp

3. Use the Skill

User: "Review this Figma design: https://figma.com/file/ABC123..."

Navigator will:

  1. Connect to Figma MCP automatically
  2. Extract design tokens and components
  3. Compare against codebase
  4. Generate implementation plan
  5. Create Navigator task document

Architecture

Before (Manual Orchestration)

User β†’ Claude β†’ MCP tools (15-20 manual calls) β†’ temp files β†’ Python β†’ Claude β†’ User

Time: 15-20 orchestration steps

After (Direct MCP Client)

User β†’ Python (MCP client) β†’ Figma Desktop β†’ Results β†’ User

Time: 1 step (95% reduction)

How It Works

# Python functions now connect directly to Figma
from figma_mcp_client import FigmaMCPClient

async with FigmaMCPClient() as client:
    # Smart data fetching
    metadata = await client.get_metadata()
    components = extract_components(metadata)

    # Progressive refinement - fetch details only if needed
    for comp in high_complexity_components:
        detail = await client.get_design_context(comp['id'])

    # Get design tokens
    tokens = await client.get_variable_defs()

Benefits:

  • No Claude orchestration overhead
  • Automatic connection management
  • Progressive refinement (token efficient)
  • Built-in error handling

Available Tools

Figma MCP Tools (Auto-Connected)

ToolPurposeUse Case
get_metadataComponent structure (XML)Discover node IDs, hierarchy
get_variable_defsDesign tokensToken extraction, sync
get_code_connect_mapComponent β†’ code mappingAuto-map Figma to codebase
get_design_contextUI code generationComponent implementation
get_screenshotVisual snapshotsVisual regression testing
create_design_system_rulesDesign system automationRule generation

Python Functions

FunctionPurposeInputOutput
design_analyzer.pyExtract design patternsFigma URL/dataComponent list
token_extractor.pyConvert to DTCG formatVariables JSONDTCG tokens + diff
component_mapper.pyMap componentsFigma + codebaseMappings with confidence
design_system_auditor.pyDetect driftDesign + codeDrift report
implementation_planner.pyGenerate task docAnalysis resultsNavigator task

Documentation


Requirements

System

  • Python 3.10+
  • Figma Desktop v116.0.0+
  • macOS, Linux, or Windows

Python Packages

mcp>=1.2.1          # Official MCP SDK
anyio>=4.0.0        # Async I/O
httpx>=0.25.0       # HTTP client
pydantic>=2.0.0     # Data validation

Installed automatically via ./setup.sh

Optional

  • Figma Enterprise - For Code Connect (automatic component mapping)
  • Tailwind CSS - For design token integration
  • Storybook - For visual regression testing

Example Usage

Design Review

User: "Review dashboard redesign: https://figma.com/file/..."

Navigator:
1. Connects to Figma MCP
2. Extracts 12 design tokens, 3 new components
3. Maps to existing Button component (78% similarity)
4. Detects 5 token drift issues
5. Generates TASK-16 with phased implementation plan

Output:
  - .agent/design-system/reviews/2025-10-22-dashboard.md
  - .agent/tasks/TASK-16-dashboard-redesign.md

Token Extraction Only

# Simple token fetch
from figma_mcp_client import get_figma_variables

tokens = await get_figma_variables()
# Returns: {'primary-600': '#2563EB', 'spacing-md': '16px', ...}

Component Analysis

# Full analysis with progressive refinement
from figma_mcp_client import FigmaMCPClient

async with FigmaMCPClient() as client:
    metadata = await client.get_metadata()
    components = extract_components(metadata)

    print(f"Found {len(components)} components")
    for comp in components:
        print(f"  - {comp['name']} ({comp['type']})")

Troubleshooting

"Figma Desktop not running"

❌ Could not connect to Figma Desktop MCP server

Fix:

  1. Ensure Figma Desktop running
  2. Enable MCP: Figma β†’ Preferences β†’ Enable local MCP Server
  3. Verify: curl http://127.0.0.1:3845/mcp (should return JSON)

"MCP SDK not installed"

ImportError: MCP SDK not installed

Fix:

cd skills/product-design
source venv/bin/activate  # Activate venv
pip install -r requirements.txt

"Python 3.10+ required"

Fix: Install Python 3.10+

# macOS
brew install python@3.13

# Ubuntu
sudo apt install python3.13

See INSTALL.md for complete troubleshooting guide.


Performance

Benchmarks

WorkflowBeforeAfterImprovement
Design Review15-20 min5 min75% faster
Token ExtractionManual (30 min)Automated (1 min)97% faster
Component MappingManual (2 hours)Automated (2 min)98% faster
Orchestration Steps15-20 steps1 step95% reduction

Token Efficiency

ApproachTokensImprovement
Old (manual orchestration)150kBaseline
New (direct MCP client)12k92% reduction

Progressive refinement only fetches needed data.


Version History

v1.1.0 (2025-10-22) - MCP Direct Integration

Breaking Changes:

  • Python now requires mcp>=1.2.1 (install via ./setup.sh)
  • Figma Desktop with MCP enabled required for automated workflow

New Features:

  • ✨ Direct Python β†’ Figma MCP client (no Claude orchestration)
  • ✨ Progressive refinement (smart token usage)
  • ✨ Automatic connection management
  • ✨ ./setup.sh automated installation
  • ✨ figma_mcp_client.py wrapper class

Improvements:

  • 95% reduction in orchestration overhead (15-20 steps β†’ 1)
  • 92% reduction in token usage (150k β†’ 12k)
  • Built-in error handling and retries
  • Better MCP connection diagnostics

Migration:

cd skills/product-design
./setup.sh  # Installs new dependencies

v1.0.0 (2025-10-21) - Initial Release

  • Design analysis and token extraction
  • Component mapping with similarity detection
  • Design system drift detection
  • Implementation plan generation

Support

Documentation: See INSTALL.md and SKILL.md

Issues: Report at https://github.com/navigator-plugin/navigator/issues

Requirements for issue reports:

  • Python version: python3 --version
  • Figma version: Figma β†’ Help β†’ About Figma
  • Output from: python3 functions/check_mcp_connection.py
  • Full error message and stack trace

License

MIT License - Part of Navigator Plugin


Navigator Version: 3.3.1 Skill Version: 1.1.0 MCP SDK Version: 1.2.1+ Last Updated: 2025-10-22