用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/wecode-ai/wework-plugins --skill image-to-code命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | image-to-code |
| description | 将选定的图片、截图、线框/视觉稿或 Image Gen 参考实现为忠实、响应式的前端界面。 |
You'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: passeddesign-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.