ux-feedback – skill Thiết kế & UI cho agent AI
Thêm các trạng thái phản hồi phù hợp (đang tải, thành công, lỗi, trống) cho một component hoặc trang
Cài skill ux-feedback bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/ux-feedback-7b71a.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /ux-feedback – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/ux-feedback-7b71a.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $ux-feedback – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/ux-feedback-7b71a.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /ux-feedback – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/ux-feedback-7b71a.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /ux-feedback – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc 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
1. Read the target file and identify all data-dependent areas.
2. Read the design language reference:
- If present in the target project,
DESIGN-LANGUAGE.mdsections on Loading States (Skeleton), Empty States, Error States. This reference is not bundled; otherwise use the project’s existing components and tokens.
3. 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
- Offer retry only when retrying is safe; otherwise provide an accurate recovery action.
State 4: Success (Action Feedback)
// Toast notification for action confirmations
toast("Changes saved")
// With undo for destructive actions
// Only offer Undo when handleUndo genuinely restores the deleted item.
toast("Item deleted", { action: { label: "Undo", onClick: handleUndo } })Rules:
- Info toast: 3s display
- Action toast (with undo): do not make a short-lived toast the only way to recover; provide a persistent recovery path or adjustable timing.
- Toast position: above BottomNav
- One toast at a time (new replaces old)
4. Implementation pattern:
function DataCard({ data, isLoading, error, refetch }) {
if (isLoading) return <DataCardSkeleton />
if (error) return <DataCardError onRetry={refetch} />
if (!data || data.length === 0) return <DataCardEmpty />
return <DataCardContent data={data} />
}5. Check prefers-reduced-motion — disable animate-pulse when 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.
Skill liên quan
- ux-flow – Thiết kế luồng người dùng và cấu trúc điều hướng theo các mẫu UX đã được kiểm chứng
- ux-persuasion-engineer – Kiểm tra độ khó khi ra quyết định và đề xuất luồng UX rõ ràng, dễ tiếp cận khi bố cục…
- uxui-principles – Đánh giá giao diện theo 168 nguyên tắc UX/UI có cơ sở nghiên cứu, phát hiện antipattern…
- vaporwave – Hướng dẫn triển khai phong cách Vaporwave cho Web và App. Kích hoạt khi người dùng muốn…
- vibecode-production-qa-validator – Kiểm tra QA production 13 giai đoạn cho ứng dụng fullstack Next.js: xác minh build, thẻ…
- vibrant-maximalism – Hướng dẫn triển khai Web và App theo phong cách Vibrant Maximalism. Kích hoạt khi người…
- videodb – Nhận diện, lập chỉ mục và chỉnh sửa video và âm thanh. Nhập file/URL/luồng trực tiếp…
- visual-emotion-engineer – Tạo brief định hướng thị giác về màu sắc, typography, hình ảnh và thứ bậc khi thiết kế…