From Flagrare
Enforces pixel-perfect Figma implementation by exhaustively extracting visual properties, measuring with Chrome DevTools, and fixing all discrepancies in one pass.
How this skill is triggered — by the user, by Claude, or both
Slash command
/flagrare:figma-matcherThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A rigid, checklist-driven process for verifying that implementation matches Figma designs exactly. No visual impressions. No "close enough." Every property gets extracted, compared numerically, and verified.
A rigid, checklist-driven process for verifying that implementation matches Figma designs exactly. No visual impressions. No "close enough." Every property gets extracted, compared numerically, and verified.
Without this process, you will:
This skill eliminates all of that by forcing exhaustive upfront extraction.
You are FORBIDDEN from calling Edit or Write on any .scss, .css, .sass, .less, or .styled.* file until you have:
If you catch yourself about to edit a styling file without having shown the comparison table, STOP. Go back to Step 1.
You MUST complete every step in order. Do not skip steps. Do not combine steps. Do not start writing CSS until Step 5.
Call get_design_context on every relevant node. Also call get_screenshot to capture the Figma rendering for later visual comparison.
For each visual element, extract into a structured checklist:
Colors (resolve ALL to hex + rgba):
Typography:
Spacing:
Layout:
Borders:
Effects:
Button/Interactive elements:
Write these into a numbered checklist. Each item is a row you will verify later.
For every color, spacing, or size token in your codebase that might be relevant:
grep the variables file (e.g., _settings.colors.scss) to find the actual hex value$color-ui50: $color-gray50 -> find $color-gray50: #BDBDBD)$variable-name -> $alias -> #hexvalue -> rgba(r, g, b, a)If a variable doesn't match exactly, note it. You will need a custom override, not a "closest match."
Example:
Figma border: rgba(103, 103, 103, 0.5) = #676767 at 50% opacity
$color-ui50 = $color-gray50 = #BDBDBD --> NOT a match (189 != 103)
$color-ui70 = $color-gray70 = #676767 --> EXACT MATCH
evaluate_script to get computed styles:const el = document.querySelector('.your-selector');
const styles = window.getComputedStyle(el);
JSON.stringify({
backgroundColor: styles.backgroundColor,
borderColor: styles.borderColor,
borderWidth: styles.borderWidth,
borderRadius: styles.borderRadius,
padding: styles.padding,
paddingTop: styles.paddingTop,
paddingRight: styles.paddingRight,
paddingBottom: styles.paddingBottom,
paddingLeft: styles.paddingLeft,
margin: styles.margin,
color: styles.color,
fontSize: styles.fontSize,
fontWeight: styles.fontWeight,
fontFamily: styles.fontFamily,
lineHeight: styles.lineHeight,
letterSpacing: styles.letterSpacing,
gap: styles.gap,
width: styles.width,
height: styles.height,
minWidth: styles.minWidth,
maxWidth: styles.maxWidth,
display: styles.display,
flexDirection: styles.flexDirection,
alignItems: styles.alignItems,
justifyContent: styles.justifyContent,
boxShadow: styles.boxShadow,
opacity: styles.opacity,
whiteSpace: styles.whiteSpace,
textOverflow: styles.textOverflow,
overflow: styles.overflow,
});
Do this for EVERY element in the checklist. Not just the ones you think might be wrong. Check children, containers, buttons, icons, text spans, everything.
Create a markdown table with columns:
| # | Element | Property | Figma Value | Current Value | Match? | Fix |
|---|---|---|---|---|---|---|
| 1 | Banner container | background-color | rgba(103,103,103,0.08) | rgba(189,189,189,0.08) | MISMATCH | Use $color-ui70 instead of $color-ui50 |
| 2 | Banner container | border-color | rgba(103,103,103,0.5) | rgba(189,189,189,0.8) | MISMATCH | transparentize($color-ui70, 0.5) |
| 3 | CTA button | background-color | rgba(103,103,103,0.15) | rgba(0,85,255,0.15) | MISMATCH | transparentize($color-ui70, 0.85) |
Fill in EVERY row from your checklist. Mark each as MATCH or MISMATCH.
For mismatches, specify:
OUTPUT THIS TABLE TO THE USER. Do not proceed until you have done so.
Also show side-by-side screenshots: Figma (from Step 1) and current implementation (from Step 3).
Only after the table is complete and shown to the user:
/goal and Verify Until Zero DiscrepanciesBefore beginning verification, invoke /goal with the following condition:
/goal For every row in the Figma comparison checklist: re-run evaluate_script via Chrome DevTools on the live page, rebuild the full comparison table, and confirm every row shows MATCH (tolerance: <=2 subpixel rounding in rgba channels). Then take a fresh screenshot and compare side-by-side with the Figma screenshot from Step 1 confirming zero visible differences in color, spacing, sizing, typography, borders, shadows, or layout. Not met until the rebuilt table has 0 MISMATCH rows AND the screenshot comparison shows 0 visual discrepancies.
This activates Claude Code's built-in goal loop: you keep working across turns until the condition is met. The /goal evaluator will prevent premature completion.
evaluate_script queries from Step 3 for EVERY row in the checklist (not just previous mismatches)mismatches_css = rows where Current != Figma; mismatches_visual = visible discrepancies in screenshotmismatches_css == 0 AND mismatches_visual == 0:
"Should match now" does not satisfy the goal. "Looks correct" does not satisfy the goal. Only measured values and screenshots satisfy the goal.
white-space: nowrap.Always output:
npx claudepluginhub flagrare/agent-skills --plugin flagrareProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.