screenshot-to-code
Skill2 starsChanged 24 days agoMITView on GitHub
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 visual gaps. Use whenever the user shares an image of a website, app screen, dashboard, component, or wireframe and wants it built, cloned, recreated, or "made real", or says "code this up", "build this design", or "match this screenshot".
3 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- glebrati-cloud/screenshot-to-codetheir own version, first seen Oct 25, 2026
- furqanistic/aura-skillstheir own version, first seen Oct 17, 2026
- OneWave-AI/claude-skillsedited, first seen Sep 21, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- OneWave-AI/claude-skills★ 378100% same
Wrote their own version · 2
- furqanistic/aura-skills★ 8same name
- glebrati-cloud/screenshot-to-code★ 3same name
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 repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-newsSkill
- break-uiSkill
- ci-cd-and-automationSkill
- clickup-task-breakdownSkill
- client-facing-docsSkill
- codebase-designSkill
- design-auditSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- express-prisma-patternSkill
- frontend-designSkill
- game-assetsSkill
- game-design-docSkill
- grillingSkill
- improve-codebase-architectureSkill
- motion-dictionarySkill
- playwright-cliSkill
- prisma-schema-conventionsSkill
- rag-architectSkill
- rbac-designSkill
- redesign-existing-projectsSkill
- secrets-gitleaksSkill
- security-auditSkill
- sentry-setup-ai-monitoringSkill
- tddSkill
- token-efficiencySkill
- web-design-guidelinesSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Pick the target stack: If the user is inside a project, match it: read package.json for React/Next/Vue and the Tailwind version, and reuse …
- Distinctive: line 60
Guessing the stack: when the repo already defines it, or mixing Tailwind v3 config into a v4 project.
- Distinctive: line 65
Claiming a match without looking: If you could not render the result, say the comparison was not done.
“Common” is measured: kept by at least 6 in 10 of the 3 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
Provenance: github.com/OneWave-AI/claude-skills (screenshot-to-code), audited 2026-10-13 (SKILL.md read in full, instruction-only, no scripts). Why: user sends a screenshot of a UI he likes and it is rebuilt faithfully, with a render-and-compare loop. Replaces image-to-code from taste-skill, which needs an image generator that Claude Code lacks.
Screenshot to Code
Recreate the UI in the image as clean, responsive, accessible code, then check the render against the image.
Workflow
- Pick the target stack. If the user is inside a project, match it: read
package.jsonfor React/Next/Vue and the Tailwind version, and reuse existing components, tokens, and icon libraries. Do not ask when the repo already answers it. With no project:- Single screen or quick prototype: one self-contained
index.html(Tailwind via the browser build, see references/stack-setup.md). - App or multi-screen: React + TypeScript + Tailwind v4 on Vite.
- User mentions Next.js, SSR, or routing: Next.js App Router.
- Single screen or quick prototype: one self-contained
Write a short spec before coding. Looking at the image, note:
- Layout regions top to bottom (nav, hero, sidebar, grid, footer) and the grid or flex structure of each
- Design tokens: 3-6 colors as hex, font family guess and the type scale, spacing rhythm (usually multiples of 4px), corner radius, shadow style
- Repeated components (cards, list rows, buttons) that should be one component with props
- What the image cannot show: hover and focus states, mobile layout, real data, content below the fold
Estimate sizes from the image resolution. If the screenshot is 2x (a Retina capture 2880px wide is a 1440px layout), halve the pixel measurements.
- Build. Use semantic elements (
header,nav,main,section,button,a), extract repeated pieces into components, and put tokens in one place (Tailwind v4@themeor CSS custom properties) rather than scattering hex codes. Use real text from the image, not lorem ipsum. For images and logos you cannot extract, use sized placeholders with descriptivealttext. Use an icon library the project already has (default:lucide-react), not hand-drawn SVGs or emoji. - Make it responsive. Build for the screenshot's viewport first, then define how it collapses: multi-column grids stack, navs become a menu button, and type scales down with
clamp()or responsive utilities. If the screenshot is mobile, go the other direction. - Render and compare. If you can run a browser (Playwright, a headless browser, or a browser tool), screenshot the result at the source image's viewport width and compare side by side. See references/visual-check.md. Fix the largest differences first: layout and alignment, then spacing, then type size and weight, then color. Two or three passes is usually enough; stop when remaining differences are at the level of font rendering.
- Deliver. Provide the files, how to run them, and a short list of assumptions (fonts guessed, states invented, content inferred). Name anything that needs real assets.
Stack notes
- React 19: function components with TypeScript prop types.
propTypeschecks were removed from React 19; do not add them.forwardRefis not needed for passingrefto function components. - Tailwind CSS v4: configuration lives in CSS. Use
@import "tailwindcss";and@theme { --color-brand: #...; }, not atailwind.config.jsand not the v3@tailwind base/components/utilitiesdirectives. Custom tokens become utilities automatically (bg-brand). - Next.js (App Router): pages in
app/, components are Server Components by default. Add"use client"only to components that use state, effects, or event handlers. - Create React App is deprecated. Use Vite for plain React.
Setup commands for each stack are in references/stack-setup.md.
Worked example
Input: a 1440px-wide screenshot of a pricing section - centered heading, three plan cards with the middle one highlighted, feature checklists, and a button per card.
Spec:
- Regions: heading block, then a 3-column card grid, max width about 1100px, 24px gap
- Tokens: background
#0B1220, card#111A2E, accent#3B82F6, text#E5E7EB, muted#94A3B8; Inter-like sans; radius 12px - Components:
PlanCardwithname,price,features[],highlighted,cta - Unknowns: hover states, monthly/annual toggle behavior, mobile layout
Build: PricingSection.tsx mapping a plans array into PlanCard; highlighted adds an accent border and a "Most popular" label; grid-cols-1 md:grid-cols-3. Check icons from lucide-react.
Compare: the first render has cards 40px too tall because of button padding, and the heading weight is 600 against a 700 in the image. Fix both, re-render, and deliver with an assumptions list: toggle not built, font assumed Inter.
Failure modes
- Guessing the stack when the repo already defines it, or mixing Tailwind v3 config into a v4 project.
- Absolute positioning to force a pixel match. It breaks on the first resize. Use flex and grid, and accept small differences.
- One giant component. Anything that repeats three times is a component with props.
- Invisible states. Buttons and links need hover and
focus-visiblestyles even though the screenshot cannot show them. Inputs need labels. - Color drift. Sample colors from flat areas of the image, not anti-aliased edges or gradients, and check text contrast meets WCAG AA (4.5:1 for body text).
- Claiming a match without looking. If you could not render the result, say the comparison was not done.
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.

