From co-dev
Review, compare, audit, or check UI code against Figma designs. Use when the user wants to compare code to a Figma design, check design implementation, audit UI fidelity, verify design compliance, or review design-to-code accuracy. Supports Android (Jetpack Compose, XML layouts), iOS (SwiftUI, UIKit), and web (HTML/CSS, React, Vue, Angular) platforms.
npx claudepluginhub cloud-officer/claude-code-plugin-dev --plugin co-devThis skill is limited to using the following tools:
Compare UI code against Figma designs to identify discrepancies in layout, styling, spacing, typography, colors, and component usage. Works for Android, iOS, and web platforms.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Compare UI code against Figma designs to identify discrepancies in layout, styling, spacing, typography, colors, and component usage. Works for Android, iOS, and web platforms.
This skill requires the Figma MCP server for design context. If Figma MCP is unavailable (not authenticated, tool not found), inform the user and stop — this skill cannot function without Figma access.
| Operation | MCP Tool |
|---|---|
| Get design context (layout, styles) | mcp__figma__get_design_context |
| Get visual screenshot | mcp__figma__get_screenshot |
| Get design system components | mcp__figma__search_design_system |
| Get design metadata | mcp__figma__get_metadata |
| Get variables and styles | mcp__figma__get_variable_defs |
| Get code-to-component mappings | mcp__figma__get_code_connect_map |
| Get component mapping suggestions | mcp__figma__get_code_connect_suggestions |
The user must provide:
android, ios, or web. If not specified, auto-detect from the project.# Check for platform indicators
ls -la build.gradle build.gradle.kts app/build.gradle app/build.gradle.kts 2>/dev/null && echo "ANDROID"
ls -la *.xcodeproj *.xcworkspace Package.swift 2>/dev/null && echo "IOS"
ls -la package.json tsconfig.json angular.json next.config.* nuxt.config.* vite.config.* webpack.config.* 2>/dev/null && echo "WEB"
If multiple platforms are detected (monorepo), ask the user which platform to review.
mcp__figma__get_screenshot to capture a visual reference of the target designmcp__figma__get_design_context to extract:
mcp__figma__get_variable_defs to extract design tokens (color variables, spacing scales, typography tokens)mcp__figma__search_design_system to identify which design system components are usedRecord all extracted values for comparison.
Based on the platform, locate the UI code that implements the design:
Search for composable functions and XML layouts:
# Find Compose files
find . -name "*.kt" -path "*/ui/*" -o -name "*.kt" -path "*/compose/*" -o -name "*.kt" -path "*/screen/*" -o -name "*.kt" -path "*/component/*" | head -50
# Find XML layouts
find . -name "*.xml" -path "*/layout/*" | head -50
# Find theme/style files
find . -name "Theme.kt" -o -name "Color.kt" -o -name "Type.kt" -o -name "*.xml" -path "*/values/colors*" -o -name "*.xml" -path "*/values/dimens*" -o -name "*.xml" -path "*/values/styles*" | head -20
Search for view files:
# Find SwiftUI views
find . -name "*.swift" -path "*/View*" -o -name "*.swift" -path "*/Screen*" -o -name "*.swift" -path "*/UI/*" | head -50
# Find storyboards and XIBs
find . -name "*.storyboard" -o -name "*.xib" | head -20
# Find asset catalogs and style definitions
find . -name "*.xcassets" -o -name "Colors.swift" -o -name "Typography.swift" -o -name "Theme.swift" | head -20
Search for component and style files:
# Find component files
find . -name "*.tsx" -o -name "*.jsx" -o -name "*.vue" -o -name "*.svelte" -path "*/components/*" -o -path "*/pages/*" -o -path "*/views/*" | head -50
# Find style files
find . -name "*.css" -o -name "*.scss" -o -name "*.less" -o -name "*.styled.*" -o -name "tailwind.config.*" | head -30
# Find design token files
find . -name "tokens.*" -o -name "theme.*" -o -name "variables.*" -path "*/styles/*" -o -path "*/design/*" | head -20
Ask the user to confirm which files correspond to the design if the mapping is not obvious.
For each aspect below, compare the Figma design values against the code implementation. Record findings as MATCH, MISMATCH, or MISSING.
dp (Figma px ≈ dp at 1x)points (Figma px ≈ points at 1x)px, rem, em (check if using a spacing scale)## Design Review Report
### Design
- **Figma URL:** {url}
- **Platform:** {android/ios/web}
- **Files reviewed:** {list of code files}
### Design System
- **Tokens used:** {list of design tokens found in Figma}
- **Components used:** {list of design system components}
### Findings
| # | Aspect | Status | Figma Value | Code Value | File:Line | Severity |
|---|--------|--------|-------------|------------|-----------|----------|
| 1 | {aspect} | MATCH/MISMATCH/MISSING | {value} | {value} | {file:line} | {LOW/MEDIUM/HIGH} |
### Severity Guide
- **HIGH** — Visually noticeable difference (wrong color, missing component, broken layout)
- **MEDIUM** — Subtle difference (off by a few pixels, wrong font weight, missing hover state)
- **LOW** — Minor inconsistency (spacing off by 1-2px, slightly different corner radius)
### Summary
- **Total checks:** {count}
- **Matches:** {count}
- **Mismatches:** {count}
- **Missing:** {count}
- **Fidelity score:** {matches / total * 100}%
### Recommended Fixes
{For each MISMATCH/MISSING with HIGH or MEDIUM severity, provide the specific code change needed}
Ask the user before making changes:
"I found {N} discrepancies between the design and code. Would you like me to fix them?"
Apply fixes in order of severity (HIGH first). For each fix:
After all fixes, run the linters skill:
/co-dev:run-linters
/co-dev:run-linters after modifying code