design-to-code
Skill9 starsChanged 6 months agoMITView on GitHub
Use when converting approved design sources, handoff packages, mockups, visual contracts, or UI blueprints into implementation code and visual parity evidence; also when visual implementation feels rough, stretched, under-specified, or needs section-level high-fidelity repair.
13 other projects use a version of this.
Adopted by
Most recently taken up by
- Atharvsinh-codez/skillstheir own version, first seen Nov 8, 2026
- JPeetz/agent-skillstheir own version, first seen Oct 28, 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
- JinsYin/skillstheir own version, first seen Oct 11, 2026
Used with
Projects with it also use e2e-testing.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
etewiahSkille2e-testing
Playwright E2E testing and Lighthouse performance auditing. Use when setting up E2E tests, running Playwright tests, performing Lighthouse audits, or debugging E2E test failures.
Also in 3 projects that use this
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- Atharvsinh-codez/skills★ 122same name
- MigoXLab/coderio★ 114same name
- nahid-sparktales/agent-dispatcher★ 59same name
- JPeetz/agent-skills★ 14same 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
- JinsYin/skills★ 1same name
3 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.
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. 0 are common, 10 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
Use D2C only when converting or repairing against an approved visual source and the expected result is the highest practical design-source …
- Very specific: line 63
do not convert list/detail/form/product pages into generic dashboards
- Distinctive: line 64
do not replace populated designs with empty states unless the source says so
- Distinctive: line 65
do not claim parity from DOM/text smoke alone.
- Very specific: line 67
before strict visual repair, perform design extraction and analysis from the approved source.
- Very specific: line 69
if visual repair keeps producing "similar but not restored", treat under-specified IR as the blocker and load …
- Very specific: line 79
Section Anchors: add stable data-section markers for key sections.
- Distinctive: line 87
If any required field is missing, stop and enrich the IR/brief before changing code.
- Distinctive: line 91
Use generated media by role:
- Distinctive: line 105
Use or create a lightweight Visual IR for PNG/GPT Image 2/mockup sources when fidelity matters:
- Distinctive: line 123
Do not over-model every pixel.
- Distinctive: line 136
Do not claim design parity from DOM/text smoke alone.
- Distinctive: line 137
Do not replace populated designs with empty states unless the design/source says so.
- Very specific: line 138
Do not convert list/detail/form pages into generic dashboards.
- Very specific: line 139
Do not run broad lint/type/build repeatedly during active visual editing unless a failure signal or gate requires it.
- Distinctive: line 140
Do not handwave “close enough”.
- Very specific: line 141
Do not invent visual effects or decorative assets beyond the approved source.
“Common” is measured: kept by at least 6 in 10 of the 11 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
Purpose
Turn an approved visual source into maintainable code without relying on prose precision. Prefer structured inputs, small implementation passes, and screenshot-backed parity evidence.
Ownership Boundary
design-to-code owns work after design approval/handoff:
- implementation mapping and code changes
- extracting implementation details from approved visual sources
data-sectionanchors and section-level parity evidence- visual repair, mismatch/debt notes, accepted deviations
Return to idea-to-design only when the approved source is missing/stale, scope changed, the handoff predates approval, or the user asks for a design change.
Input Priority
implementation-blueprint.json+page-matrix.json+component-blueprint.json+debt-ledger.json- Visual IR / section contract (
visual-ir/<page-id>.json,visual-contracts/*, section crops) - Approved design images / Figma context / persisted mockups
- Page briefs and prose notes
Prose briefs are supporting context, not the source of truth.
Fidelity Path
D2C has one default path: highest-fidelity-regeneration.
Use D2C only when converting or repairing against an approved visual source and the expected result is the highest practical design-source fidelity. Do not downgrade to quick, standard, or "structure-first" modes unless the user explicitly waives fidelity for that specific task.
For every visual D2C page/section:
- approved visual source is the source of truth; prose only supports it
- load the highest-fidelity references before coding, not after a mismatch appears
- extract executable section-level IR before implementation
- inventory visible text, icons, shapes, tokens, assets, and controls before coding; for mobile pages include icon anatomy, icon size tokens, and Iconify visual compensation
- implement from the inventory/IR, then generate left-design/right-live evidence
- any shortcut, placeholder, missing icon, or simplified asset is debt and must be named before showing the result
Required references for visual D2C work:
references/design-extraction-analysis-gate.mdreferences/full-page-regeneration-guard.mdreferences/high-fidelity-rules.mdreferences/section-driven-high-fidelity.mdreferences/executable-visual-ir.mdreferences/asset-atlas-generation.mdwhen multiple related bitmap assets are neededreferences/functional-component-handoff-guard.mdwhen controls/forms/tabs/pickers affect behavior
Non-visual or minor project-convention edits should not use D2C and must not claim design parity.
Fidelity Kernel
These rules are always active for GPT Image 2/mockup work:
- approved visual source is the source of truth; prose only supports it
- preserve page type, section order, first-screen density, card/list/form anatomy, and action hierarchy
- preserve icon anatomy and icon size tokens: box size, glyph size, container/radius/color/alignment, and Iconify visual compensation must be explicit before L4/L5 claims
- for mobile H5 / phone-width work, preserve readability floors as part of fidelity; do not copy or generate tiny 10-12px-equivalent text for meaningful content just to match density
- do not convert list/detail/form/product pages into generic dashboards
- do not replace populated designs with empty states unless the source says so
- do not claim parity from DOM/text smoke alone; use screenshot or section evidence
- maintain or create lightweight Visual IR for the active page/section
- before strict visual repair, perform design extraction and analysis from the approved source; load
references/design-extraction-analysis-gate.mdwhen fidelity depends on a screenshot/mockup - for high-fidelity page rewrites, enrich Visual IR to executable section-level layout/asset/anatomy/token contracts before coding
- if visual repair keeps producing "similar but not restored", treat under-specified IR as the blocker and load
references/executable-visual-ir.mdbefore more CSS - generated media must match its final display role and aspect ratio; do not hide asset mismatch with
object-fitor background-position tricks - atlas generation is for creation efficiency only; crop atlas outputs into independent files before implementation
- fix the largest 1-3 visual gaps per pass and record remaining debt
Default Workflow
- Intake: identify source of truth, target routes/files, framework constraints, current maturity target.
- Foundation: map tokens/shell/base components before page-specific polish.
- Coverage: make every in-scope route/page visibly present before deep fidelity work.
- Section Anchors: add stable
data-sectionmarkers for key sections. - Fidelity Loop: compare source vs implementation by section; fix the largest 1-3 gaps per pass.
- Handoff: report page maturity, evidence, debt, and deviations.
Highest-Fidelity Gate
Before coding any visual D2C page/section, the required references above must be loaded and applied. Section-level executable IR is mandatory: each major section needs bbox/height or density, component anatomy, text/icon/shape inventory, token targets including mobile typography floors, media/asset role, crop strategy, text safe areas, screenshot target, pass criteria, and must-not-substitute rules.
If any required field is missing, stop and enrich the IR/brief before changing code.
Asset Strategy Kernel
Use generated media by role:
| role | strategy |
| hero main visual | generate as an independent asset |
| CTA/banner background | generate as an independent asset |
| repeated card thumbnails | atlas generation allowed, then crop to independent files |
| application/factory scene groups | atlas generation allowed, then crop to independent files |
| certificates, logos, nav, buttons, labels | render with HTML/CSS/SVG/Iconify; do not bake into images |
Hard rule: an atlas is never a production UI asset. Final code must reference the cropped output files, not use CSS background-position against the atlas to fake separate images.
Visual IR Minimum
Use or create a lightweight Visual IR for PNG/GPT Image 2/mockup sources when fidelity matters:
{
"page_id": "application-list",
"route": "/pages/applications/index",
"viewport": [390, 844],
"page_type": "list",
"source_refs": ["design-to-code-inputs/mockup.png"],
"sections": [
{"name": "topbar", "order": 1, "bbox": [0,0,390,72]},
{"name": "card-list", "order": 4, "density": "2.5 cards visible"}
],
"section_anchors": ["topbar", "card-list"],
"must_not_do": ["do not replace list with dashboard"]
}Do not over-model every pixel. Capture page type, section order, bbox, first-screen density, card/list anatomy, action hierarchy, must-not-do, and asset strategy.
Required Output Evidence
For each meaningful checkpoint, report:
- route/page coverage
- maturity level: L0 route-ready, L1 skeleton, L2 content, L3 system-styled, L4 core-fidelity, L5 functional
- section parity: PASS/WARN/FAIL for major sections when fidelity is claimed
- largest remaining visual gaps and whether they are debt or accepted deviation
- verification actually run; do not claim checks that were skipped
Hard Rules
- Do not claim design parity from DOM/text smoke alone.
- Do not replace populated designs with empty states unless the design/source says so.
- Do not convert list/detail/form pages into generic dashboards.
- Do not run broad lint/type/build repeatedly during active visual editing unless a failure signal or gate requires it.
- Do not handwave “close enough”; record section-level debt.
- Do not invent visual effects or decorative assets beyond the approved source; when strict detail is needed, load
references/high-fidelity-rules.md. - Functional controls must follow existing project/UI-library patterns first; load
IdeaToTechonly when API/state/permission/cross-platform/verification risk is non-trivial.
Mandatory Reference Loading
For visual D2C work, load these before coding; they are not optional or deferred:
references/high-fidelity-rules.md— exactness, text/icon/shape inventory, asset/layer rules, functional-control escalationreferences/design-extraction-analysis-gate.md— design extraction from screenshots/mockups into section IR, component anatomy, asset roles, token targets, must-not-substitute rules, and pass criteriareferences/full-page-regeneration-guard.md— complete-page token table, text inventory, icon anatomy, asset grouping map, and section-level asset planreferences/section-driven-high-fidelity.md— section-by-section restoration and strict visual repairreferences/executable-visual-ir.md— executable section-level layout/asset/anatomy/token contractsreferences/asset-atlas-generation.md— when multiple related bitmap assets are present or may be neededreferences/functional-component-handoff-guard.md— when controls/forms/tabs/pickers affect behaviorreferences/blueprint-driven-implementation.md— when project blueprint files existreferences/visual-measurements.md— extracting sizes, colors, densityreferences/width-normalization.md— canonical page width, responsive/H5 viewport metrics, and real mobile screenshot evidencereferences/mobile-recomposition.md— when desktop/PC-only sources must become mobilereferences/playwright-section-diff.md— screenshot comparison and Mobile H5 visual audit packreferences/main-skill-full-reference.md— if the compact guide is insufficient
Common Pitfalls
| Pitfall | Fix |
| Implementing from prose only | Build/read Visual IR and source crops |
| Broad route smoke treated as visual pass | Require section screenshots for parity claims |
| Reusing a dashboard template everywhere | Preserve page type and first-screen anatomy |
| Pixel-chasing before coverage | Cover routes first, then L4/L5 selected pages |
| Coding starts before extracting design | Stop; run design extraction and analysis, then write executable IR before implementation |
| IR only names sections | Add executable IR: bbox/height, density, component anatomy, asset role, token targets, pass criteria, and must-not-substitute rules |
| Repeated CSS tuning still feels unlike source | Stop coding; classify mismatch as asset/structure/anatomy/token/verification and enrich references/executable-visual-ir.md fields first |
| Using one generated atlas as many CSS backgrounds | Crop atlas into independent files and reference cropped assets only |
| Hero/banner mixed into thumbnail atlas | Generate hero/CTA as independent assets with final safe areas |
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.

