Skip to content

UI & Design

Empty, Loading, Error

Free

Specify the three non-happy states for any list or detail view so the UI never goes blank.

Difficulty foundational
Version v1.1

Purpose

Force agents to handle waiting, failure, and zero-data as designed states.

Procedure

--- name: empty-states description: Specify the three non-happy states for any list or detail view so the UI never goes blank. ---

Empty, Loading, Error

Purpose

Force agents to handle waiting, failure, and zero-data as designed states.

Procedure

For the view you are editing, define three states before polishing the happy path.

Loading: the chrome of the page stays put (title, navigation). The region that will hold data shows a skeleton with a similar shape. Do not flash a different layout when data arrives. The status is announced if the wait can exceed a second (visually hidden text is enough).

Empty: say what is missing in plain language and offer the one action that fills it, if the user is allowed to take it. Do not use an illustration or a joke. Do not show zeros that look like real metrics.

Error: show the message the server returned if it is safe (no stack traces, no SQL). Offer retry when the action is idempotent. If it may have succeeded, say that and point to where the user can check. Do not automatically retry a payment or a delete.

A blank white region is a bug. A spinner with no surrounding structure is not a loading state.

Example requests

1. Saved list

Request: Add Empty, Loading, Error states to the saved-skills view. Do not change the loaded layout. Expected: Three distinct states with one next step each.

Dependencies

None. Work in the repository that is already open. Do not add packages unless the procedure names one.

Compatibility

This document follows the Agent Skills layout (a folder named empty-states containing SKILL.md). Claude Code, Cursor, Codex, and Gemini CLI can load that file from the paths in the Skilling installation guide. GitHub Copilot does not load SKILL.md. Use the Copilot instructions copy, and narrow applyTo before you commit it.

Example prompts

Saved list

Add Empty, Loading, Error states to the saved-skills view. Do not change the loaded layout.

Expected: Three distinct states with one next step each.

Choose the agent

This skill is installed for one agent at a time. Pick the section you are using.

Related

  • SaaS Dashboard

    Structure an operational dashboard: status first, then the queue of work, then detail. No vanity metrics.

  • Form States

    Build forms with labels, inline errors, pending submits, and no silent failure.

  • Data Tables

    Present repeated records as a real table on wide screens and a list on narrow ones, with sort and empty state.

Reviews

No reviews yet.

    Sign in to review.

    Report a problem

    Inaccurate steps, an unsafe instruction, or a licensing concern.

    Sign in to report.