Turns a visual design into faithful, maintainable front-end code. Use when implementing a mockup or Figma file, matching a design spec, building against a design system, or reviewing how closely an implementation tracks its design.
Installation
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Turns a visual design into faithful, maintainable front-end code. Use when implementing a mockup or Figma file, matching a design spec, building against a design system, or reviewing how closely an implementation tracks its design.
Design Handoff
Translating a design into code is more than eyeballing the picture. Static frames hide states,
breakpoints, semantics, and the token system underneath. Hardcoded hex values and one-off components
look right on day one and drift off-brand by day thirty.
Extract the system behind the design, reuse what the product already has, implement every
state the mockup doesn't show, and prove fidelity in the browser — not just in DevTools overlay.
Pairs with [[ui-craft]] for states and polish, [[accessibility]] for semantics, focus, and contrast
the visual file won't specify, [[browser-checks]] to verify the running UI, [[incremental-delivery]]
to ship slice by slice, and [[react-patterns]] when the handoff is React/Next.js. For gaps in the
design, clarify before coding ([[spec-first]]) — don't guess missing behavior.
When to Use
Implementing a mockup, Figma frame, Sketch file, or visual spec as components/pages
Matching spacing, typography, color, and layout to an approved design
Building a new component that should plug into an existing design system
Reviewing whether an implementation faithfully reflects its design source
Retrofitting an old screen to the current design system
Designer delivered assets and you need a faithful, maintainable build
Skip as the primary skill for pure logic with no visual surface, or when intentionally diverging from
design (experiments, internal tools with no spec) — still apply [[ui-craft]] and [[accessibility]] for
user-facing output.
Process
Work in order. Don't write layout CSS until you've mapped tokens and components.
1. Inventory before you code
Gather what the handoff actually includes — and what's missing.
From the design file / spec:
Frame(s) for each breakpoint — mobile, tablet, desktop (note which exist)
Component instances vs one-off frames — what maps to the design system?
Gap list — write explicit questions for the designer or PM before implementation:
Missing: empty cart state, error on failed payment, focus ring style, behavior below 375px,
loading skeleton vs spinner — need decision before build.
Unanswered gaps become expensive guesses in code.
2. Read the design for its system, not its surface
Designs are built from a system even when the file doesn't label it. Extract:
Layer
What to find
Map to code
Color
Primary, surface, border, text roles — not random hexes
--color-*, theme palette
Typography
Font family, sizes, weights, line heights
text-sm, heading-2, etc.
Spacing
4/8px grid or explicit scale
space-4, gap-6
Radii & borders
Corner radius, border width/color
token names
Elevation
Shadow levels
shadow-md, z-index scale
Breakpoints
Where layout changes
sm/md/lg definitions in code
If Figma variables or styles exist, use them as the source of truth — they name the system.
If the design uses raw values everywhere, propose token mappings and confirm with design before
locking in.
Do not copy hex/spacing from inspect panel into component CSS without checking if a token already
exists for that role.
3. Reuse before you rebuild
If the design shows a button, card, or input you already ship — use the real component with the
correct variant and size props.
// Prefer: system component + variant
<Button variant="primary" size="md">Save</Button>
// Not: new div styled to look like a button this week<buttonclassName="bg-[#1a73e8] px-[18px] ...">Save</button>
When the design differs slightly from the existing component:
Check if it's intentional design evolution → update the system component (with design approval).
Check if it's a one-off → still prefer composition (Button + icon slot) over fork.
Only create a new component when the pattern is genuinely new and reusable.
Forked near-copies drift — spacing, focus rings, and hover states diverge within weeks.
4. Extract exact values for what's genuinely new
For elements that don't map to existing tokens, extract exact specs — don't approximate.
Colors — hex + opacity; prefer mapping to a new token if repeated
Border, radius, shadow — full stack
Icon size and alignment relative to text
Approximation is how implementations diverge. "About 16px" becomes 14px on the next screen. Round
only when the design system scale already rounds that way.
Document new tokens in the theme/token file — not scattered in the component — so the next handoff
reuses them.
5. Structure first — semantics before cosmetics
Build the DOM structure and component hierarchy before pixel-perfect polish:
Correct landmarks, headings, lists, forms ([[accessibility]])
Component boundaries that match how the page will be maintained
Data props and slots — where text, images, and actions plug in
A pixel-perfect div stack that needs restructuring for a11y or state logic is wasted work. Structure
first, then tokens, then fine-tuning.
Slice vertically ([[incremental-delivery]]): one working section with real structure and one state
before polishing the entire page.
6. Implement every state the mockup omits
The frame is one moment in time. The product has many ([[ui-craft]]). Plan and build:
State
Often missing from mockups
Decide explicitly
Default / populated
Usually shown
—
Hover / focus / active / disabled
Rarely all shown
Match system interaction tokens
Loading
Often omitted
Skeleton vs spinner; preserve layout
Empty
Often omitted
Message, illustration, CTA
Error
Often omitted
Inline vs banner; recovery action
Partial / truncated
Rarely shown
Long title, many tags, overflow
Success / confirmation
Sometimes
Toast, inline check, next step
If design didn't provide a state, implement from the design system pattern — don't ship blank or
broken UI. Flag visual gaps to design for a follow-up polish pass.
7. Define responsive behavior — not just one width
A fixed-width mockup is a starting point. For each major breakpoint:
What reflows — stack vs row, column count, nav pattern
What hides or collapses — menus, sidebars, table → card
Typography and spacing — do they step down on small screens?
Touch targets — minimum ~44×44px on mobile; design may show desktop-only sizes
Implement and test at least:
~375px — small phone
Design's primary width — often 1440 or 1280
One middle breakpoint if layout shifts materially
Don't only pixel-match the artboard width and break everywhere else ([[browser-checks]]).
8. Accessibility the design file won't specify
Visual handoffs rarely include focus order, labels, or contrast math — code still must deliver
([[accessibility]]):
Focus visible on every interactive control — use system focus ring tokens
Labels on every form field — placeholder is not a label
Contrast — text and icons on backgrounds meet WCAG AA (4.5:1 body, 3:1 large/UI)
Keyboard — full flow without mouse; modals trap and restore focus
Motion — respect prefers-reduced-motion for designed animations
Alt text for meaningful images; decorative images empty alt
If design colors fail contrast, fix with design approval — don't ship illegible UI to match hex.
Semantic HTML and ARIA only where native semantics aren't enough — don't sacrifice structure for
layout shortcuts.
9. Assets, icons, and motion
Icons — prefer SVG from the system icon set; match designed size via width/height or token.
Don't rasterize icons as PNG unless the design requires it.
Images — export at appropriate resolution; use srcset/sizes for photos; explicit width/height
or aspect-ratio to prevent layout shift.
Fonts — load only weights used; subset if large; fallbacks that don't change metrics badly.
Motion — if the design specifies duration/easing, implement with CSS/transitions; document values
as tokens. If unspecified, use system defaults. Gate decorative motion behind reduced-motion.
Export from Figma with consistent naming; avoid duplicate assets that differ by 1px.
10. Compare and reconcile against the source
"Looks close" is not done. Verify fidelity:
Side-by-side — implementation next to design at the same viewport width.
Overlay — Figma overlay plugins, PixelParallel, or browser extensions for pixel diff.
Spot-check spacing — padding, gap, alignment between label and field, icon nudge.
States — each state compared to spec or system pattern, not only default.