agentleFS
cheetah-tradecheetah-trade/claude-code-team-kit/skills/component-states/SKILL.md

component-states

Skill0 starsChanged 29 days agoMITView on GitHub

Design and check every state of a list, card, form or page: empty, loading, error, partial, long text, many items, disabled, success. Use when building or reviewing a UI component, or when something looks broken with real data.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use when building or reviewing a list, card, form or page, or when something looks broken with real data.

    line 8
  2. Distinctive:

    Check each at desktop and phone width, light and dark.

    line 25

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Component states

Use when building or reviewing a list, card, form or page, or when something looks broken with real data. Pair it with layout-and-hierarchy and ui-review-checklist.

Every state needs its own screen

StateWhat the user must seeDefect
Emptyone line or a small card: what would be here, why it is empty, the first actionblank area, lone heading, "—" in every cell
Loadinga quiet line of what is happening ("Loading your orders…"); no layout jump when data arrivesa spinner with no words; the empty state flashing first
Errorwhat happened, what is safe, what to do, a retry when it helpsa failed load shown as an empty list
Partialwhat loaded and what did notsilent gaps
Long text, many itemstitles cut to one line with an ellipsis, full text in a tooltip and the detail; lists scroll inside their box; counts shown ("Orders · 128")clipped mid-word, rows of different heights, a page that grows forever
Disabled, no permissionwhy, and who can change ita grey button with no reason
Successwhat changed and the next step or Undo"Success"
Needs the userits own tone and wording, first on the screenlooks like every other row
Expired session, lost connectionits own message and a way back inan endless spinner

Check each at desktop and phone width, light and dark.

Examples

  • Orders table: loading "Loading your orders…"; empty "No orders yet. They appear here when a customer checks out. Share your store link"; error "Could not load orders. Nothing was changed. Retry"; a "Needs action" group above the table, hidden when nothing needs action.
  • Notifications list: groups with nothing in them are hidden, not shown as lone labels; 200 old items fold into "Show 200 older" instead of a page that scrolls forever.
  • Settings page: a toggle the user cannot change says why ("Managed by your workspace admin") instead of just being grey.
  • One word set for states: map internal statuses to user words in one table in code (for example payment_failed → "payment failed", awaiting_review → "needs you", fulfilled → "shipped") and use it on every screen. Do not invent "finished" or "complete" on a new screen.

How to test

Seed or fake each state with test data: zero items, one item, 50 items, a 120-character title, a failed request (stop or stub the backend), an item that needs the user, an expired session. Capture light and dark at desktop and phone width. Check a clean screen for false alarms too: a state that is fine must not be reported.

How to report

A table of states: shown or missing, a screenshot, and for each missing state the exact element, what the user sees instead, and the fix, reusing the existing empty, loading and error components first. Agreed fixes become tasks with acceptance criteria that cover both themes and phone width.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.