| name | figma-verify |
|---|---|
| description | Compare running app screens against Figma designs — captures screenshots from both sources and produces a structured gap report |
| allowed-tools | mcp__plugin_figma_figma__get_screenshot, mcp__plugin_figma_figma__get_design_context, mcp__plugin_playwright_playwright__browser_navigate, mcp__plugin_playwright_playwright__browser_take_screenshot, mcp__plugin_playwright_playwright__browser_resize, mcp__plugin_playwright_playwright__browser_snapshot, mcp__plugin_playwright_playwright__browser_close, mcp__plugin_playwright_playwright__browser_click, mcp__plugin_playwright_playwright__browser_fill_form, mcp__plugin_playwright_playwright__browser_select_option, mcp__plugin_playwright_playwright__browser_type, mcp__plugin_playwright_playwright__browser_wait_for, Read, Bash(mkdir:*), Bash(ls:*), Bash(rm:*) |
| argument-hint | <figma-file-key> <app-base-url> <screen-mappings...> |
Compare a running application against Figma designs and produce a structured gap report.
This skill captures screenshots of both the Figma designs and the live app, then performs a visual comparison to identify layout, content, styling, and asset gaps. The output is a markdown report with actionable items.
All screenshots are saved to .claude-figma-verify/ (gitignored) so the user can review them side-by-side after the report.
Parse $ARGUMENTS as positional values:
| Position | Name | Example | Required |
|---|---|---|---|
| 1 | Figma file key | 32kDQ73MSbUNdAsVi8fQzF |
Yes |
| 2 | App base URL | http://localhost:3099 |
Yes |
| 3+ | Screen mappings | landing=6034:16454=/ |
Yes (at least one) |
Screen mapping format: <name>=<figma-node-id>=<app-route>
Example invocation:
/figma-verify 32kDQ73MSbUNdAsVi8fQzF http://localhost:3099 landing=6034:16454=/ disclaimer=6736:19904=/disclaimer personalInfo=6034:16775=/check review=8028:29275=/review
If arguments are missing or malformed, ask the user to provide them.
Extract the file key, base URL, and screen mappings from $ARGUMENTS. For each mapping, parse into:
name— human-readable screen namenodeId— Figma node ID (colon-separated, e.g.6034:16454)route— app route path (e.g./disclaimer)
Validate that at least one screen mapping is provided.
mkdir -p .claude-figma-verify/figma .claude-figma-verify/appThis directory is gitignored. Clean up any previous run's files:
rm -f .claude-figma-verify/figma/*.png .claude-figma-verify/app/*.pngResize the Playwright browser to mobile width to match the Figma mobile designs:
- Width: 375
- Height: 812
Save Figma design screenshots to disk using Figma's prototype presentation view in Playwright. This renders the design frame cleanly with minimal UI chrome.
For each screen mapping:
-
Navigate Playwright to the prototype URL:
https://www.figma.com/proto/{fileKey}/?node-id={nodeId}&scaling=min-zoomReplace
:with-in the node ID for the URL (e.g.,6034:16454→6034-16454). -
Wait 5 seconds for the canvas to render (Figma uses WebGL):
browser_wait_for(time: 5) -
Take a viewport screenshot (NOT full-page — the prototype view fits the frame to the viewport):
browser_take_screenshot(filename: ".claude-figma-verify/figma/<name>.png") -
After saving to disk, also call
mcp__plugin_figma_figma__get_screenshotwith the file key and node ID. This gives you a higher-fidelity inline image for the visual comparison analysis — the MCP renders at native Figma resolution without browser chrome. Use this inline image as the primary source for your gap analysis.
IMPORTANT: The Figma MCP is READ-ONLY. Never use write/modify tools.
Note: The prototype URL requires the Figma file to have link sharing enabled. If the page fails to load or shows a login wall, note it in the report and fall back to MCP-only screenshots (inline comparison without disk files).
Do NOT navigate directly to each route. Many screens depend on application state (e.g., the review page needs children in context). Instead, navigate the app as a user would, following the screen mappings in order:
- Start at the first screen's route (typically
/) - Capture the screenshot for that screen
- Interact with the app to advance to the next screen (click buttons, fill forms as needed)
- Capture each subsequent screen after reaching it through the flow
Form filling strategy:
- Use realistic but fake data (e.g., "Jane", "M", "Doe", birthdate January 15 2015)
- Fill all required fields before advancing
- If multiple children are needed (e.g., review page shows 3 cards), add multiple children through the form flow before capturing the review screen
Capturing screenshots:
Use mcp__plugin_playwright_playwright__browser_take_screenshot with:
fullPage: truefilename: .claude-figma-verify/app/<name>.png
If a screen cannot be reached through the flow (e.g., a closed/error state), note it in the report as "requires manual setup" and capture what's available.
For each screen, compare the Figma screenshot (inline MCP image) against the app screenshot. Evaluate these dimensions:
| Dimension | What to Check |
|---|---|
| Layout | Element order, spacing, alignment, grid structure |
| Typography | Headings, body text size/weight, hierarchy |
| Colors | Background, text, button, accent colors |
| Components | Buttons, inputs, accordions, cards — do they match USWDS patterns shown in Figma? |
| Assets | Logos, icons, illustrations — present and correctly sized? |
| Content | Text content matches (accounting for i18n placeholder text in app) |
| Responsive | Does the mobile layout match the Figma mobile frame? |
Produce a structured markdown report. Format:
## Figma Verification Report
**Figma file:** `<file-key>`
**App URL:** `<base-url>`
**Viewport:** 375 × 812
**Date:** YYYY-MM-DD
**Screenshots:** `.claude-figma-verify/` (figma/ and app/ subdirectories)
---
### Summary
| Screen | Status | Gaps |
|--------|--------|------|
| Landing | ✅ Match | 0 |
| Disclaimer | ⚠️ Minor gaps | 2 |
| Personal Info | ❌ Major gaps | 4 |
---
### Screen: <Name>
**Figma:** `.claude-figma-verify/figma/<name>.png`
**App:** `.claude-figma-verify/app/<name>.png`
**Status:** ✅ Match | ⚠️ Minor gaps | ❌ Major gaps
**Matches:**
- [list what matches well]
**Gaps:**
| # | Dimension | Severity | Description | Suggestion |
|---|-----------|----------|-------------|------------|
| 1 | Assets | 🔴 Major | Missing logo above heading | Add `<Image>` with logo from Figma |
| 2 | Spacing | 🟡 Minor | Extra margin below button | Adjust `margin-bottom` class |
---- 🔴 Major — Missing elements, wrong layout structure, broken functionality
- 🟡 Minor — Spacing differences, slight color mismatches, font weight variations
- 🟢 Trivial — Sub-pixel differences, animation timing, hover states
Close the Playwright browser when done.
- READ-ONLY Figma: Never use Figma write/modify MCP tools. Only
get_screenshotandget_design_context. - No automatic fixes: This skill only reports gaps. Do not modify application code. If the user wants fixes, they will ask separately.
- i18n tolerance: The app may show placeholder text or translation keys. Note these as content gaps only if the Figma design shows specific text that doesn't appear at all.
- USWDS tolerance: Minor rendering differences between USWDS components and Figma mockups are expected. Only flag structural differences (wrong component type, missing component).
- Always show both screenshots: The report should reference both the Figma and app screenshots so the user can visually confirm findings.
- Full-page screenshots: Always use
fullPage: truefor app screenshots to capture below-the-fold content. - Save all screenshots to disk: Both Figma and app screenshots must be saved to
.claude-figma-verify/so the user can review them after the session. - Navigate the flow, don't jump: Always reach screens through the normal app flow to ensure correct application state. Only use direct navigation for the starting screen.
- App not running: If navigation fails, report the error and skip that screen. Continue with remaining screens.
- Figma node not found: If the Figma screenshot fails, report it and skip that screen.
- Figma login wall: If the prototype URL redirects to a login page instead of rendering the design, fall back to MCP-only inline screenshots. Note in the report that Figma screenshots could not be saved to disk because the file requires authentication. The user may need to enable link sharing on the Figma file.
- Interactive states: If a screen requires interaction beyond simple form filling (e.g., API responses, error states), note it as "requires manual setup" and describe what state is needed.
- No arguments provided: Show the usage format and example invocation, then ask the user to provide arguments.