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.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessible-interfaceSkill
- color-and-contrastSkill
- design-contextSkill
- design-system-auditSkill
- forms-and-validationSkill
- interaction-and-motionSkill
- interface-critiqueSkill
- layout-and-spacingSkill
- responsive-designSkill
- typographySkill
- visual-hierarchySkill
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
- Distinctive: line 12
Do not use a spinner as a universal answer.
- Distinctive: line 27
Write errors that explain what happened in user terms, what was preserved, and how to recover.
- Distinctive: line 31
Verify announcements, focus, contrast, motion preference, slow connections, repeated failures, and return after interruption.
≈ “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.
Files
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
- Map the state model: initial, loading, refreshing, partial, empty-first-use, empty-filtered, success, stale, offline, permission-limited, error, recoverable, and terminal.
- For each state, identify what the user knows, what the system is doing, what remains available, and the next safe action.
- 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.
- Distinguish empty causes. First use teaches value and a starting action; no results explains filters or scope; completed emptiness may celebrate.
- Write errors that explain what happened in user terms, what was preserved, and how to recover. Expose diagnostic detail only where useful and safe.
- Define retry idempotency, backoff, duplicate-action prevention, cancellation, timeout, offline, and partial-success behavior.
- 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.
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
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.

