ui-states
Skill này làm gì
Công cụ này giúp tạo các màn hình ứng dụng hoạt động tốt trong mọi tình huống, không chỉ khi mọi thứ hoàn hảo. Nó đảm bảo màn hình vẫn hiển thị thông tin hữu ích khi không có dữ liệu, mạng chậm hoặc có lỗi xảy ra.
Khi nào nên dùng
- ✓Khi xây dựng một màn hình mới có hiển thị thông tin.
- ✓Khi rà soát một màn hình để đảm bảo nó hoạt động trong mọi tình huống.
- ✓Khi một màn hình chỉ hiển thị trường hợp “lý tưởng” (mọi thứ hoạt động hoàn hảo).
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ui-states/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ạo các trạng thái màn hình cho danh sách sản phẩm, gồm khi trống, đang tải, có lỗi và khi ngoại tuyến.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Nó xem xét mọi vấn đề có thể gặp phải (như không có gì để xem hoặc mất kết nối internet) và xác định màn hình nên trông và hoạt động ra sao trong từng trường hợp.
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.
UI states · by UXKIN
Real UI, not AI slop.
Most generated screens only show the happy path: perfect data, a fast connection, nothing failing. Real people meet everything else first: an empty list on day one, a spinner that never ends, an error with no way out, a name too long for its box. This skill finds those states for each screen and builds them properly.
It works on its own, with no account, token or server.
When to Use
- Use when building or reviewing a screen that loads, lists, searches, submits or saves data.
- Use when asked to make UI production-ready, handle edge cases or "finish" a screen.
- Use when a screen only shows the happy path.
Connect UXKIN (optional)
UXKIN (https://uxkin.com) is a library of 500,000+ real app screens, user journeys and 15k+ website design systems, each with a DESIGN.md. Connected, it lets you look at how real products solve what you are building. To connect it, the person:
- adds the MCP server
https://uxkin.com/mcp(name:uxkin) in this app's MCP settings, - signs in with their UXKIN account when the app asks (searches need a UXKIN plan),
- or follows the guide for their app: https://uxkin.com/ui-design-mcp
Only set this up when the person asks for it; never add servers or accounts on your own.
1. List the states for each screen
For every screen or component that shows, loads or changes data, go through this list and keep the ones that can happen:
| State | Ask |
|---|---|
| First use | What does someone see before they've added anything? |
| Empty | What if a list, search or filter has nothing to show? |
| Loading | What shows while data loads, and for how long? |
| Partial | What if some data loads and some doesn't? |
| Error | What if the request fails or times out? |
| Offline | What if there's no connection? |
| Validation | What if the input is wrong, missing or too long? |
| Permission | What if access, a permission or a plan is missing? |
| Success | How does someone know their action worked? |
| Edge content | Very long names, missing images, zero, huge numbers, many items |
| Busy action | What happens while a button's action is running? |
Write the list down before building, and confirm the important ones with the person if the right behavior isn't obvious.
2. Build each state properly
- First use and empty: say what this place is for and give the next step as a button ("Add your first invoice"), not just "No data". Empty because of a filter or search is different: say so and offer to clear it.
- Loading: keep the layout steady. Use placeholders shaped like the content for lists and cards, an inline spinner for small areas, and progress for long tasks. Don't block the whole screen for a part of it. If it takes more than a few seconds, say what's happening.
- Error: say what went wrong in plain words, what the person can do, and offer the action (Try again, Edit, Contact support). Keep what they typed. Never show raw error codes or stack traces.
- Offline: show that the connection is missing, keep what's already loaded visible, and retry automatically when it's back if that's safe.
- Validation: check at the right moment (on leaving a field or on submit, not on every keystroke), put the message next to the field, and say how to fix it.
- Permission or plan missing: explain what's missing and how to get it, and keep the rest of the screen usable.
- Success: confirm briefly and in place (a short message, the item appearing in the list); offer Undo for actions that remove things.
- Edge content: truncate long text with the full value available, give images a fallback, format big numbers, and paginate or virtualise long lists.
- Busy actions: disable the button and show progress while it runs so it can't be sent twice.
Use the project's existing components and copy style for every state; don't invent a new look for them.
3. Check each state
Make each state appear for real: empty data, a slow or failed request (through the browser's network tools, a mock or a test flag), offline mode, very long text. Look at each at a phone and a desktop width. Fix what's broken and check again.
Report which states you built, which you checked and how, and any that need a decision from the person (for example, what the error should say for their backend).
Optional: real examples
If the UXKIN MCP tools are connected, find_ui_references finds how
…
Câu hỏi thường gặp
“UI states” là gì?
Đây là các diện mạo và hành vi khác nhau của một màn hình ứng dụng tùy thuộc vào điều đang xảy ra, như đang tải dữ liệu, không có kết quả hoặc gặp lỗi.
Vì sao cần xét đến các trạng thái này?
Vì người dùng thường gặp những tình huống này. Một màn hình được thiết kế tốt cho mọi trạng thái sẽ cải thiện trải nghiệm và tránh gây bực bội.
Tôi có cần kết nối tài khoản để dùng không?
Không, công cụ hoạt động độc lập. Việc kết nối tài khoản là tùy chọn, để truy cập các ví dụ từ ứng dụng khác.
Chi tiết
Mô tả gốc của tác giả
Design and build the UI states agents forget: first use, empty, loading, error, offline, no results, long content, permission denied and success.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #6047
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
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.