# Ccstate

> Apply ccstate patterns for reactive values, commands, HTTP responses, and async or DOM ownership

- Skill: `vm0-ai/ccstate` (Agent Skill, multi-file: 6 files)
- Install (CLI): `npx skillmds add vm0-ai/ccstate`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vm0-ai/ccstate/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: vm0-ai (https://skillmd.com/u/vm0-ai)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/vm0-ai/ccstate

---


# ccstate

Read the reference matching the changed behavior; API work does not require the
React/DOM reference unless it also changes that surface.

| Task                                                              | Reference                                   |
| ----------------------------------------------------------------- | ------------------------------------------- |
| `computed`, memoization, function-valued state, reactive fetches  | [Reactive values](references/reactivity.md) |
| API client status handling and `accept`                           | [HTTP](references/http.md)                  |
| AbortSignal ownership, cancellation, debouncing, detached cleanup | [Lifecycle](references/lifecycle.md)        |
| DOM callbacks, page signals, refs and ref cleanup                 | [React and DOM](references/react.md)        |
| Shared command logic and signal factories                         | [Commands](references/commands.md)          |

## Boundaries

- Keep derivation in `computed` and semantic actions in commands. Do not create
  signals or mutate the store during React render.
- Every async operation needs an owner and cancellation path. Await work or
  return its promise inside signals; use `detach()` only at an actual outer
  boundary with its ownership reason. Do not silence work with `void`.
- `resetSignal()` provides mutual exclusion. Add a parent when the work belongs
  to a page/route lifetime; parentless use still needs an explicit owner that
  cancels it. The lifecycle reference defines both valid patterns.
- Use `accept` with a non-empty status list for `apiClient$` calls. Preserve
  structured HTTP errors and use the view's loadable state for lifecycle UI.
- Route setup owns `pageSignal$`. Preserve stable callback refs and `onRef`
  cleanup returns.

See [effects](../../../docs/effect.md), [cache](../../../docs/cache.md), and
[Platform tests](../../../docs/testing/app-testing.md) for the relevant broader
contracts. For performance investigations, use
[React measurements](../../../docs/react-commit.md).

