image-to-code
Skill0 starsChanged 45 days agoMITView on GitHub
Turn a screenshot or mockup into code that matches it. Use when given an image of a UI and asked to build, rebuild or match it. Measures first, then writes, then records every divergence from the source.
85 other projects use a version of this.
Adopted by
Most recently taken up by
- bepaldes/heimdall-agenttheir own version, first seen Nov 8, 2026
- SamuelAlev/control-centertheir own version, first seen Nov 8, 2026
- AthenDrakomin-hub/agent-skillstheir own version, first seen Nov 1, 2026
- HackIndiaXYZ/ai-first-startup-hackathon-build-a-startup-using-ai-only-arclighttheir own version, first seen Nov 1, 2026
- imMamdouhaboammar/motion-graphics-skillstheir own version, first seen Nov 1, 2026
- GAPZ787/claude-skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use stitch-design-taste, brandkit and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
HK-hubSkillstitch-design-taste
Semantic Design System Skill for Google Stitch. Generates agent-friendly DESIGN.md files that enforce premium, anti-generic UI standards — strict typography, calibrated color, asymmetric layouts, perpetual micro-motion, and hardware-accelerated performance.
Also in 54 projects that use this
AnasX7Skillbrandkit
Premium brand-kit image generation skill for creating high-end brand-guidelines boards, logo systems, identity decks, and visual-world presentations. Trained for minimalist, cinematic, editorial, dark-tech, luxury, cultural, security, gaming, developer-tool, and consumer-app brand systems. Optimized for intentional logo concepting, refined composition, sparse typography, strong symbolic meaning, premium mockups, art-directed imagery, and flexible grid layouts.
Also in 61 projects that use this
AnasX7Skillimagegen-frontend-web
Elite frontend image-direction skill for generating premium, conversion-aware website design references. CRITICAL OUTPUT RULE — generate ONE separate horizontal image FOR EVERY section. A landing page with 8 sections produces 8 images. Never compress multiple sections into one image. Enforces composition variety (not always left-text / right-image), background-image freedom, varied CTAs, varied hero scales (giant / mid / mini minimalist), narrative concept spine, second-read moments, and a single consistent palette across all images. Optimized for landing pages, marketing sites, and product comps that developers or coding models can accurately recreate.
Also in 53 projects that use this
HK-hubSkilldesign-taste-frontend-v1
The original v1 taste-skill, preserved for projects depending on its exact behavior. The current default is `design-taste-frontend` (v2 experimental), which is a substantial rewrite. Use this v1 install name only if you need exact backward compatibility.
Also in 29 projects that use this
hjdspaceSkillflutter-setup-declarative-routing
Configure `MaterialApp.router` using a package like `go_router` for advanced URL-based navigation. Use when developing web applications or mobile apps that require specific deep linking and browser history support.
Also in 3 projects that use this
- +7 more from AnasX7
Other versions85 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 85
- caorushizi/mediago★ 9.3ksame name
- openai/plugins★ 7.8ksame name
- plugin87/ux-ui-agent-skills★ 3.1ksame name
- hamzafarooq/claude-code-starter★ 145same name
- imMamdouhaboammar/motion-graphics-skills★ 50same name
- kresogalic8/unwatched★ 35same name
- jmxt3/gitscape.ai★ 33same name
- fathomise/MailFathom★ 21same name
- Krzysztof318/MailFathom★ 21same name
- ivanrvpereira/.agents★ 19same name
75 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- awesome-designSkill
- motionSkill
- tasteSkill
- web-design-guidelinesSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 13 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 82 edited versions we read keep these.
13
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Do not write code yet. Look at the image and write down:
- Distinctive: line 19
If the image is too small or too compressed to measure, say so and ask for a better one.
- Distinctive: line 34
Write the measured values down as a spacing scale.
- Distinctive: line 35
Check vertical rhythm: distance from heading to body, body to action, section to section.
- Distinctive: line 36
Check alignment: which edges line up across regions?
- Distinctive: line 37
Check radii, border widths and icon sizes the same way.
- Distinctive: line 41
Use semantic elements. A screenshot cannot show them, so infer: nav, main, headings in order, buttons versus links.
- Distinctive: line 42
Use the real text from the image, exactly.
- Distinctive: line 43
Add the states the image cannot show: hover, focus-visible, pressed, disabled, empty, error.
- Distinctive: line 49
Put a comment block at the top of the output with a divergence table.
- Distinctive: line 68
If you changed it, it has a row.
- Distinctive: line 71
If there are no divergences, write "None found" and list what you checked.
- Distinctive: line 72
Never fix the source design without a row.
“Common” is measured: kept by at least 6 in 10 of the 82 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Image to code
The goal is fidelity. You are reproducing a design someone already made, not improving it. Save opinions for the divergence table.
1. Measure before writing
Do not write code yet. Look at the image and write down:
- Canvas: the image width and height in pixels, and the likely device scale (1x, 2x, 3x). Divide by the scale to get CSS pixels.
- Grid: the content width, the number of columns, the gutter, the outer margins.
- Regions: header, nav, main, sidebars, footer, with the size of each.
- Repeated elements: measure one, then check two others. Differences are information.
If the image is too small or too compressed to measure, say so and ask for a better one. Do not guess quietly.
2. Extract the palette and type sizes first
Palette. List every distinct colour with its hex value and its job: page, surface, border, text, muted text, accent, status. Sample from flat areas, away from antialiased edges. Merge values that differ by compression noise. Expect fewer than twelve.
Type. List every distinct text size with its weight, line height and letter spacing. Measure cap height or x-height and convert; do not estimate from "looks like 16". Name the typeface if you can identify it. If you cannot, say what you chose in its place and why.
Turn both lists into variables before any component code exists. If the project has tokens already, map each measured value to the nearest token and record the difference.
3. Reproduce spacing, not just layout
Getting the boxes in the right order is the easy half. The spacing is what makes it look like the source.
- Measure the padding inside every container and the gaps between siblings.
- Write the measured values down as a spacing scale. Most designs use five to eight values.
- Check vertical rhythm: distance from heading to body, body to action, section to section.
- Check alignment: which edges line up across regions? Reproduce the shared edges.
- Check radii, border widths and icon sizes the same way.
4. Build
- Use semantic elements. A screenshot cannot show them, so infer: nav, main, headings in order, buttons versus links.
- Use the real text from the image, exactly. Mark any text you could not read.
- Add the states the image cannot show: hover, focus-visible, pressed, disabled, empty, error. Derive them from the palette you extracted, and list them as additions.
- Images and icons you do not have become labelled placeholders with the measured size. Do not substitute a stock icon and call it done.
- Pick breakpoints only where you have evidence. For widths you were not shown, keep the proportions and say so.
5. Record every divergence
Put a comment block at the top of the output with a divergence table. One row for each place the code differs from the source, however small.
/*
DESIGN DIVERGENCE
Source: checkout-mockup.png (2880 x 1800 at 2x, so 1440 x 900 CSS px)
| Element | Source value | Implemented value | Reason |
| --------------- | ------------------ | -------------------- | ---------------------------------------- |
| Body text | #8a8a8a on #ffffff | #6b6b6b on #ffffff | Source is 3.45:1, below the 4.5:1 floor |
| Card padding | 22px | 24px | Snapped to the project 4px grid |
| Heading font | Unidentified serif | Source Serif 4 | Could not identify; closest open match |
| Promo code link | No focus state | 2px outline, offset 2| State not shown in source; added |
| Footer | Cropped in image | Not implemented | Not enough of it visible to measure |
*/Rules for the table:
- If you changed it, it has a row. "Close enough" is a divergence.
- The reason names the cause: accessibility, a project token, missing information, a technical limit.
- Things you added that the source does not show are divergences too.
- If there are no divergences, write "None found" and list what you checked.
- Never fix the source design without a row. The designer may have meant it.
6. Compare
Render the result at the source size and compare region by region. If you can take a screenshot, overlay it on the source. Fix what differs, or add a row.
Then tell the person the three largest divergences in plain words, so they do not have to read the table to find out.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

