ux-feedback
Skill này làm gì
Công cụ này thêm các thông báo trạng thái quan trọng để người dùng biết điều gì đang xảy ra. Nó hiển thị khi nội dung đang tải, khi có lỗi, khi không có gì để hiển thị, hoặc khi một thao tác đã hoàn thành thành công.
Khi nào nên dùng
- ✓Khi một trang hoặc phần nội dung tải quá lâu.
- ✓Khi một thao tác của người dùng bị lỗi và cần thông báo lỗi.
- ✓Khi danh sách trống và người dùng cần gợi ý nên làm gì.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ux-feedback/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
“Hãy thêm các trạng thái phản hồi cho người dùng ở phần hồ sơ cá nhân.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ phân tích mã của bạn để tìm chỗ hiển thị dữ liệu. Sau đó, nó tự động thêm đoạn mã cần thiết để hiện các thông báo ‘đang tải’, ‘trống’, ‘lỗi’ hoặc ‘thành công’ ở những chỗ đó.
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.
UX Feedback States Generator
When to Use
Use this skill when you need add appropriate user feedback states (loading, success, error, empty) to a component or page.
When NOT to use
- For only the words inside a state → use
/ss-copy - For accessibility issues in existing states → use
/ss-a11y - For brand-new component creation → use
/ss-component - For analytics or error-logging plumbing — UI presentation only
Target: $ARGUMENTS
Instructions
Read the target file and identify all data-dependent areas.
Read the design language reference:
DESIGN-LANGUAGE.mdsections on Loading States (Skeleton), Empty States, Error States
For each data-dependent area, implement ALL 4 states:
State 1: Loading (Skeleton)
// Skeleton must match the final layout shape
<div className="bg-card rounded-2xl p-6 shadow-[var(--shadow-card)]">
<div className="flex items-center gap-2 mb-3">
<div className="size-7 bg-surface-muted rounded-lg animate-pulse" />
<div className="h-3 w-16 bg-surface-muted rounded animate-pulse" />
</div>
<div className="h-9 w-24 bg-surface-muted rounded-lg animate-pulse mb-3" />
<div className="h-3 w-12 bg-surface-muted rounded animate-pulse" />
</div>
Rules:
- Show skeleton for 300ms minimum (prevent flash)
- Delay skeleton display by 300ms (fast loads skip skeleton entirely)
- Use
animate-pulse(1.5s cycle) - Match skeleton shapes to real content dimensions
- Never use spinners inside cards
State 2: Empty (Zero Data)
<EmptyState
icon={PackageIcon}
title="No activity yet"
description="Create your first project to get started."
action={<Button>Create Project</Button>}
/>
Rules:
- Center-aligned in the card
- Icon: 32px,
text-text-tertiary - Title: 14px,
text-text-secondary - Always suggest a next action
- Zero values show as "0" (don't hide or dash)
State 3: Error (Load Failed)
<div className="flex flex-col items-center justify-center py-8 text-center">
<AlertCircle className="size-8 text-destructive mb-3" />
<p className="text-[14px] text-text-secondary mb-4">Couldn't load the data</p>
<Button variant="brandGhost" size="sm" onClick={retry}>Try again</Button>
</div>
Rules:
- Partial failure: only affected card shows error, rest loads normally
- Full page failure: full-screen EmptyState with retry
- Error message: plain language, blame the system
- Always provide retry button
State 4: Success (Action Feedback)
// Toast notification for action confirmations
toast("Changes saved")
// With undo for destructive actions
toast("Item deleted", { action: { label: "Undo", onClick: handleUndo } })
Rules:
- Info toast: 3s display
- Action toast (with undo): 5s display
- Toast position: above BottomNav
- One toast at a time (new replaces old)
- Implementation pattern:
function DataCard({ data, isLoading, error }) {
if (isLoading) return <DataCardSkeleton />
if (error) return <DataCardError onRetry={refetch} />
if (!data || data.length === 0) return <DataCardEmpty />
return <DataCardContent data={data} />
}
- Check
prefers-reduced-motion— disableanimate-pulsewhen reduced motion is preferred.
Limitations
- Use this skill only when the task clearly matches its upstream source and local project context.
- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
- Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.
Câu hỏi thường gặp
‘Trạng thái phản hồi’ là gì?
Đó là các chỉ báo và thông báo trực quan giúp giao diện cho người dùng biết điều gì đang diễn ra, ví dụ vòng quay khi đang tải hoặc dòng chữ ‘không tìm thấy’.
Vì sao các trạng thái này quan trọng?
Chúng giúp giao diện rõ ràng và dễ hiểu hơn. Người dùng biết điều gì sẽ xảy ra và nên làm gì tiếp theo, tránh bối rối.
Công cụ này có làm thay đổi giao diện website của tôi không?
Công cụ dùng kiểu dáng có sẵn phù hợp với thiết kế hiện tại, tập trung vào sự rõ ràng và chức năng, không thay đổi nhiều diện mạo.
Chi tiết
Mô tả gốc của tác giả
Add appropriate user feedback states (loading, success, error, empty) to a component or page
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #6087
- 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.