build-design
Skill này làm gì
Skill này dựng màn hình từ một thiết kế để kết quả khớp sát với thiết kế. Nó tái sử dụng các thành phần và giá trị định kiểu có sẵn trong dự án, rồi kiểm tra kết quả so với thiết kế. Nó dành cho lập trình viên và nhà thiết kế làm việc từ file thiết kế.
Khi nào nên dùng
- ✓Khi bạn có một liên kết Figma và muốn màn hình được xây dựng trong code của dự án.
- ✓Khi bạn có một ảnh thiết kế và cần biến nó thành một trang chạy được khớp với ảnh đó.
- ✓Khi bạn muốn bản dựng tái sử dụng các nút, màu và giá trị khoảng cách có sẵn thay vì tạo cái mới.
Liên kết skill
https://github.com/jakubkrehel/skills/blob/main/skills/build-design/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
“Xây dựng màn hình Figma này trong ứng dụng của tôi, dùng các thành phần chúng ta đã có.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill đọc thiết kế từ nguồn gốc, chẳng hạn file Figma hoặc ảnh. Nó viết code dùng các thành phần có sẵn của dự án, rồi so sánh kết quả với thiết kế trước khi hoàn thành.
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.
Build design
This skill turns a design into code that matches it. It reads the design at its source, builds with what the project already has, then compares the result against the design before calling it done.
The design decides. Values come from the design file, never from your taste or a pattern you liked elsewhere. A change the design does not show is a deviation, and a deviation is the user's call.
It owns no domain rules. Where the design breaks one, build it as designed and report the conflict with its owner. Contrast is a requirement in better-accessibility and a measurement in better-colors. Focus and semantics are better-accessibility, type is better-typography and spacing and structure are better-layout. Palette is better-colors, copy is better-writing and surfaces, icons and motion are better-ui. Reviewing finished work is interface-review, exploring alternatives is variant and stress testing a component is break.
1. Read the design at its source
A Figma link means the Figma MCP. Search the available and deferred tools for figma before saying it is unavailable, since the server often sits under a name you did not expect. A server that lists only an authenticate tool is connected but signed out, so ask the user to authenticate. With no Figma tool at all, ask the user to connect one, and do not build from memory or guesswork meanwhile. figma.md holds which tools to call and what each returns.
A screenshot or exported image has no values to read. Sizes are ratios to the capture, so state the scale you assumed and treat every measurement as an estimate. Ask for the Figma link when one exists, since it replaces the whole estimate.
Scope the run to the frames named. Frames that show the same thing at different widths are one piece at several breakpoints, not separate pieces.
This step is done when you hold a screenshot of every frame in scope and its values for spacing, size, radius, color, type and the components used. From a Figma file they are exact. From an image they are estimates at the scale you stated.
2. Map the design onto the project
Read the project's tokens and component library before writing anything. Then map every design value to what exists:
| In the design | In code |
|---|---|
| A bound variable or style | The token with the same name or the same value |
| A raw value that equals a token | That token |
| A raw value with no token | The nearest existing token, listed in the report as rounded |
| A component instance | The project's component of that name, with the variant the design shows |
| A component instance with no project equivalent | Plain markup in place, listed as a deviation, and ask whether a component should exist |
| A one-off group of layers | Plain markup in place, not a new component |
Never add a token, a component variant or an arbitrary value to hit a number. Stop and ask which way to go when rounding would visibly change the design. That means more than 2px on spacing or size, or a color landing on a different step.
Check what data the design needs and wire it to what exists. Where the backend for part of it does not exist yet, build that part as UI fed by props and name it in the report as unwired.
3. Build only what the design shows
Implement the frames, the breakpoints the frames define and the states the file draws, such as hover, empty or error. A state the file does not draw is not yours to design. Leave it to the existing component's default and list it as missing.
Leave everything around the piece as it was. No neighbouring copy edits, no icon swaps, no "while I was here" cleanups. A diff wider than the design is the most common way this goes wrong.
4. Compare against the design
Render the build at each frame's width beside the design screenshot and walk it element by element. Compare the properties Read the design at its source collected. "Gap is 12px, design is 16px" is a finding. "Feels a bit tight" is not.
With a browser at hand, screenshot each width and compare. Without one, hand over the local URL with the widths to check and say the comparison is unverified. Do not report a match you did not look at.
Fix every mismatch you caused, then compare again. This step is done when every remaining difference is a rounding or a question.
5. Report and stop
| Element | Design | Built | Status |
|---|---|---|---|
| Card padding | 20px | p-5 |
Matches |
| Title size | 15px | `t |
Câu hỏi thường gặp
Tôi có cần Figma để dùng skill này không?
Liên kết Figma cần kết nối Figma. Nếu không có, skill sẽ yêu cầu bạn kết nối thay vì đoán thiết kế.
Nếu thiết kế vi phạm một quy tắc, chẳng hạn độ tương phản thấp thì sao?
Skill dựng thiết kế đúng như đã vẽ và báo cáo xung đột. Việc thay đổi thiết kế thuộc về bạn.
Nó có thêm màu hoặc khoảng cách mà thiết kế không có không?
Không. Thiết kế quyết định các giá trị, và mọi thay đổi mà thiết kế không thể hiện đều được đánh dấu để bạn quyết định.
Chi tiết
Mô tả gốc của tác giả
Builds UI from a Figma file or a design image so it matches the design, using the project's existing tokens and components.
repo: jakubkrehel/skills
Độ phổ biến
- Sao GitHub
- 10k
- Vị trí xếp hạng
- #11892
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
better-accessibility
10kRà soát và sửa các vấn đề về bàn phím, tiêu điểm, trình đọc màn hình, biểu mẫu và chuyển động trong giao diện, theo tiêu chuẩn WCAG 2.2.
better-colors
10kXây dựng và kiểm tra hệ thống màu bằng cách tạo bảng màu, đặt tên token, chuyển đổi định dạng và đo độ tương phản.
better-interface
10kRà soát toàn bộ màn hình hoặc luồng theo khả năng tiếp cận, bố cục, cách viết, kiểu chữ, màu sắc và độ hoàn thiện, rồi xếp hạng các vấn đề.
better-layout
10kThiết lập nhóm, căn lề, thứ tự đọc và cấu trúc đáp ứng kích thước màn hình, rồi kiểm tra bố cục vẫn ổn khi thay đổi kích thước hoặc khi dịch ngôn ngữ.
Skill tương tự
canvas
394kCho phép agent của bạn hiện một widget trực quan được lưu trữ trên bảng Mac đã kết nối, rồi ẩn bảng hoặc chuyển nó sang trang khác.
control-ui
394kGiúp agent của bạn sắp xếp và khắc phục sự cố Control UI của OpenClaw, gồm các phiên, bảng điều khiển và Gateway đã kết nối.
diagram-maker
394kGiúp agent của bạn vẽ sơ đồ rõ ràng dạng SVG, HTML hoặc Excalidraw có thể sửa, cho quy trình, kiến trúc hệ thống và bản phác bảng trắng.