CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

statelyai/state-management

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."

Quality

87%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

README.md

State management skill

The state-management skill teaches coding agents to model, review, and refactor application state. It keeps source state minimal, computes derived state instead of synchronizing it, replaces boolean flags with explicit finite states, and places each value in the right home. It maps the model to a library only after the model is sound.

Install

npx skills add statelyai/skills --skill state-management

The Codex stately plugin also includes this skill. The Claude Code plugin does not. See Install.

Use

Ask about state in any framework or library:

This form component has isLoading, isError, and isSuccess flags. Clean up the state.
Review this Zustand store for duplicated and derived state.
Design the state for a multi-step checkout wizard.

The skill works in one of four modes:

ModeOutput
DesignA new state model built from requirements
ReviewInvalid states, duplication, synchronization bugs, and misplaced state
RefactorA simpler model with the same behavior and tighter invariants
Library mappingA sound model translated to React, Redux, Zustand, Vue/Pinia, or plain functions

It classifies every value as source, derived, finite, server, URL, ephemeral, or history state before deciding where it belongs.

Contents

PathContents
SKILL.mdTaxonomy, principles, and workflow
references/review-checklist.mdChecklist for reviewing existing state code
references/typescript-modeling.mdDiscriminated unions and other TypeScript patterns
references/async-state.mdLoading, errors, cancellation, and server state
references/react.mdReact state and effects
references/redux.mdRedux and Redux Toolkit
references/zustand.mdZustand
references/vue-pinia.mdVue and Pinia
references/no-library.mdPlain functions and reducers
evals/Evaluation prompts

Related skills

LICENSE

README.md

SKILL.md

tile.json