Agent Skillsbitjaru/styleseed › ss-feedback

ss-feedback

GitHub

为组件或页面添加加载、成功、错误和空状态反馈。识别数据依赖区域,实现骨架屏、空状态、错误重试及操作提示,遵循设计语言规范与无障碍要求。

engine/.claude/skills/ss-feedback/SKILL.md bitjaru/styleseed

Trigger Scenarios

需要为UI组件添加加载、空、错误或成功状态时 优化现有组件的数据驱动状态展示时

Install

npx skills add bitjaru/styleseed --skill ss-feedback -g -y
More Options

Non-standard path

npx skills add https://github.com/bitjaru/styleseed/tree/main/engine/.claude/skills/ss-feedback -g -y

Use without installing

npx skills use bitjaru/styleseed@ss-feedback

指定 Agent (Claude Code)

npx skills add bitjaru/styleseed --skill ss-feedback -a claude-code -g -y

安装 repo 全部 skill

npx skills add bitjaru/styleseed --all -g -y

预览 repo 内 skill

npx skills add bitjaru/styleseed --list

SKILL.md

Frontmatter
{
    "name": "ss-feedback",
    "description": "Add appropriate user feedback states (loading, success, error, empty) to a component or page",
    "allowed-tools": "Read, Write, Edit, Grep, Glob",
    "argument-hint": "[file-path]"
}

UX Feedback States Generator

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.

Version History

  • 575d99a Current 2026-07-05 18:21

Same Skill Collection

engine/.claude/skills/ss-a11y/SKILL.md
engine/.claude/skills/ss-audit/SKILL.md
engine/.claude/skills/ss-component/SKILL.md
engine/.claude/skills/ss-copy/SKILL.md
engine/.claude/skills/ss-flow/SKILL.md
engine/.claude/skills/ss-lint/SKILL.md
engine/.claude/skills/ss-motion/SKILL.md
engine/.claude/skills/ss-page/SKILL.md
engine/.claude/skills/ss-pattern/SKILL.md
engine/.claude/skills/ss-review/SKILL.md
engine/.claude/skills/ss-score/SKILL.md
engine/.claude/skills/ss-setup/SKILL.md
engine/.claude/skills/ss-tokens/SKILL.md
engine/.claude/skills/ss-update/SKILL.md
skills/styleseed-design-review/SKILL.md

Metadata

Files
0
Version
575d99a
Hash
6fcd9568
Indexed
2026-07-05 18:21

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-14 14:06
浙ICP备14020137号-1 $Map of visitor$