agentleFS
Above-the-Fold-StudioAbove-the-Fold-Studio/designmd-skills/skills/loading-empty-error-states/SKILL.md

loading-empty-error-states

Skill0 starsChanged 3 months agoMITView on GitHub

Design useful loading, empty, error, and recovery states that keep users oriented and able to act.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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:

    Do not use a spinner as a universal answer.

    line 12
  2. Distinctive:

    Write errors that explain what happened in user terms, what was preserved, and how to recover.

    line 27
  3. Distinctive:

    Verify announcements, focus, contrast, motion preference, slow connections, repeated failures, and return after interruption.

    line 31

≈ “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

Loading, Empty, and Error States

Design the moments between ideal states. Use this for asynchronous loading, first-use and no-result emptiness, partial data, offline behavior, failures, retry, and recovery.

Do not use a spinner as a universal answer. Do not blame the user, promise a retry that is unsafe, hide partial success, or discard work after failure.

Workflow

  1. Map the state model: initial, loading, refreshing, partial, empty-first-use, empty-filtered, success, stale, offline, permission-limited, error, recoverable, and terminal.
  2. For each state, identify what the user knows, what the system is doing, what remains available, and the next safe action.
  3. Preserve stable layout and existing content when possible. Use progress, skeletons, optimistic updates, or background refresh only when they match the operation and its certainty.
  4. Distinguish empty causes. First use teaches value and a starting action; no results explains filters or scope; completed emptiness may celebrate.
  5. Write errors that explain what happened in user terms, what was preserved, and how to recover. Expose diagnostic detail only where useful and safe.
  6. Define retry idempotency, backoff, duplicate-action prevention, cancellation, timeout, offline, and partial-success behavior.
  7. Verify announcements, focus, contrast, motion preference, slow connections, repeated failures, and return after interruption.

Output

Return a state matrix with trigger, visible content, available actions, preserved data, recovery behavior, accessibility communication, and test cases.

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.