跳到正文
Skillpedia
界面(UI/UX)48k · #6087

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ux-feedback/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. Read the target file and identify all data-dependent areas.

  2. Read the design language reference:

    • DESIGN-LANGUAGE.md sections on Loading States (Skeleton), Empty States, Error States
  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
  • 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)
  1. 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} />
}
  1. 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.
常见问题

什么是“反馈状态”?

它们是界面向用户展示的视觉提示和指示,用来告诉用户当前情况,比如加载时的转圈动画,或者“没有找到结果”的提示。

为什么这些状态很重要?

它们能让界面更清晰、信息更充分,从而改善用户体验。用户知道会发生什么,也知道该怎么操作,避免困惑。

这会改变我网站的外观吗?

这个工具会使用与当前设计相匹配的预设样式,重点在于清晰和实用,不会大幅改变网站的外观。

详情

作者的原始描述

Add appropriate user feedback states (loading, success, error, empty) to a component or page

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#6087
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能