State Management

Modern frontend state management patterns, tools, architecture decisions, and scalability patterns

492 stars 68 forksFrontend & Design

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add cosmicstack-labs/mercury-agent-skills --skill state-management
Manual install
git clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git /tmp/mercury-agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/mercury-agent-skills/categories/frontend/state-management ~/.claude/skills/state-management

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# State Management

Comprehensive patterns for managing state in modern frontend applications — from local component state to global application state.

## State Categories

| Type | Description | Examples | Tool |
|------|-------------|----------|------|
| **Local** | Component-scoped state | Form inputs, toggles | `useState`, `useReducer` |
| **Shared** | State shared between components | Selected item, filter state | Zustand, Context |
| **Server** | Data from APIs/database | User list, product catalog | TanStack Query, SWR |
| **URL** | State in the URL | Page number, search query | `next/navigation`, React Router |
| **Persisted** | State that survives refresh | Theme preference, auth token | localStorage, AsyncStorage |

## Patterns by Scale

### Small App (< 5 screens)

```tsx
// Just useState + lifting state up is enough
function Parent() {
  const [count, setCount] = useState(0);
  return (
    <>
      <ChildA count={count} />
      <ChildB onIncrement={() => setCount(c => c + 1)} />
    </>
  );
}
```

### Medium App (5-20 screens)
Read the full skill on GitHub

Details

Skill name
state-management
Path
categories/frontend/state-management/SKILL.md
License
MIT
Repo updated
25 August 2026

FAQ

What does the State Management skill do?

Modern frontend state management patterns, tools, architecture decisions, and scalability patterns

How do I install the State Management skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add cosmicstack-labs/mercury-agent-skills --skill state-management. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is State Management popular?

It lives in cosmicstack-labs/mercury-agent-skills, which has 492 GitHub stars and 68 forks.

Related skills

Browse the most popular Claude skills, all frontend & design skills, or write your own with the skills generator.