state-management · statelyai — Claude Code skill: what it does, how to install
state-management is a Claude Code skill that models application state before library selection. It reviews and refactors models, keeps source state minimal, computes derived values, and makes invalid states hard to represent.
no license 181 installs ★ 50 updated 2026-05-22
npx skills add statelyai/skills --skill state-management -a claude-codeWhat state-management does
The skill treats state modeling as the first step — before any library choice — then maps the result to Redux, Zustand, Pinia, TanStack Query, or plain local component state.
The process is structured: inventory every state value, classify it (source, derived, finite, server cache, URL, history, ephemeral mutable ref), remove duplication, define invariants, collapse boolean sets into a single finite status field, list domain events, and sketch transitions. Four modes are available: Design a new model from requirements, Review existing code for bugs and invalid states, Refactor while preserving behavior, or Library mapping once the model is sound.
The skill activates whenever Redux, Zustand, Pinia, useEffect, forms, wizards, boolean flags, duplicated state, or tangled UI logic come up — no explicit request for a “state model” needed. Several booleans describing one status get replaced with a single field because that structure rules out invalid combinations; package.json and local imports are read first to understand what is already in the project.
What it helps with
- replace a set of boolean flags with a single finite-state status field
- eliminate duplicated state and move derived values to computed expressions
- identify invalid state combinations that are currently representable in code
- untangle
useEffectchains that synchronize state instead of reacting to transitions - decide the right home for each value: component, store, URL, or server cache
Example prompts for the agent
- Review this component's state for duplication or invalid combinations
- Refactor this reducer — remove the boolean flags and introduce a single
statusfield - Decide what belongs in URL params versus TanStack Query for this filter and pagination state
How to install state-management
1Skills CLI (Vercel)
npx skills add statelyai/skills --skill state-management -a claude-code2Manually: put the files in place
~/.claude/skills/state-management/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/state-management/
1Skills CLI (Vercel)
npx skills add statelyai/skills --skill state-management -a codex2Manually: put the files in place
.agents/skills/state-management/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add statelyai/skills --skill state-management -a cursor2Manually: put the files in place
.cursor/skills/state-management/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install statelyai/skills skills/state-management2Manually: put the files in place
.github/skills/state-management/SKILL.md1Skills CLI (Vercel)
npx skills add statelyai/skills --skill state-management -a gemini-cli2Platform CLI
gemini skills install https://github.com/statelyai/skills --path skills/state-managementManually: put the files in place
.devin/skills/state-management/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add statelyai/skills --skill state-management -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about state-management
How do I install state-management in Claude Code?
Run npx skills add statelyai/skills --skill state-management -a claude-code. The skill will be available at ~/.claude/skills/state-management/SKILL.md.
What does the state-management skill do?
It models, reviews, and refactors application state: minimizes source truth, moves derived values to computed expressions, replaces boolean sets with finite states, and places each value in the right layer.
Does it work with a specific library like Redux or Zustand?
The skill builds a library-agnostic model first, then maps it to the chosen stack. Redux, Zustand, Pinia, TanStack Query, and local component state are all supported.
Similar skills
All skills for Agent setup: memory, context, orchestration →state-management by other authors comes first.