Implement a selected image, screenshot, mockup, or Image Gen reference as a faithful, responsive frontend.
76%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./plugins/product-design/skills/image-to-code/SKILL.mdYou're tasked with translating the visual target image into a high-quality, interactive website or web app.
Before starting, load $user-context and run its preflight script when local shell access is available.
Use saved product URLs, Figma files, screenshots, reference images, codebase paths, Storybook, tokens, design systems, brand assets, component refs, browser preferences, and share targets as grounding material when relevant.
Do not inspect every saved reference. Inspect only what the current task needs.
Starting sites-preview is not verification. Verification requires opening http://terminal.local:4173/ in the cloud browser, inspecting the rendered page, testing primary interactions, checking browser console errors, and passing design QA.
Do not substitute HTTP health, build success, preview-service status, or deployment success for browser verification. If the cloud browser cannot be used, report verification as blocked.
For local prototype verification and design QA in ChatGPT Work Mode:
dev script.sites-preview runs npm run dev -- --host 0.0.0.0 --port 4173 --strictPort. The dev script must accept those flags."dev": "vite". Configure Vite with server.host: "0.0.0.0" and server.allowedHosts: ["terminal.local"]. Preserve an existing Sites project's supported dev script; do not replace its runtime.sites-preview start "$PWD".http://terminal.local:4173/ in the cloud browser. Do not use localhost, 127.0.0.1, 0.0.0.0, HTTPS, or another port.CRITICAL: THIS IS NOT GUIDANCE. THIS IS A CHECKLIST TO COMPLETE.
Do not start unless you have a selected image, screenshot, mockup, or Image Gen result to recreate. A written brief is not enough.
Resolve the exact selected visual target before building.
$ideate option, use the Nth displayed generated-image result from the most recent ideation set. Do not use the original concept planning order or Image Gen prompt submission order.$ideate only when it was explicitly written in the same displayed-image order.Mobile runtime exception: 1:1 fidelity applies only to app-owned content inside the device screen. PhoneFrame, StatusBar, HomeIndicator, KeyboardDock, and the device assets are template-owned infrastructure. Preserve them even if the reference omits them, depicts different device chrome, or includes chrome in the image. Never recreate device chrome as an image asset.
Treat the resolved image as the design to recreate.
If the provided design is a mobile viewport, build a mobile app. When creating a fresh local app for that case, use local-prototype-preflight with --template mobile-app. If it's unclear, default to desktop.
Before planning or implementing with the mobile-app template, read its AGENTS.md and follow its runtime and component guidance.
Review the reference design, catalog every image asset in the design, and use the Image Gen tool to create individual images for each one. Zoom in so you can catch every asset that needs to be generated.
Examples include:
Rules:
After cataloging and measuring the reference assets, spawn up to three asset subagents while the main agent builds the app structure.
Give each subagent one raster asset task at a time with its reference crop, exact dimensions, focal point, style, output path, and consuming component. Asset subagents generate, inspect, save, and report the asset path only. They must not edit source code, run the browser, or deploy.
Prioritize critical above-the-fold assets first, then reuse agents for supporting assets. Do not delegate standard UI icons or supplied brand logos.
Define all sections of the page. For each section, meticulously measure the layout, spacing between elements, and the size and space of the elements themselves.
Find freely available fonts that match the target design.
Find a freely available icon library that matches the target design. Do not default to Lucide icons. Search for the best match.
Rules:
Build the app starting with local-prototype-preflight. Unless the user asks for a static mock, full production behavior, or a different scope, bring the app or website to life with:
Controls outside the core experience may be visual-only. Do not build auth, persistence, backend/API calls, integrations, or exhaustive edge cases unless requested.
Rules:
Run the local app.
Capture the local app using the Browser Choice rule in $index.
Run design-qa as the blocking build gate.
Steps:
design-qa.md in the project root.final result: passed.design-qa.md must say final result: blocked.design-qa.md exists and says final result: passed.Handoff the app or website.
critical-overrides.md. Do not add a different completion message.openai/plugins
d420d13
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.