image-to-code
Skill này làm gì
Skill này xây dựng frontend hoạt động từ một thiết kế thị giác bạn đã chọn. Skill dành cho người có ảnh thiết kế và muốn nó được xây thành mã web thật.
Khi nào nên dùng
- ✓Khi bạn có ảnh chụp màn hình hoặc mockup và muốn nó được xây thành trang web.
- ✓Khi bạn muốn một khung thiết kế được chuyển thành mã đáp ứng.
- ✓Khi bạn muốn các khái niệm thiết kế đã tạo được xây vào dự án của mình.
Liên kết skill
https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/skill/builtin/.bundle/product-design/workflows/image-to-code/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi muốn mockup đã chọn của mình được xây thành trang web đáp ứng trong dự án hiện có.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent nghiên cứu bố cục, khoảng cách, màu sắc và các trạng thái của ảnh, rồi liệt kê các tài nguyên cần thiết. Agent xây trang bằng framework của dự án và các design token có sẵn.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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.
Câu hỏi thường gặp
Nó có cần React không?
Không. Skill nói React không bắt buộc, và nó làm theo stack hiện có của dự án.
Nếu tôi chưa chọn thiết kế thì sao?
Một bản brief bằng văn bản thôi chưa đủ. Skill yêu cầu bạn chọn một hình ảnh, hoặc chuyển sang bước ideation trước.
Nó có dùng emoji thay icon không?
Không. Skill nói không thay thế tài nguyên hình ảnh có ý nghĩa bằng emoji hoặc chỗ giữ chỗ.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 14k
- Vị trí xếp hạng
- #11342
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
effect
14kGiúp agent của bạn trả lời câu hỏi về framework TypeScript Effect bằng cách kiểm tra mã nguồn và tài liệu, thay vì dựa vào trí nhớ.
arxiv
14kGiúp agent của bạn tìm, đọc, trích dẫn và theo dõi các bài báo học thuật trên arXiv, gồm tóm tắt, trích dẫn BibTeX, tải PDF và liên kết trích dẫn.
claude-code
14kGiúp agent của bạn giao một tác vụ lập trình cho công cụ dòng lệnh Claude Code, dưới dạng chạy một lần, phiên tương tác hoặc tác vụ nền.
codex
14kGiúp agent của bạn chạy công cụ dòng lệnh OpenAI Codex mà không cần cửa sổ chat, cho tác vụ lập trình, tập lệnh và quy trình tự động.
Skill tương tự
angular-developer
280kGiúp agent của bạn viết code Angular và tư vấn cấu trúc dự án, hữu ích khi bắt đầu dự án mới hoặc cải thiện hiệu suất.
frontend-a11y
280kGiúp agent của bạn làm cho giao diện web dễ tiếp cận với mọi người. Đảm bảo website và ứng dụng hoạt động tốt với trình đọc màn hình và điều hướng bằng bàn phím.
frontend-patterns
280kGiúp agent của bạn áp dụng các mẫu hiện đại trong phát triển frontend. Tối ưu hiệu năng, quản lý trạng thái và tuân theo thực hành tốt nhất với React và Next.js.