screenshot-to-code
Skill3 starsChanged 8 months agoMITView on GitHub
Convert any screenshot, mockup, or design image into clean, production-ready code. Use this skill whenever the user shares a screenshot, UI mockup, Figma export, wireframe, or any visual reference and wants it turned into working code. Also trigger when the user says things like "build this", "code this design", "replicate this UI", "make this page", "convert this to HTML/React/Vue/Tailwind", or pastes an image with an implied request to recreate it. Works for full pages, individual components, dashboards, landing pages, forms, navbars, cards -- anything visual.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- JoaoEquer/Oficinatheir own version, first seen Nov 1, 2026
- furqanistic/aura-skillstheir own version, first seen Oct 17, 2026
- OneWave-AI/claude-skillstheir own version, first seen Sep 21, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- OneWave-AI/claude-skills★ 378same name
- furqanistic/aura-skills★ 8same name
- JoaoEquer/Oficina★ 2same 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.
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
6
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 20
Every border-radius, shadow, and spacing decision matters.
- Distinctive: line 27
Before writing any code, study the image systematically:
- Distinctive: line 70
Default based on context, or ask the user:
- Distinctive: line 111
All images need descriptive alt text
- Distinctive: line 166
Blurry screenshots: Do your best, note areas where you had to guess
- Distinctive: line 171
Charts/graphs: Use placeholder data with the correct visual structure
“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
Screenshot to Code
Transform any visual reference into clean, responsive, production-ready code.
Core Philosophy
Users don't want "roughly similar" -- they want code that looks identical to their reference. Every border-radius, shadow, and spacing decision matters. But the code must also be clean enough for a developer to actually maintain it.
Workflow
Step 1: Deep Visual Analysis
Before writing any code, study the image systematically:
Layout
- Identify the grid system (12-col grid? Custom?)
- Map the component hierarchy: page > sections > components > elements
- Note flexbox vs grid patterns
- Identify fixed/sticky elements
Design Tokens Extract a complete design system from the image:
Colors:
--primary: #___ (brand color, CTAs, links)
--secondary: #___ (accents, secondary actions)
--bg: #___ (page background)
--surface: #___ (card/panel backgrounds)
--text: #___ (primary text)
--text-muted: #___ (secondary text, placeholders)
--border: #___ (dividers, outlines)
--accent: #___ (highlights, badges, notifications)
Spacing: Identify the base unit (4px? 8px?) and the scale
Typography: Font family hints, size scale, weight usage
Radius: Identify border-radius patterns (sharp? rounded? pill?)
Shadows: Note shadow depth levels usedComponents List every distinct UI component visible:
- Navigation (type, items, active states)
- Content areas (cards, lists, tables, text blocks)
- Interactive elements (buttons, inputs, dropdowns, toggles)
- Feedback elements (alerts, badges, tooltips, progress bars)
- Media (images, icons, avatars, charts)
Responsive Clues
- Is this clearly a desktop view? Mobile? Tablet?
- What would logically stack, collapse, or hide at smaller sizes?
- Are there sidebar patterns that should become drawers on mobile?
Step 2: Choose Output Format
Default based on context, or ask the user:
| What you see | Default output |
| Simple static page / landing page | Single HTML file (HTML + CSS + JS) |
| UI component / widget | React + Tailwind CSS (.jsx) |
| Full app with multiple components | React + Tailwind with component files |
| Email template | HTML with inline CSS |
| Dashboard with data | React + Tailwind + Recharts placeholders |
Supported stacks:
- HTML/CSS/JS -- Zero dependencies, works everywhere
- React + Tailwind -- Industry standard, prefer for components
- Vue 3 -- Composition API with script setup
- Svelte -- Minimal boilerplate
- React + CSS Modules -- When Tailwind is not wanted
Step 3: Generate Production Code
Pixel Accuracy Rules
- Colors must be exact hex values extracted from the image -- never approximate
- Spacing must be precise -- if it looks like 12px gap, use 12px not 0.75rem
- Border-radius, shadows, opacity: match exactly what you see
- Typography: match size, weight, line-height, and letter-spacing
- Icons: identify the icon library (Lucide, Heroicons, etc.) and use the correct icons
Code Quality Rules
- Semantic HTML: nav, main, section, article, aside, footer
- Meaningful names: .pricing-card__price, not .div-3
- CSS custom properties for design tokens (colors, spacing, radius)
- Component decomposition: if a UI element appears 2+ times, it is a component
- Comments only for non-obvious layout decisions
Responsive Rules
- Mobile-first: base styles for mobile, @media queries for larger screens
- At minimum: mobile (< 768px) and desktop (>= 768px)
- Navigation: hamburger menu with toggle on mobile
- Grid layouts: reduce columns on smaller screens
- Touch targets: minimum 44px on mobile
Accessibility Rules
- All images need descriptive alt text
- Form inputs must have associated label elements
- Interactive elements must be keyboard-navigable
- Color contrast must meet WCAG AA (4.5:1 for text)
- ARIA labels for icon-only buttons
- Focus visible styles must not be removed
Step 4: Deliver
- Save as a working file the user can open/import immediately
- HTML files should render correctly when opened in a browser
- React components should be valid, importable, and self-contained
- Note any assumptions made about ambiguous parts of the design
- Proactively offer to refine specific areas
Pattern Library
Navigation
Desktop: Logo | Nav Links (with active indicator) | CTA Button
Mobile: Logo | Hamburger > Slide-out or dropdown menu
Sticky: position: sticky; top: 0; z-index: 50; backdrop-filter: blur;Hero Sections
Full-width container with constrained content (max-width: 1200px)
Headline (text-5xl/6xl) > Subtitle (text-xl, muted) > CTA group
Background: gradient | image with overlay | solid with patternCard Grids
CSS Grid: grid-template-columns: repeat(auto-fill, minmax(300px, 1fr))
Card: surface bg + subtle shadow + radius + padding + hover:shadow-lg transition
Responsive: 3 cols > 2 cols > 1 colDashboards
Layout: Fixed sidebar (240px) + scrollable main content
Sidebar: Logo + nav groups with icons + user profile at bottom
Main: Header bar + stat cards row + chart area + table
Mobile: Sidebar becomes a drawer with overlayForms
Stack labels above inputs (not inline)
Input states: default > focus (ring) > error (red border + message) > disabled (opacity)
Submit button: full-width on mobile, auto-width on desktopEdge Cases
- Blurry screenshots: Do your best, note areas where you had to guess
- Partial screenshots: Build what is visible, use sensible defaults for cut-off areas
- Dark mode only: Build dark mode, add a note about light mode adaptation
- Non-English text: Preserve the original text in the code, use UTF-8
- Complex animations: Implement static version first, add CSS transitions for hover/focus
- Charts/graphs: Use placeholder data with the correct visual structure
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.

