AugmentClaude

React State Management

Picks the right React state tool and gives typed store and query patterns to copy.

Installation

  1. Make sure Claude is on your device and in your terminal.

    Skills load from ~/.claude/skills/ when Claude Code starts up — so you need it on your machine first. If you don't have it yet, install it once with the command below, then run claude in any terminal to verify.

    One-time setup
    npm i -g @anthropic-ai/claude-code

    Already have it? Skip ahead.

  2. Paste into Claude Code or into your terminal.

    This copies the whole skill folder into ~/.claude/skills/react-state-management-wshobson/ — the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.

    Faster alternative (instruction-only skills)

    Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates — they won't be downloaded and the skill will fail when it tries to load them.

    Quick install (SKILL.md only)
    Sign up to copy
  3. Restart Claude Code.

    Quit and reopen Claude Code (or any other agent that loads from ~/.claude/skills/). New skills are picked up on startup.

  4. Just ask Claude.

    Skills auto-activate when your request matches the skill's description — no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the “What this skill does” section above.

Prefer to read the source first? Open on GitHub.

When Claude uses it

Reference knowledge for managing state in modern React apps, covering when to reach for local state, a global store (Redux Toolkit, Zustand, Jotai), or server-state caching (React Query, SWR, RTK Query). It loads a selection matrix, typed store templates, and do/don't rules, plus a worked legacy-Redux-to-RTK migration. Reach for it when setting up global state, syncing server data, debugging re-renders, or deciding between state libraries.

What this skill does

What it does: Gives Claude a decision framework and copy-ready patterns for choosing and wiring up React state management across client, server, URL, and form state.

  • Classifies state into local, global, server, URL, and form buckets and maps each to the right tool (useState/useReducer, Redux Toolkit/Zustand/Jotai, React Query/SWR/RTK Query, React Router/nuqs, React Hook Form/Formik)
  • Provides selection criteria for picking between Zustand, Jotai, and Redux Toolkit based on app size and how server-heavy the workload is
  • Ships a typed Zustand quick-start store using the devtools and persist middleware, with a component usage example
  • Lists concrete do's and don'ts — colocate state, use selectors to limit re-renders, normalize data, don't duplicate server state or store derived values
  • Includes a side-by-side legacy-Redux-to-Redux-Toolkit migration showing the move from action constants and switch reducers to createSlice with Immer
  • Points to a references/details.md file for deeper patterns, optimistic updates, and worked examples

Related skills