figma-design-review-before-code
Use when a component's Figma design must be reviewed BEFORE any code exists — a new UI component, a design handoff, a spec artifact, or a request to review a design against the existing components. Sy
SKILL.mdplugins/react-frontend-sdlc/skills/figma-design-review-before-code/SKILL.md
GitHubFigma design review before code
Profile keys consumed
capabilities.figmaarchitecture.source_rootarchitecture.component_prefix
The design extraction runs through the Figma MCP server, gated by capabilities.figma: skip the
review with a recorded capability-absent note when capabilities.figma is false, and ask the
design owner for the intended contract instead of inventing it from memory.
Overview
A pre-implementation review extracts the binding contracts a design imposes — document structure, accessible-name source, decorative-vs-informative imagery, interaction boundaries — by reading the Figma design next to the closest already-shipped component. It deliberately stops short of pixels: sizing and spacing parity belong to implementation-time verification.
When to use
- A new component is specified in Figma or in a spec artifact and no source file exists yet.
- A design handoff needs its accessibility and semantics contract settled before a story is opened.
- A reviewer asks whether a design fits the existing component precedents.
- Not for: verifying an already-written component against Figma (that is implementation parity work), or tuning shadows, radii and spacing.
Applicability by repository shape
- React SPA shape (feature modules under the source root, a bootable app, an aggregate CI
target): yes — precedents under the source root's prefixed component folders
(
architecture.source_rootplusarchitecture.component_prefix, e.g.src/components/ui-*), spec artifacts underspecs/<slug>/; the trackedfigma-design-checkskill is the sibling gate. - Next.js app shape (routed pages, no aggregate duplication gate): yes — precedents under the
source root's
componentsfolder, spec artifacts underspecs/<slug>/; the same trackedfigma-design-checkskill applies. - Component-library shape (Storybook-first, no bootable app, published package): yes —
precedents under the source root's prefixed component folders, spec artifacts under
specs/implementation-artifacts/; no tracked repository skill, so the review is the only gate.
Procedure
- Locate the design: a Figma file key plus node id, or the linked spec artifact. Never review from a screenshot or from memory.
- Record the anatomy and the full state set the design ships — typically Rest, Hover, Active, Disabled — plus any loading or empty variant.
- Read the closest precedent component in full: its
index.tsxfor document structure and ARIA, its type-only file for the prop contract — a siblingtypes.tsin the Next.js and component-library shapes, a groupedtypes/<component>/folder under the source root in the React SPA shape — and its spec artifact for decisions already argued. - Compare and write findings under four headings only:
- Structure — is the root a native
button, a link, or a non-interactive element? Native semantics beat aroleunless the design makes that impossible. - Accessible name — where does it come from (text content,
aria-label, an adjacent field label)? Is one guaranteed in every state? - Imagery — each icon or image is decorative (
aria-hidden, emptyalt) or informative (a described alternative). Say which, per node. - Interaction — clickable region boundaries, focus order, and how disabled is expressed.
On a native form control —
button,input,select,textarea,fieldset— the nativedisabledattribute is the correct expression: it blocks activation and, on an input, stops the value being submitted.aria-disabledis for a custom or non-native control (adivorspanwidget, a link) that has no nativedisabledto set: it keeps the control focusable so focus is never dropped mid-interaction, and the handler must reject activation itself. Reach foraria-disabledon a native control only when the design requires the disabled state to stay focusable, and then the same handler-side rejection applies.
- Structure — is the root a native
- Return the findings as text. Write no files during a review — no probes, no reports, no scratch output; a review that edits the working tree is no longer a review.
Precedent rules
- Compare only against components in the same repository, not external libraries: the point is consistency with what already ships.
- If the design brief and the Figma extraction disagree on a value, the brief is authoritative and the disagreement is itself a finding.
- Flag a contract as blocking only when it changes the DOM the implementation must emit. Colour, radius and shadow deltas are notes, not blockers.
- Confirm that type — size, weight, line-height — resolves to a named design token rather than a raw value. A token that does not exist is a contract finding; measuring the rendered pixels is not.
Common mistakes
- Measuring pixels — that is implementation-time parity work and buries the contracts.
- Reviewing from a screenshot — state variants and layer names carry the contract, and a raster loses both.
- Writing a report file — findings belong in the reply; a stray file corrupts the working tree.
- Naming a
rolebefore checking whether a native element already carries it. - Ignoring the Disabled variant — it is where the accessible name and focus behaviour usually break.