states
БесплатноБез исполняемых скриптовНе проверенDesigns every state a screen can enter, from first run and filtered to zero through failures, rollbacks, stale data and the end of a list.
от raphaelsalaja★ 74 звезды на GitHubОб этом скилле
States
This skill holds what a screen shows when it is not full of good data. It covers empty screens, missing values, failures, conflicts, stale data, waits and the end of a list.
Every state is designed or ruled out
A surface is done when each state it can enter is designed, or ruled out in writing with a reason. A blank region, a raw undefined or a screen with no way forward is a finding in any style.
Loading delays, skeletons, busy buttons, undo, omitted fields and live regions belong to defaults. Field input and field errors belong to forms, including the line an error reserves, a one-click fix and the prompt before leaving. Wording belongs to copy, impossible flag combinations to invariants and showing every state on one page to lab.
List the states before building
Before building, list the states: populated, first run, cleared, filtered to zero, loading, partial, each kind of error, stale and the end, each designed or n/a with a reason. A populated-only component is states-list-every-state.
Empty is three states
First run says what the place will hold and offers to create or import, and cleared stays calm. One screen for those and filtered to zero is states-three-empties.
"No Projects Yet" flashing during the fetch because rows.length === 0 is states-no-empty-before-load.
Filtered to zero names the query and offers Clear Filters. "Create Your First Project" after a search matched nothing says the data is gone, which is states-filtered-names-the-query.
An empty or failed region keeps its frame, so a table keeps its header with the message below it. A table replaced by a centred illustration is states-keep-the-frame.
A Files tab hidden or disabled while a new project has no files, instead of showing its first-run state, is states-tab-stays.
Records have holes
A missing image keeps its box with aspect-ratio and shows a fallback built from the record, such as initials on a colour hashed from its id. An avatar that collapses when its image fails is states-fallback-media.
Initials split the name into graphemes with Intl.Segmenter and take the first and last word, skipping Jr, Sr, II and III, with a fallback icon for an empty name. name[0] turns "🦊 Fox" into a broken glyph, and first letters alone turn "Christopher Alexander Montgomery III" into "CI". Both are states-initials-by-grapheme. Test 👩🏽💻 Priya, dana, 王秀英 and Sam Lee padded with spaces: the emoji stays whole, then D, 王 and SL.
A rendered undefined, null, NaN or Invalid Date, or a missing count shown as 0, is states-no-raw-values.
An empty value's treatment depends on where it sits. A blank or whitespace-only title renders "Untitled". A review page row reads "Not Provided", as forms sets out, and an optional detail line is left out, as defaults sets out. A heading that collapses to nothing is states-blank-strings.
User text shows as typed, & and **bold** included, and a newline never doubles a single-line row. A comment set through innerHTML is states-literal-text.
Many values still fit
Tags past the row's width collapse into a count such as +8, and fourteen tags wrapping onto three lines is states-tag-overflow.
A list reviewed with only Active rows, instead of every status in the enum at once, is states-every-status-at-once.
A Remove button on your own row, with no "You" beside your name, is states-current-user.
Errors appear where the user is looking
A failed fetch shows inside the region it would have filled, with a Retry button. A toast for a list that failed to load is states-error-at-the-source.
An autosave or sync failure shown only in an expiring toast, instead of a marker that stays until it clears, is states-persistent-background-error.
A 403, 404 or deleted record shown as a blank page with a status code, and no way back, is states-no-dead-end.
Each independent region sits in its own error boundary, or the per-route equivalent, so a crash shows that region's failed state with Retry. One root boundary blanking the app over a broken chart is states-contain-crashes.
Each failure has its own way forward
Reads retry on their own only after a network failure, a 5xx or a 429. They try up to 3 times with jittered backoff from 1s, honouring any Retry-After. Any other 4xx never retries, because the same request fails the same way. Writes retry on their own only with an idempotency key, so a payment never runs twice.
After that, each kind of failure gets its own path. Offline waits for the online event, a 5xx offers Retry and a 429 counts down its Retry-After. A 401 asks to sign in again and keeps the input. One "Something went wrong" for every failure is states-failure-by-kind.
A count or badge whose data failed is hidden or marked Unavailable, never 0. A page shows at most 5 degraded-service messages and groups the rest, as in "3 more services are unavailable". An unread badge read
Установить states в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл states?
Designs every state a screen can enter, from first run and filtered to zero through failures, rollbacks, stale data and the end of a list.
Как установить скилл states?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл states запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic