image-to-code
它能做什么
这项技能根据你选定的视觉设计构建可运行的前端。适合手头有设计图并希望将其构建为真正网页代码的人。
适用场景
- ✓当你有截图或设计稿,并希望将其构建为网页的时候。
- ✓当你想把设计稿转换为响应式代码的时候。
- ✓当你想把生成的设计概念构建到你的项目中的时候。
技能链接
https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/skill/builtin/.bundle/product-design/workflows/image-to-code/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我想把我选定的设计稿在现有项目中构建为响应式网页。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会研究图片的布局、间距、颜色和状态,然后列出所需的资源。它会使用项目自身的框架和设计令牌来构建页面。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Image to Code
Translate a selected visual target into a high-quality frontend. Read ../index/SKILL.md, ../../references/critical-overrides.md, and the relevant saved context from ../user-context/SKILL.md before building.
Preconditions
- Require an unambiguous selected image, screenshot, mockup, generated result, or design frame. A written brief alone is not a visual target; route to ideation first when appropriate.
- Resolve which image is selected before editing. Ask when an ordinal or attachment is ambiguous.
- Use only the current task's relevant product context, tokens, components, assets, and references.
Workflow
- Inspect the source visual at useful detail and record its viewport, layout regions, hierarchy, spacing, typography, colors, borders, radii, shadows, imagery, icons, responsive behavior, and visible states.
- Inventory every required asset. Reuse supplied or repository assets when they match. Use an available image-generation tool for custom raster imagery and an appropriate existing icon set for UI icons. Do not substitute emoji, generic placeholders, or improvised CSS drawings for meaningful visual assets.
- Inspect the target repository and use its existing framework, package manager, component system, design tokens, and conventions. React is not required. Do not replace an established stack merely to match this workflow.
- If no target app exists, create the smallest runnable frontend supported by the harness and suited to the request; plain HTML/CSS/JavaScript is acceptable.
- Implement the full visible structure and the primary user journey. Unless requested otherwise, make navigation, tabs, menus, forms, toggles, selections, and main calls to action behave realistically without inventing backend systems.
- Match desktop or mobile based on the source. When the source is a phone UI and no device is named, verify around 390 × 844 as well as any relevant responsive behavior.
- Run the real app using its normal development or preview command.
- Capture the implementation using the browser tool selected by
../index/SKILL.mdand run../design-qa/SKILL.mdagainst the source visual. - Fix all blocking and high-impact mismatches. Save
design-qa.mdin the project root and hand off only when it recordsfinal result: passed, or clearly report a genuine capture/verification blocker.
Fidelity rules
- Treat the selected visual as the design target; do not introduce unrelated redesign ideas.
- Match the same viewport and interaction state during visual comparison.
- Place real assets before final QA and avoid hotlinking third-party source assets in the finished app.
- Keep the implementation maintainable within the target repository's patterns.
- Do not claim verification from build success or an HTTP status alone; inspect the rendered result and primary interactions.
Handoff
Provide the runnable project or changed files, the local preview information when useful, and a concise summary of what was implemented, verified, and left as a limitation. Publish only when the user asks and the host exposes an authorized deployment tool.
常见问题
它需要 React 吗?
不需要。这项技能说明不要求 React,并会遵循项目现有的技术栈。
如果我还没有选定设计呢?
仅有书面简报是不够的。这项技能会要求你选定一个视觉稿,或先转到创意发想环节。
它会用表情符号代替图标吗?
不会。这项技能要求不要用表情符号或占位符替代有意义的视觉资源。
详情
作者的原始描述
Implement a selected image, screenshot, mockup, generated concept, or design frame as a faithful, responsive, interactive frontend in the target codebase.
repo: XiaomiMiMo/MiMo-Code
热度
- GitHub 星标
- 14k
- 排名
- #11342
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
effect
14k帮你的智能体通过查看源代码和文档来回答关于 Effect TypeScript 框架的问题,而不是依赖记忆。
arxiv
14k帮你的智能体在 arXiv 上搜索、阅读、引用和跟踪学术论文,包括摘要、BibTeX 引用、PDF 下载和引用关系。
claude-code
14k帮你的智能体把编程任务交给 Claude Code 命令行工具,可以是一次性运行、交互式会话或后台任务。
codex
14k帮你的智能体在没有聊天窗口的情况下运行 OpenAI Codex 命令行工具,用于编程任务、脚本和自动化流程。