Skip to content
Back to skills

Add Loading States

ASecurity

Adds loading, empty and error states to a view that fetches data, using the spinners, skeletons and messages the app already has.

  • 3 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 15, 2026
ai-agents

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add workspace-templates/ai-agent-templates --skill add-loading-states --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Add Loading States?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Add Loading States
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/workspace-templates-add-loading-states-ai-agent-templates/badge)](https://www.skillsdirectory.com/skills/workspace-templates-add-loading-states-ai-agent-templates)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: add-loading-states
description: Adds loading, empty and error states to a view that fetches data, using the spinners, skeletons and messages the app already has.
disable-model-invocation: true
---

Add loading, empty and error states to the view: $ARGUMENTS

1. Read the view and trace where its data comes from (hook, loader, store, fetch call). Note what the code currently does while pending, on an empty result and on failure.
2. Search the codebase for existing patterns: skeleton or spinner components, empty-state illustrations, error banners, toast helpers. Reuse them; create a new component only if none exists.
3. Implement: a loading state that matches the final layout size to avoid jumps; an empty state with a short message and the next action; an error state with the reason in plain words and a retry button that calls the same fetch.
4. Mark loading regions with `aria-busy` and announce errors with `role="alert"`. Do not show a spinner for requests under about 300 ms if the app has a delay helper.
5. Add or update tests for the three states using the project's mocking approach.

Run the tests and type check. Report which states were missing, what was reused, and anything in the data layer you did not change.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.