Skip to content
Back to skills

Loading State

ASecurity

Detect missing loading/error/empty state handling that could trap users in spinners or disabled states.

  • 4 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 2, 2026
developmentgo

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 2, 2026

npx -y skills add s977043/river-review --skill loading-state --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Loading State?

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

Security grade badge for Loading State
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/s977043-loading-state/badge)](https://www.skillsdirectory.com/skills/s977043-loading-state)

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
---
id: 'loading-state'
name: Loading State Transition Review
description: Detect missing loading/error/empty state handling that could trap users in spinners or disabled states.
version: 0.1.0
category: midstream
phase: midstream
applyTo:
  - 'src/**/*.{ts,tsx,js,jsx}'
  - 'app/**/*.{ts,tsx,js,jsx}'
  - 'lib/**/*.{ts,tsx,js,jsx}'
  - 'packages/**/*.{ts,tsx,js,jsx}'
tags:
  - ux
  - loading-state
  - error-handling
  - midstream
severity: major
inputContext:
  - diff
outputKind:
  - findings
modelHint: balanced
---

## Pattern declaration

Primary pattern: Reviewer
Secondary patterns: Inversion
Why: ローディング状態の管理ミスはUXに直結するが、テストで気づきにくい

## Guidance

- Check if async data fetching (useQuery, useSWR, fetch, axios) handles all three states: loading, success, error.
- Flag missing `error` state when `loading` state is handled.
- Flag missing `loading` guard when mutation is triggered (e.g., submit button not disabled during pending).
- Check for missing early returns that could render UI before data is available (`if (!data) return null`).
- Flag `isLoading && <Spinner />` without a corresponding `isError && <ErrorMessage />`.

## Non-goals

- グローバルなローディングインジケーターの存在は前提として受け入れる(実装詳細は不問)。
- テストファイル内のモックデータや固定値は対象外。

## Pre-execution Gate / 実行前ゲート

このスキルは以下の条件がすべて満たされない限り`NO_REVIEW`を返す。

- [ ] 差分にasync data fetchingまたはUIコンポーネントのレンダリングロジックが含まれている
- [ ] loading/error/data stateを扱うコードパターンが存在する(useQuery, useSWR, useState + fetch等)

ゲート不成立時の出力: `NO_REVIEW: loading-state — loading state関連のUI変更が検出されない`

## False-positive guards

- ライブラリがSuspenseやError Boundaryで上位でハンドリングしている場合は黙る。
- テスト専用のコンポーネントは対象外。
- 意図的に簡略化されたadmin-onlyビューは緩く扱う。

Files in this skill

  • SKILL.md2.1 KB
  • fixtures/01-missing-error-state.md1.3 KB
  • fixtures/01-should-detect.md981 B
  • fixtures/02-should-not-detect.md912 B
  • fixtures/02-suspense-boundary-false-positive.md2.4 KB

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.

Comments

Loading comments…

Newsletter

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