design-to-code
Skill49 starsChanged 21 days agoMITView on GitHub
Use when a design (a Figma frame, a screenshot, or a handoff spec) must become production UI in an existing codebase — collect every state and breakpoint, map the design to the project's tokens and components, implement only that scope, and compare the result to the design at each width before calling it done.
14 other projects use a version of this.
Adopted by
Most recently taken up by
- JPeetz/agent-skillstheir own version, first seen Nov 14, 2026
- Atharvsinh-codez/skillstheir own version, first seen Nov 8, 2026
- fitoe/DesignToCodetheir own version, first seen Nov 1, 2026
- naman10parikh/pixeltheir own version, first seen Oct 25, 2026
- toribryan/design-skillstheir own version, first seen Oct 25, 2026
- Geruyang/skillstheir own version, first seen Oct 15, 2026
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- Atharvsinh-codez/skills★ 122same name
- MigoXLab/coderio★ 114same name
- nahid-sparktales/agent-dispatcher★ 59same name
- JPeetz/agent-skills★ 17same name
- fitoe/DesignToCode★ 9same name
- jdanigo/hydraia★ 8same name
- jawwad-ali/claude-code-skills★ 4same name
- Geruyang/skills★ 2same name
- HACK-WU/skills★ 2same name
- Timmyy3000/skills★ 2same name
4 more not listed
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.
In this repository114 other files it gives its agents.
- AGENTS.mdAGENTS.md
- COPILOT-INSTRUCTIONS.mdCopilot instructions
- .github/copilot-instructions.mdCopilot instructions
- ai-visibilitySkill
- content-strategySkill
- seoSkill
- actions-debuggingSkill
- agentic-engineeringSkill
- autopilot-patternsSkill
- background-agentSkill
- context-primeSkill
- copilot-memorySkill
- cross-session-memorySkill
- ecosystem-intakeSkill
- fleet-parallelSkill
- github-code-searchSkill
- github-codespaces-efficiencySkill
- github-issue-triageSkill
- github-pr-workflowSkill
- ide-switchingSkill
- knowledge-curatorSkill
- mcp-builderSkill
- mcp-ecosystemSkill
- multi-model-strategySkill
- plan-mode-masterySkill
- scope-guardSkill
- session-managementSkill
- stack-detectorSkill
- sub-agent-sandboxingSkill
- task-intake-routerSkill
- team-plannerSkill
- token-cost-optimizerSkill
- api-and-interface-designSkill
- code-reviewSkill
- context-engineeringSkill
- cpp-debuggingSkill
- deprecation-and-migrationSkill
- diagnoseSkill
- fix-build-errorsSkill
- fix-github-issueSkill
- go-runtime-debuggingSkill
- implementSkill
- improve-codebase-architectureSkill
- nestjs-prismaSkill
- nextjs-prismaSkill
- performance-optimizationSkill
- pr-multi-perspective-reviewSkill
- prototypeSkill
- react-vitestSkill
- receiving-code-reviewSkill
- refactor-cleanSkill
- reviewSkill
- skill-creatorSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- systematic-debuggingSkill
- tdd-workflowSkill
- zoom-outSkill
- add-to-changelogSkill
- api-documentationSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 10 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
10
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 34
Read access to the design: a Figma MCP server or export, or image files of every frame
- Distinctive: line 48
Write down the states and widths the design does not show.
- Distinctive: line 53
Before writing markup, map each visual value to what the codebase already has:
- Distinctive: line 61
Do not hardcode raw hex values or pixel sizes when a token exists.
- Distinctive: line 68
Leave data fetching and backend wiring as clearly marked stubs if they are out of scope
- Distinctive: line 69
Do not restyle neighbouring components to make the new one fit
- Distinctive: line 75
Run the app or preview and capture a screenshot at each breakpoint from step 1.
- Distinctive: line 80
If you cannot run the UI or take screenshots in this environment, say so and mark visual fidelity as unverified rather than claiming a …
- Distinctive: line 108
If verification shows the change broke another component, revert the unrelated part and keep the diff to the designed scope.
- Distinctive: line 115
Ask for the missing states before building them when a designer is available — a one-line question is cheaper than a second review round
“Common” is measured: kept by at least 6 in 10 of the 12 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
Design to Code
A design file shows one or a few states at one or a few widths. Production UI needs all of them, built from the components and tokens the project already has. This skill turns a design into code that matches it where the design is specific, follows the design system where it is not, and says plainly what could not be verified.
When to Use
- You have a Figma URL or frame, a screenshot, or a written handoff for a component or page
- The UI must ship in an existing app with its own design tokens and component library
- A reviewer will compare the result against the design
When NOT to Use
| Instead of design-to-code | Use |
| A throwaway mock to answer one product question | prototype |
| Reviewing an existing UI for usability or accessibility problems | ux-audit |
| Debugging a layout bug in running code | browser-devtools |
| Testing a finished flow end to end | e2e-testing |
Prerequisites
- Read access to the design: a Figma MCP server or export, or image files of every frame
- The project's design tokens (colors, spacing, type, radius) and component library location
- A way to run the app or a component preview (Storybook, a dev route) and take screenshots
Workflow
1. Inventory the Design
List every frame you received and what it represents. For each, note:
- Breakpoints shown (for example 375, 768, 1280 px)
- States shown: default, hover, focus, disabled, loading, empty, error, long content
- Interactions the design implies but does not draw (menus opening, validation messages)
Write down the states and widths the design does not show. Those are decisions to make with the design system's conventions or to ask about — not to invent silently.
2. Map to Tokens and Components
Before writing markup, map each visual value to what the codebase already has:
| In the design | Map to |
| A color, spacing, radius, or font value | The nearest design token; flag values with no token |
| A button, input, card, or dialog | The existing component and its props |
| A new pattern | A composition of existing components, or a new component if none fits |
Do not hardcode raw hex values or pixel sizes when a token exists. When a design value has no token, list it for the reviewer instead of adding a one-off value.
3. Implement Only the Scope
Build the component or page with the mapped pieces. Keep to the frames you received:
- Leave data fetching and backend wiring as clearly marked stubs if they are out of scope
- Do not restyle neighbouring components to make the new one fit
- Implement the required missing states from step 1 with established component behavior; ask, or mark the work blocked, when no safe convention exists
4. Compare at Every Width
Run the app or preview and capture a screenshot at each breakpoint from step 1. Compare each one to its frame and record differences item by item (spacing, alignment, type, color, truncation). Fix differences that come from the implementation; list differences that come from a token or component the design deviates from.
If you cannot run the UI or take screenshots in this environment, say so and mark visual fidelity as unverified rather than claiming a match.
Common Rationalizations
| Rationalization | Reality |
| "Close enough to the mock" | Reviewers compare side by side; record each difference or fix it |
| "The design didn't show an error state, so there isn't one" | Users still hit errors; use the design system's pattern and note it |
| "A raw hex value is faster than finding the token" | One-off values drift from the theme and break dark mode |
| "I'll match the desktop frame and mobile will follow" | Layouts break between breakpoints; check each width |
Red Flags
- New colors, font sizes, or spacing values appear in the diff that are not tokens
- A component from the library is copied and modified instead of used with props
- The change touches files unrelated to the designed component
- The pull request claims a visual match with no screenshots
Verification
- A screenshot at every breakpoint in the inventory, next to its design frame
- Every required state is implemented, or the requester explicitly agreed it is out of scope
- The project's build, lint, type check, and component tests pass
- Keyboard focus order and visible focus work; text contrast meets the project's standard
(check with
ux-auditif unsure) - Design values with no matching token are listed for the reviewer
If verification shows the change broke another component, revert the unrelated part and keep the diff to the designed scope.
Tips
- With a Figma MCP server connected, read component names and token references from the frame instead of eyeballing pixel values
- Ask for the missing states before building them when a designer is available — a one-line question is cheaper than a second review round
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.

