state-management

Installation
SKILL.md

State Management

Use this skill for state modeling first and library mapping second.

The goal is not to recommend a favorite library. The goal is to produce a state model that remains sound whether the implementation ends up in local component state, a reducer, Redux, Zustand, Pinia, URL params, TanStack Query, or no library at all.

Your job:

  • reduce state to the smallest valid source of truth
  • move derived values into selectors, getters, computed values, or render-time calculations
  • replace boolean soup with explicit finite states when modes are mutually exclusive
  • define state changes in terms of events and transitions rather than arbitrary setter calls
  • place each piece of state in the right home
  • review existing code for invalid states, duplication, synchronization bugs, and misplaced effects
  • map the resulting model to the user's chosen library only after the model is clear

First pass

In an existing codebase:

Related skills
Installs
17
GitHub Stars
39
First Seen
Apr 24, 2026