/coleoni-states

Every state of a component. Not just the happy one.

A component is designed full of data. It spends a good part of its life waiting, empty, failing or half filled. The skill forces each of those states through the component’s real API calls, shows them side by side, finds the ones nobody designed, and builds them.

npx skills add c0le0ni/skills --skill coleoni-states
View on GitHub
Claude Code, Codex and more 9 states Through the real API, no mocks Finds crashes and raw values
The states board of a bakery’s order board: 6 of 9 states with problems The same board after the missing states were built The states board on three phones
Example

It worked in the demo. Then the Wi-Fi dropped.

The bakery’s day board, from /coleoni-init’s roadmap, in its first version. With data, perfect. In 6 of the other 8 states it showed nothing, crashed or printed “Invalid Date”.

board.js
// day board, first version
fetch("/api/orders.json")
  .then((r) => r.json())
  .then((data) => render(data.orders))

$ /coleoni-states board.html
  loading   gives no sign it is loading
  empty     doesn't say there's nothing
  partial   crashes: null.toUpperCase
  error     crashes · "Invalid Date"
  offline   crashes: Failed to fetch
  denied    crashes · "Invalid Date"
6 → 0states with problems
9states, forced through the API
0mocks written
4crashes found before users
States

Nine states, from the real API.

The script loads the page once, records the JSON calls the component makes, and then answers them differently for each state.

StateHow it is forced
ReadyThe real response
LoadingThe response never arrives
EmptyEvery list in the real response emptied
One, manyEvery list with 1 item, and with 30
Missing fieldsHalf the values in each record set to null
Server errorThe API answers 500
OfflineThe request fails as with no connection
No permissionThe API answers 401: the session expired
How it works

Force, compare, build.

Some problems need no eyes: a crash, “undefined” on screen. Others need a person: an error message that says nothing. The skill separates them.

  1. Records the API

    Every JSON call the component makes on a normal load, or the ones you name.

  2. Forces each state

    Same page, same code, a different answer from the API each time.

  3. Flags the obvious

    Blank, crashes, raw values, a state identical to another, loading with no sign, empty and errors that say nothing.

  4. Shows them together

    Tabs for each state and a grid of all of them, so the gaps jump out.

  5. Judges the rest

    Does loading keep the layout? Does the error say nothing was lost? Is a 401 treated as a 401?

  6. Builds the missing ones

    In the project’s fetch layer and components, with aria-busy and aria-live. Then runs again.

Install

One command, any agent.

The only package is playwright-core, installed by the agent on first use. It drives the Chrome or Edge you already have.

AgentClaude Code, Codex, Cursor…
Node.js18 or newer
Chrome or Edgealready on the machine
01Install
npx skills add c0le0ni/skills --skill coleoni-states
02Use it in your agent
/coleoni-states http://localhost:3000/orders .orders
For your whole user, not just the project-g
Claude Code only-a claude-code
Codex only-a codex
Every Coleoni skillnpx skills add c0le0ni/skills
Examples

Anything that waits for data.

Lists, dashboards, carts, search results, feeds. It shows the board first.

Every state of a list.

/coleoni-states http://localhost:3000/orders .orders

Choose the API calls.

/coleoni-states the dashboard --api "**/api/stats*"

Build what is missing.

/coleoni-states the cart, build the empty and error states
Options

The engine, from the terminal.

scripts/states.mjs runs on its own too: node states.mjs http://localhost:3000 --select ".orders" --out states-report.

OptionWhat it does
--select ".orders"The component
--api "**/api/x*"API calls to control, repeatable; default: the JSON calls the page makes
--states a,bOnly some states
--wait 1200How long to wait in each state
--lang en|ptLanguage of the board

Design the wait, the empty and the failure too.

npx skills add c0le0ni/skills --skill coleoni-states