一键导入
design-to-code
Use when the user provides screenshots, mockups, or design assets and wants implementation that stays visually close to the source.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when the user provides screenshots, mockups, or design assets and wants implementation that stays visually close to the source.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use for general product implementation work that is not primarily backend architecture, pure integration wiring, or screenshot-driven design-to-code.
Use when backend work requires contract-first thinking, schema changes, permission checks, side-effect analysis, or test planning.
Use immediately after codebase discovery to classify task scale and determine which workflow steps are required vs. optional.
Use when the main deliverable is maintainable documentation such as repository rules, onboarding guides, runbooks, ADRs, or architecture notes.
Use when encountering compile errors, test failures, runtime exceptions, or unexpected behavior during implementation.
Use when a request needs system-level planning before implementation, especially for cross-module, high-risk, or ambiguous work.
| name | design-to-code |
| description | Use when the user provides screenshots, mockups, or design assets and wants implementation that stays visually close to the source. |
Use this skill for image-led UI implementation.
Before writing any code:
DECISIONS.md for prior decisions on UI framework, token system, or component conventionsdocs/operating-rules.md → Project-specific constraints for any CSS/styling rulesdemand-triage whether this task also involves logic or flow changes — if so, route through feature-planner firstBreak down the design into these layers before writing a single line of code:
At the end of the breakdown, explicitly separate:
This lets the reviewer know what to double-check. Never silently infer values — always surface them.
Use demand-triage to classify the task before starting:
| Scale | Typical scenario | Additional steps |
|---|---|---|
| Small | Single state change, copy update, or color adjustment on an existing component | Inline preamble; skip planning agent |
| Medium | New component following existing patterns; 2–5 files | Follow standard Medium workflow |
| Large | New screen or flow, design system changes, or redesign affecting many components | Planning agent first; critic review; risk-reviewer |
If the design requires new state management, routing, or API calls, reclassify to Medium or Large and route through feature-planner before implementation.
| Anti-pattern | Why it is wrong | What to do instead |
|---|---|---|
| Replacing the provided design with a generic template component | Loses visual fidelity; the design is the spec | Implement what is shown; reuse structure only where the design matches |
| Abstracting too early | Creates a "reusable" component from a one-off screen before the pattern is proven | Implement as a single-use component; promote to shared only after second use |
| Hard-coding pixel values | Breaks when the design system changes; diverges from the project's spacing scale | Map to the nearest existing token or CSS variable |
| Silently inferring interaction states | Leads to missing hover/focus/disabled states the reviewer will not notice until QA | Always list inferred states in the Matching vs. Inferring section |
| Skipping responsive behavior | The component breaks on mobile even if the design was desktop-only | State the assumed breakpoint and at minimum add a mobile layout note |
| Implementing new data fetching or state | Mixes UI fidelity work with logic/API work; increases blast radius | Stop and reclassify with demand-triage; route through feature-planner |
application-implementer instead)feature-planner first, then use this skill for the UI phase onlyBefore marking implementation complete, verify: