design-image-to-code
/design-image-to-code
Turn a reference image or mockup into a working local frontend that matches it closely. Inspects the image, extracts the design system (layout, type, spacing, color, components), implements it, then screenshot-compares and iterates to close the gap. Use when the user says "image to code", "build this mockup", "code this screenshot", "make this design real", or provides a UI image to implement. Part of the Product Design set. Uses a browser tool for screenshot verification.
- Author
- DKeken ↗
- Repository
- codex-skills-alternative ↗
- Licence
- MIT
- Last repository change
- 03.06.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 03.06.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Turn a reference image or mockup into a working local frontend that matches it closely. Inspects the image, extracts the design system (layout, type, spacing, color, components), implements it, then screenshot-compares and iterates to close the gap. Use when the user says "image to code", "build this mockup", "code this screenshot", "make this design real", or provides a UI image to implement. Part of the Product Design set. Uses a browser tool for screenshot verification.
Triggers from the description
Original author description
Turn a reference image or mockup into a working local frontend that matches it closely. Inspects the image, extracts the design system (layout, type, spacing, color, components), implements it, then screenshot-compares and iterates to close the gap. Use when the user says "image to code", "build this mockup", "code this screenshot", "make this design real", or provides a UI image to implement. Part of the Product Design set. Uses a browser tool for screenshot verification.
How it works
- When to use
- When NOT to use
- Inputs
- Workflow
- Worked example
- Quality bar / Definition of done
- Common pitfalls
- Handoff
- Tooling
SKILL.md preview
--- name: design-image-to-code description: Turn a reference image or mockup into a working local frontend that matches it closely. Inspects the image, extracts the design system (layout, type, spacing, color, components), implements it, then screenshot-compares and iterates to close the gap. Use when the user says "image to code", "build this mockup", "code this screenshot", "make this design real", or provides a UI image to implement. Part of the Product Design set. Uses a browser tool for screenshot verification. --- # Design — Image To Code Reproduce a reference image as a real, runnable frontend — verified by screenshot diff, not "looks roughly like it". The discipline that separates this from generic codegen: you *measure* the result against the reference and iterate until the gap is minor and explainable. ## When to use - You have a mockup/screenshot (from a designer, `design-ideate`, or generated) to implement. - "Build this design", "code this screenshot", "make this real". - Recreating a UI you can see but don't have code for. ## When NOT to use - The source is a *live site* (you can hit its URL/HTML) → `design-url-to-code` (it can extract real CSS). - No image yet, just an idea → `design-ideate`. - You need interactivity/flow wiring, not a static match → `design-prototype` (run this first to build screens). ## Inputs - The **reference image(s)** (path). - **Target stack**: ask; default to matching the repo, else React + Vite + Tailwind + TS. - `./design/context.md` constraints if present. ## Workflow 1. **Inspect** the image with a vision/read tool. Inventory every meaningful element. Extract the design system: layout grid, type scale, spacing rhythm, palette, components, radii, shadows. 2. **Reuse before inventing**: if adapting an existing project, read its components/tokens/fonts first and use them. 3. **First pass**: build to match the **primary viewport** as closely as possible. Don't chase responsive yet. 4. **Capture**: run the app, screenshot at the reference's exact dimensions via a browser-automation tool. 5. **Compare & list mismatches** in priority order: layout → type → spacing → color → icons. 6. **Iterate** until differences are minor and explainable. *Then* handle responsive (tablet/mobile). 7. **Missing assets**: use supplied files; generate raster assets with an image tool; or use clearly-marked placeholders + a note. ## Worked example ``` reference: ./mocks/pricing.png (1440px wide) stack: matches repo → Next.js + Tailwind + Aurora DS pass 1: built 3-tier pricing grid, header, CTA capture: screenshot @1440 → ./design/checks/pricing-impl.png mismatches: - [layout] cards 3-col but gap too tight (16 vs ~32 in ref) - [type] tier price 32px, ref ~40px - [color] "popular" badge wrong accent (#7C3 vs ref #16A34A) - [spacing] section pad 48 vs ref ~80 iterate: fix gap=32, price=40px, badge=#16A34A, section pad=80 re-capture: gap now minor (sub-pixel font rendering only) → DONE responsive: collapse to 1-col < 768px, stack CTA verify: build clean, typecheck clean, runs at :3000 ``` ## Quality bar / Definition of done - Implementation screenshot ≈ reference at the target viewport; remaining diffs are minor and *explained*. - Existing design-system components/tokens reused, not duplicated. - Build + typecheck clean; runs locally with one command. - Responsive handled after the reference-size match is solid. ## Common pitfalls - **Claiming parity without comparing** — always capture + diff. "Looks close" isn't verification. - **"Improving" the design** — match the reference unless explicitly asked to deviate; note any forced deviations (e.g. for a11y). - **Inventing new tokens** when the project already has a scale — creates drift. - **Chasing responsive too early** — nail the reference viewport first, or you iterate on a moving target. - **Eyeballing spacing/type** — measure against the reference; "looks like 16" is often 24. ## Handoff Static screens done → `design-prototype` (wire interactivity/flow) → `design-qa` (conformance) → `design-share`. ## Tooling Needs a **vision/read tool** (inspect the image) and a **browser-automation tool** (screenshot the build for comparison). Optional image tool for missing assets. Without a browser tool you can still build, but flag that visual parity is unverified.
Versions
The database has no other skills named design-image-to-code.
Identical content appears in 1 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version 8a3958232c5e (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100ui-from-screenshot
Turn a screenshot, mockup or design image into working UI that matches it closely, built with the components and styles the project already has. Use when the person shares an image and asks to build it, recreate it, match it or "make it look like this". Measures the image first,… - 100screenshot-to-code
Turns a screenshot, mockup, Figma export, or photo of a UI into working front-end code - React + Tailwind CSS v4 by default, or Next.js, Vue, or plain HTML/CSS - matching layout, spacing, colors, and typography, then renders the result and compares it against the image to close… - 100image-to-frontend
Turn a product brief, screenshot or reference image into a working frontend page: generate 4 visual variants with the askcodex image CLI, let the user pick one, extract a detailed build spec, build React/Next.js or plain HTML with the chosen image kept in context, and iterate to… - 90image-to-code
Turn a reference image, screenshot, or mockup into token-driven, accessible code. Infer the design system from the reference (palette, type scale, spacing, radius, layout archetype), map it to the 3-tier tokens, rebuild it, then verify with the kit's gates. Use when the user… - 100design-url-to-code
Turn a live website into a working local frontend you can edit. Fetches the page, extracts its design system and structure, and rebuilds it locally in your stack, then screenshot-compares to the original. Use when the user says "url to code", "clone this site locally", "make it… - 100image-analysis
Analyze an image — screenshot, diagram, UI mockup, or chart — with Claude's vision. Triggers on: analyze this image, look at this screenshot, what's in this diagram, read this mockup, describe this picture, analyze image.