跳到正文
Skillpedia
网站与界面(前端)14k · #11342

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/skill/builtin/.bundle/product-design/workflows/image-to-code/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. Run the real app using its normal development or preview command.
  8. Capture the implementation using the browser tool selected by ../index/SKILL.md and run ../design-qa/SKILL.md against the source visual.
  9. Fix all blocking and high-impact mismatches. Save design-qa.md in the project root and hand off only when it records final 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能