Model, review, and refactor application state so source state stays minimal, derived state is computed instead of synchronized, impossible states are not representable, and each piece of state lives in the right place. Use this whenever the user mentions state management, reducers, stores, Redux, Zustand, React state, Vue state, Pinia, selectors, derived state, duplicated state, boolean flags, invalid states, async status, useEffect soup, forms, wizards, filters, URL state, server state, or confusing UI logic, even if they do not explicitly ask for a "state model."
87%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Use this reference for Redux and Redux Toolkit codebases.
Prefer state that looks like:
status fields for request or workflow modesAvoid:
Prefer events like:
checkout.startedcheckout.submittedcheckout.succeededcheckout.failedBe careful with setter-shaped actions like:
setLoadingsetItemssetErrorThose often leak implementation details and make invalid combinations easy to create.
Selectors are where derived state belongs:
canSubmit and similar booleansDo not store selector results back into Redux state.
Redux can model async workflows, but do not force all remote data concerns into Redux just because Redux exists. If the problem is mainly remote caching, freshness, invalidation, retries, and background refetching, a dedicated server-state tool may be the better fit.