screenshot-to-code
Converts visual UI designs from screenshots into responsive, production-ready code.
Install
mkdir -p .claude/skills/screenshot-to-code && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/109" && unzip -o skill.zip -d .claude/skills/screenshot-to-code && rm skill.zipInstalls to .claude/skills/screenshot-to-code
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Convert UI screenshots into working HTML/CSS/React/Vue code. Detects design patterns, components, and generates responsive layouts. Use this when users provide screenshots of websites, apps, or UI designs and want code implementation.Key capabilities
- →Analyze UI layout structure and component hierarchy
- →Generate responsive code using React, Vue, or HTML/CSS
- →Extract design tokens like colors, spacing, and typography
- →Implement accessibility attributes and semantic HTML
- →Apply modern CSS patterns like Flexbox and Grid
How it works
The agent visually analyzes the screenshot to identify layout patterns and components, then generates clean, semantic code based on the preferred framework.
Inputs & outputs
When to use screenshot-to-code
- →Translating designs to HTML/CSS
- →Generating React components from mockups
- →Implementing responsive UI layouts
- →Extracting design tokens from images
About this skill
Screenshot to Code
Convert UI screenshots into production-ready code with accurate styling and structure.
How This Works
Given a screenshot of a UI design:
- Analyze the visual design thoroughly
- Generate clean, modern code that recreates it
- Provide complete, runnable implementation
Instructions
1. Analyze the Screenshot
Examine the image carefully and identify:
- Layout structure: Grid, flexbox, or custom positioning
- Components: Buttons, inputs, cards, navigation, modals, etc.
- Visual details: Colors, fonts, spacing, borders, shadows, borders-radius
- Responsive considerations: Mobile vs. desktop layout cues
2. Determine the Framework
Ask which framework is preferred:
- React (with Tailwind CSS or styled-components)
- Vue.js
- Plain HTML/CSS
- Next.js
Default: If not specified, use React with Tailwind CSS for modern designs, or plain HTML/CSS for simple pages.
3. Generate Complete Code
Create the implementation:
For React/Vue:
- Build component hierarchy (break into logical components)
- Use semantic HTML elements
- Implement modern CSS (flexbox, grid, custom properties)
- Include prop types and sensible defaults
For HTML/CSS:
- Use semantic HTML5 structure
- Write clean, organized CSS (consider using BEM naming)
- Make it responsive by default
Critical requirements:
- Match colors EXACTLY (extract hex codes from screenshot)
- Match spacing and proportions as closely as possible
- Use appropriate semantic elements (header, nav, main, section, etc.)
- Include accessibility attributes (alt text, ARIA labels where needed)
4. Make It Responsive
- Use responsive units (rem, em, %, vw/vh) rather than fixed pixels
- Add breakpoints for mobile, tablet, desktop if the design suggests it
- Use
min(),max(),clamp()for fluid typography where appropriate
5. Deliver Complete Implementation
Provide:
- Complete code (all files needed, fully functional)
- File structure (explain what each file does)
- Usage instructions (how to run/use the code)
- Notes on design decisions (any assumptions or interpretations)
Output Format
Structure React + Tailwind output like this:
import React from 'react';
export default function ComponentName() {
return (
<div className="...">
{/* Component structure */}
</div>
);
}
Always include:
- All necessary imports
- Any required dependencies
- Clear comments for complex sections
- Suggestions for improvements or next steps
Best Practices
- Accuracy: Match the design as closely as possible
- Modern CSS: Prefer Grid/Flexbox over floats or tables
- Accessibility: Include ARIA labels, alt text, semantic HTML
- Performance: Optimize images, use efficient selectors
- Maintainability: Write clean, well-organized code with comments
- Responsiveness: Design mobile-first when possible
Common Patterns
Navigation Bars: Flexbox with space-between, sticky positioning Card Grids: CSS Grid with auto-fit/auto-fill for responsiveness Hero Sections: Full-height with centered content, background images Forms: Proper labels, validation states, accessible inputs Modals: Fixed positioning, backdrop, focus management
Handling Unclear Screenshots
When the screenshot is unclear or ambiguous:
- Make reasonable assumptions based on common UI patterns
- Note the chosen interpretation in comments
- Suggest alternatives that might be preferred
- Ask for clarification on critical decisions
Example Workflow
Input: Screenshot of a landing page with hero section, feature cards, and footer
Response:
- Analyze: Hero with large headline, 3-column feature grid, simple footer
- Ask: "Would you like this in React with Tailwind or plain HTML/CSS?"
- Generate: Complete implementation with responsive design
- Deliver: All code files with clear structure and usage instructions
Aim to produce code so clean and accurate that it could be deployed immediately with minimal modifications.
When not to use it
- →Complex backend-heavy application logic
- →Non-UI related image processing tasks
Limitations
- →Ambiguous designs require agent assumptions
- →Complex interactions may need manual refinement
How it compares
It automates the translation of visual design to code, whereas manual approaches require writing CSS and markup from scratch.
Compared to similar skills
screenshot-to-code side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| screenshot-to-code (this skill) | 204 | 2mo | No flags | Beginner |
| web-artifacts-builder | 49 | 3mo | Review | Intermediate |
| visual-design-foundations | 5 | 5mo | No flags | Beginner |
| frontend-design | 0 | 3mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by OneWave-AI
View all by OneWave-AI →You might also like
web-artifacts-builder
anthropics
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
visual-design-foundations
wshobson
Apply typography, color theory, spacing systems, and iconography principles to create cohesive visual designs. Use when establishing design tokens, building style guides, or improving visual hierarchy and consistency.
frontend-design
riabtsev
Create distinctive, production-grade frontend interfaces with high design quality. Generates creative, polished code that avoids generic AI aesthetics. Use when the user asks to build web components, pages, artifacts, posters, or applications, or when any design skill requires project context.
premium-frontend-ui
TorchiaHub
A comprehensive guide for GitHub Copilot to craft immersive, high-performance web experiences with advanced motion, typography, and architectural craftsmanship.
dark-mode-implementer
zinohome
Implements complete dark/light mode theming systems using CSS variables, Tailwind dark mode, React context, and system preference detection. Use when users request "add dark mode", "theme toggle", "dark theme", "light mode switch", or "color scheme".
UI/UX Myth
ildunari
|