Agent skill · software engineering · pedronauck

xstate-store

Build, test, integrate, or migrate XState Store v4: transitions, effects, schemas, selectors, atoms, extensions, React bindings, and fromStore. Excludes XState state-machine design, other stores, and Query server state.

Why this skill is useful

Provides domain-specific knowledge and patterns for using @xstate/store v4 effectively in TypeScript applications, which the AI wouldn't reliably generate on its own.

What it needs

Requires @xstate/store, @xstate/store-react installed locally. About 2k tokens when loaded. Last updated 2026-08-01. 564 stars on the source repository.

What this skill does

XState Store Targets @xstate/store v4 and @xstate/store-react v2 (TypeScript 5.4+). Read the reference matched by the API or behavior being changed. Load adjacent references only for concerns the change crosses; reuse relevant context already read. Pick the primitive first State Primitive Why --- --- --- Domain state updated through named events createStore({ context, on }) Typed trigger, can, emitted events, replayable transitions Per-instance state built from input createStoreLogic({ context: (input) => … }) One definition, many instances; selectors come along A single value set directly createAtom(value) No event vocabulary to justify a store A value computed from other atoms or selectors createAtom(() => …) Read-only, recomputes on dependency change Modes, guards, delays, hierarchical or parallel states xstate machine A store models data, not lifecycle Done when: the primitive is chosen from this table and its justification holds. Branches When you are… Reference --- --- Creating a store, writing transitions, using trigger/send/can, or Immer references/store-core.md Enqueuing effects, emitting events, or doing async work references/effects-and-events.md Declaring schemas or turning on runtime validation references/schemas-and-validation.md Reading state with store.select, atoms, derived/async/reducer atoms references/selectors-and-atoms.md Building reusable/per-instance stores with createStoreLogic, input, or selectors references/store-logic-and-input.md Adding persist, undoRedo, reset, or composing .with(...) references/extensions.md Wiring a store into React components references/react.md Testing transitions, inspecting a store, or interoperating with XState references/testing-and-interop.md Upgrading a v3 store to v4, or porting an existing Zustand store over references/migration-v4.md Apply the technical rules relevant to the changed behavior. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills pedronauck/xstate-store

View the source on GitHub

Browse the @skills marketplace