Design to code

From onfire7777/universal-ai-skills-library · View interactive version

Design to code is an AI agent skill from the GitHub repository onfire7777/universal-ai-skills-library. Implements UI from design mockups (Figma, Sketch, or image) with pixel-accurate layout, responsive behavior, and design tokens.

How to use this skill

Skill file

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

Execution Process

1. Analyze the Design Mockup

2. Align Design Tokens

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

Output Conventions

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-*) |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.