Skip to content
Back to skills

Design To Code

ASecurity

Implements UI from design mockups (Figma, Sketch, or image) with pixel-accurate layout, responsive behavior, and design tokens.

  • 16 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
ai-agentsnextjsfrontend

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add onfire7777/universal-ai-skills-library --skill design-to-code --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Design To Code?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Design To Code
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/onfire7777-design-to-code/badge)](https://www.skillsdirectory.com/skills/onfire7777-design-to-code)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: design-to-code
description: Implements UI from design mockups (Figma, Sketch, or image) with pixel-accurate layout, responsive behavior, and design tokens.
license: Unspecified
---
# Design to Code (Restore Design Mockups)

Faithfully convert design mockups (Figma/Sketch/image) into frontend code, ensuring consistency in layout, spacing, typography, colors, and interactions.

## Trigger Scenarios

- User says "design to code," "implement according to design," "slice images," or "convert design to code"
- Provides Figma/Sketch link, design screenshot, or annotations
- Needs to implement UI for a specific page/component

## Execution Process

### 1. Analyze the Design Mockup

- **Annotations**: dimensions, spacing (padding/margin/gap), font size and line height, colors (including opacity), border radius, shadows, borders
- **Hierarchy**: component division, nesting relationships, reusable modules
- **States**: default / hover / focus / disabled / loading / empty / error
- **Responsive**: breakpoints, layout changes at different widths (grid, wrapping, hiding)

### 2. Align Design Tokens

- Map colors, font sizes, and spacing to existing project CSS variables or Tailwind configuration whenever possible
- If no existing tokens, use variable naming (e.g., `--color-primary`) during implementation for future unification

### 3. Implementation Priority

1. **Layout**: Build skeleton with Flex/Grid to ensure alignment and spacing
2. **Typography**: font family, size, weight, line height, color
3. **Visuals**: background, borders, border radius, shadows
4. **Interaction States**: hover/focus/disabled, etc.
5. **Responsive**: breakpoints and flexible layouts
6. **Animations**: add transitions/animations if specified in design

### 4. Self-Check for Fidelity

- [ ] Key dimensions match design mockup (allowing 1–2px difference)
- [ ] Fonts and colors match design
- [ ] Layout is reasonable and without misalignment at main breakpoints
- [ ] Interactive elements have clear state feedback

## Output Conventions

- Use existing project tech stack (e.g., Next.js, Tailwind, SCSS, component libraries)
- Componentization: extract reusable parts into clearly named components
- Semantic HTML + appropriate ARIA (buttons, links, forms)
- Note any deviations from design and reasons (e.g., compatibility, accessibility) when necessary

## Common Correspondences

| Design Mockup | Implementation Method |
|---------------|----------------------|
| 8px grid      | Spacing uses multiples of 8 (8/16/24/32) |
| Typography hierarchy | Corresponds to semantic classes like heading/body/caption or design tokens |
| Blur/Frosted glass | backdrop-filter + semi-transparent background |
| Multi-line truncation | line-clamp or -webkit-line-clamp |
| Safe area    | padding combined with env(safe-area-inset-*) |

Files in this skill

  • README.md718 B
  • SKILL.md2.8 KB
  • _meta.json289 B
  • clawhub.json791 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…