ux-feedback
它能做什么
这个工具会添加重要的状态提示,让用户清楚当前正在发生什么。它可以显示内容正在加载、是否出错、是否没有可显示的内容,或者某个操作是否已成功完成。
适用场景
- ✓当某个页面或板块加载时间过长时。
- ✓当用户的某个操作失败、需要显示错误提示时。
- ✓当列表为空,需要提示用户接下来该怎么做时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ux-feedback/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“为用户个人资料板块添加用户反馈状态。”
每周 5 个新技能,1 分钟读完。
工作原理
这个工具会分析你的代码,找出数据显示在哪些地方。然后它会自动插入所需的代码,在这些位置显示“加载中”“空状态”“错误”或“成功”等提示。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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.
常见问题
什么是“反馈状态”?
它们是界面向用户展示的视觉提示和指示,用来告诉用户当前情况,比如加载时的转圈动画,或者“没有找到结果”的提示。
为什么这些状态很重要?
它们能让界面更清晰、信息更充分,从而改善用户体验。用户知道会发生什么,也知道该怎么操作,避免困惑。
这会改变我网站的外观吗?
这个工具会使用与当前设计相匹配的预设样式,重点在于清晰和实用,不会大幅改变网站的外观。
详情
作者的原始描述
Add appropriate user feedback states (loading, success, error, empty) to a component or page
热度
- GitHub 星标
- 48k
- 排名
- #6087
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。