mockup-to-code
Use when converting UI mockups, screenshots, Figma/Sketch designs, wireframes, or building component libraries from design systems into production-ready code
Best use case
mockup-to-code is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use when converting UI mockups, screenshots, Figma/Sketch designs, wireframes, or building component libraries from design systems into production-ready code
Teams using mockup-to-code should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/mockup-to-code/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How mockup-to-code Compares
| Feature / Agent | mockup-to-code | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use when converting UI mockups, screenshots, Figma/Sketch designs, wireframes, or building component libraries from design systems into production-ready code
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Mockup to Code Skill Convert UI mockups, screenshots, and designs into production-ready code. ## When to Use - Converting Figma/Sketch mockups to React/Vue/HTML - Implementing pixel-perfect designs - Building component libraries from design systems - Rapid prototyping from wireframes ## Core Workflow ### Phase 1: Design Analysis ``` Analyze this UI mockup and extract: 1. LAYOUT STRUCTURE - Grid system (columns, gutters, margins) - Component hierarchy - Container widths 2. VISUAL SPECIFICATIONS - Colors (hex values) - Typography (sizes, weights) - Spacing (padding, margins, gaps) - Border radius, shadows 3. COMPONENTS IDENTIFIED - List each distinct component - Note variations - Identify reusable patterns 4. RESPONSIVE CONSIDERATIONS - How might this adapt to mobile? - Collapsible sections - Priority content Output as structured JSON. ``` ### Phase 2: Component Breakdown ```markdown ## Component: [Name] **Priority:** High/Medium/Low **Complexity:** Simple/Medium/Complex **Reusability:** One-off/Reusable/Design System **Props Interface:** - variant: 'primary' | 'secondary' - size: 'sm' | 'md' | 'lg' - disabled?: boolean **Accessibility:** - Keyboard navigation - ARIA labels - Focus management ``` ### Phase 3: Implementation Implement with comparison loop: ``` Compare mockup vs implementation: 1. What differences do you see? 2. What's missing? 3. Spacing/sizing adjustments needed? 4. Color accuracy? 5. Typography match? Prioritize fixes by visual impact. ``` ## Technology Patterns ### React + Tailwind ``` Convert to React with Tailwind CSS. Requirements: - Functional components with TypeScript - Tailwind utility classes - Extract repeated patterns - Semantic HTML - Responsive classes (sm:, md:, lg:) ``` ### Vue 3 ``` Convert to Vue 3 component. Requirements: - Composition API with <script setup> - Scoped styles - Props with TypeScript ``` ### Plain HTML/CSS ``` Convert to semantic HTML and CSS. Requirements: - Semantic HTML5 elements - CSS Grid/Flexbox layout - CSS custom properties ``` ## Quality Checklist ### Visual Fidelity - [ ] Colors match exactly - [ ] Typography matches - [ ] Spacing is consistent - [ ] Border radius matches - [ ] Shadows correct ### Responsiveness - [ ] Desktop layout matches - [ ] Tablet works - [ ] Mobile is usable - [ ] No horizontal scroll ### Interactions - [ ] Hover states - [ ] Focus states - [ ] Transitions smooth ### Code Quality - [ ] Properly typed - [ ] Sensible defaults - [ ] Uses tokens (no hardcoded values) - [ ] Accessible markup ## Storage Save implementations to `.opencode/memory/design/implementations/` ## Related Skills | Need | Skill | | ----------------- | --------------------- | | Aesthetic quality | `frontend-design` | | Accessibility | `accessibility-audit` | | Design tokens | `design-system-audit` |
Related Skills
bgo
Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.
aqwa-analysis
Integrate with AQWA hydrodynamic software for RAO computation, damping analysis, and coefficient extraction. Use for AQWA file processing, RAO calculation, hydrodynamic coefficient extraction, and pre/post processing workflows.
aptos-expert
Expert on Aptos blockchain, Move language, smart contracts, NFTs, DeFi, and Aptos development. Triggers on keywords aptos, move, blockchain, smart contract, nft, defi, web3, mainnet, testnet, devnet
appwrite-python
Appwrite Python SDK skill. Use when building server-side Python applications with Appwrite, including Django, Flask, and FastAPI integrations. Covers user management, database/table CRUD, file storage, and functions via API keys.
appveyor-automation
Automate Appveyor tasks via Rube MCP (Composio). Always search tools first for current schemas.
appsflyer-automation
Automate Appsflyer tasks via Rube MCP (Composio). Always search tools first for current schemas.
apprun-skills
End-to-end guidance for AppRun apps in TypeScript using MVU: component patterns, event handling, state management (including async generators), routing/navigation with params and guards, and testing with vitest. Use when designing or reviewing AppRun components, wiring routes, managing state flows, or writing AppRun tests.
appointo-automation
Automate Appointo tasks via Rube MCP (Composio). Always search tools first for current schemas.
applying-fsd-architecture
Feature-Sliced Design(FSD) 아키텍처를 적용한 프론트엔드 프로젝트 개발 지원. FSD 레이어, 슬라이스, 세그먼트 구조 설계, 의존성 규칙 적용, 마이그레이션 시 사용.
applying-frontend-patterns
Framework-agnostic frontend component design patterns.
applying-clean-code
General syntax and naming rules to keep the codebase maintainable. Use for all code generation.
apply-key-principles
Apply and validate the 7 Key Principles to code - TDD, Fail Fast, Modular, Reuse, Open Source, No Debt, Excellence. Checks code compliance and suggests improvements. Use during code review or refactoring.