← ClaudeAtlas

state-checklisted

Trace what each button, toggle, submit, or shortcut does to state, call by call, to find handlers that leave the wrong final state: a later call or store action resetting an earlier one, an effect reverting the change, async responses out of order, stale closures, a label promising a save the handler never makes. Use when a control "does nothing" or does the wrong thing ("bấm nút không ăn", "state bị reset", "click không chạy"), after changing a shared store action (Zustand, Redux, context, query cache) to audit its callers, after a refactor touching shared state, or before shipping a critical flow. Reports first, fixes only when asked. Not for rendering defects (ui-check), backend/frontend API contract drift, or visual design.
viettdann/arclight-kit · ★ 0 · Web & Frontend · score 65
Install: claude install-skill viettdann/arclight-kit
# State check Reading each function finds functions that are wrong. This skill finds handlers whose functions are all right and whose result is still wrong: `setComposeMode(true)` then `selectThread(null)`, where `selectThread` also clears `composeMode`. The button has a handler, nothing throws, the types check, and it does nothing. Read only the current working tree. ## 1. Scope The target is a page, a component tree, or a changed store action. For a changed action, the target is every caller of that action (grep the action name and the store hook). Whole-app audits only when asked: see Fan-out. A trailing `fix` argument asks for the fix after the report (step 6); the rest of the arguments are the target. When the user reports one control that does nothing, first confirm its handler runs (a log line or a test that clicks it). A click that never reaches the handler (an overlay or `pointer-events: none` intercepting it, a `disabled` attribute, the handler never bound, an exception thrown before it) is a wiring or rendering defect, not a state one: report that cause and stop tracing that control. ## 2. Map who writes state Before tracing any handler, list every writer the target can reach: - **Store actions** (Zustand, Redux reducers and thunks, Jotai or Recoil setters, context reducers, Pinia or Svelte stores): `action(args) → sets {fields} · resets {fields it does not own} · async {fetch, invalidate, navigate}`. A field is owned by the action named for it; any other ac