React Expert
Jeffallan/claude-skills
Builds React 19 components in TypeScript with Server Components, useActionState forms, custom hooks and state libraries, checked with tsc and React Testing Library.
Zustand state management for React with TypeScript. An agent skill from secondsky/claude-skills.
$ npx skills add secondsky/claude-skills --skill zustand-state-management -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install secondsky/claude-skills zustand-state-management --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/zustand-state-management/skills/zustand-state-management .claude/skills/zustand-state-management && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "zustand-state-management" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/zustand-state-management/skills/zustand-state-management into .claude/skills/zustand-state-management/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-state-management", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/secondsky/claude-skills/tree/main/plugins/zustand-state-management/skills/zustand-state-managementType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add secondsky/claude-skills --skill zustand-state-management -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install secondsky/claude-skills zustand-state-management --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/zustand-state-management/skills/zustand-state-management .agents/skills/zustand-state-management && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "zustand-state-management" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/zustand-state-management/skills/zustand-state-management into .agents/skills/zustand-state-management/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-state-management", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add secondsky/claude-skills --skill zustand-state-management -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install secondsky/claude-skills zustand-state-management --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/zustand-state-management/skills/zustand-state-management .cursor/skills/zustand-state-management && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "zustand-state-management" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/zustand-state-management/skills/zustand-state-management into .cursor/skills/zustand-state-management/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-state-management", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/secondsky/claude-skills.git --path plugins/zustand-state-management/skills/zustand-state-management--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add secondsky/claude-skills --skill zustand-state-management -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install secondsky/claude-skills zustand-state-management --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/zustand-state-management/skills/zustand-state-management .gemini/skills/zustand-state-management && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "zustand-state-management" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/zustand-state-management/skills/zustand-state-management into .gemini/skills/zustand-state-management/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-state-management", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install secondsky/claude-skills zustand-state-managementInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add secondsky/claude-skills --skill zustand-state-management -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/zustand-state-management/skills/zustand-state-management .github/skills/zustand-state-management && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "zustand-state-management" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/zustand-state-management/skills/zustand-state-management into .github/skills/zustand-state-management/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-state-management", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add secondsky/claude-skills --skill zustand-state-management -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install secondsky/claude-skills zustand-state-management --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/zustand-state-management/skills/zustand-state-management .opencode/skills/zustand-state-management && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "zustand-state-management" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/zustand-state-management/skills/zustand-state-management into .opencode/skills/zustand-state-management/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-state-management", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
zustand-state-managementZustand state management for React with TypeScript. An agent skill from secondsky/claude-skills.
Zustand State Management is an agent skill from secondsky/claude-skills. Zustand state management for React with TypeScript. Use for global state, Redux/Context API migration, localStorage persistence, slices pattern, devtools, Next.js SSR, or encountering hydration errors, TypeScript inference issues, persist middleware problems, infinite render loops.
Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 23 other files, including scripts, reference files and assets (for example `references/advanced-topics.md`, `references/common-patterns.md` and `references/example-reference.md`).
It sits in Frontend & Design, covering State management. It works with Zustand, TypeScript, Next.js and React. The repository describes itself as: Production-ready skills for Claude Code CLI - Cloudflare, React, Tailwind v4, and AI integrations. The licence is MIT.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 8837836. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 2 files in scripts/ (TypeScript and Shell, from the files we listed), which the agent can run.
Shell commands in SKILL.md call:
bunFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
zustand.docs.pmnd.rsgithub.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Zustand State Management loads about 2.5k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 77 tokens; SKILL.md has 660 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from secondsky/claude-skills at commit 8837836, republished under its MIT licence (© secondsky). 660 words, ~2,484 tokens.
.claude/skills/zustand-state-management/SKILL.md (or your agent's skills folder). This skill also uses 19 other files; get the full folder from GitHub.Status: Production Ready ✅ Last Updated: 2026-08-03 Latest Version: zustand@5.0.14 Dependencies: React 18+, TypeScript 5+
bun add zustand # preferred
# or: npm install zustand
# or: yarn add zustandWhy Zustand?
create)import { create } from 'zustand'
interface BearStore {
bears: number
increase: (by: number) => void
reset: () => void
}
const useBearStore = create<BearStore>()((set) => ({
bears: 0,
increase: (by) => set((state) => ({ bears: state.bears + by })),
reset: () => set({ bears: 0 }),
}))CRITICAL: Notice the double parentheses create<T>()() - this is required for TypeScript with middleware.
import { useBearStore } from './store'
function BearCounter() {
const bears = useBearStore((state) => state.bears)
return <h1>{bears} around here...</h1>
}
function Controls() {
const increase = useBearStore((state) => state.increase)
return <button onClick={() => increase(1)}>Add bear</button>
}Why this works:
For simple use cases without TypeScript:
import { create } from 'zustand'
const useStore = create((set) => ({
count: 0,
increment: () => set((state) => ({ count: state.count + 1 })),
decrement: () => set((state) => ({ count: state.count - 1 })),
}))When to use:
For production apps with type safety:
import { create } from 'zustand'
// Define store interface
interface CounterStore {
count: number
increment: () => void
decrement: () => void
}
// Create typed store
const useCounterStore = create<CounterStore>()((set) => ({
count: 0,
increment: () => set((state) => ({ count: state.count + 1 })),
decrement: () => set((state) => ({ count: state.count - 1 })),
}))Key Points:
create<T>()() syntax (currying for middleware)For state that survives page reloads:
import { create } from 'zustand'
import { persist, createJSONStorage } from 'zustand/middleware'
interface UserPreferences {
theme: 'light' | 'dark' | 'system'
language: string
setTheme: (theme: UserPreferences['theme']) => void
setLanguage: (language: string) => void
}
const usePreferencesStore = create<UserPreferences>()(
persist(
(set) => ({
theme: 'system',
language: 'en',
setTheme: (theme) => set({ theme }),
setLanguage: (language) => set({ language }),
}),
{
name: 'user-preferences', // unique name in localStorage
storage: createJSONStorage(() => localStorage), // optional: defaults to localStorage
},
),
)Why this matters:
✅ Use create<T>()() (double parentheses) in TypeScript for middleware compatibility
✅ Define separate interfaces for state and actions
✅ Use selector functions to extract specific state slices
✅ Use set with updater functions for derived state: set((state) => ({ count: state.count + 1 }))
✅ Use unique names for persist middleware storage keys
✅ Handle Next.js hydration with hasHydrated flag pattern
✅ Use shallow for selecting multiple values
✅ Keep actions pure (no side effects except state updates)
❌ Use create<T>(...) (single parentheses) in TypeScript - breaks middleware types
❌ Mutate state directly: set((state) => { state.count++; return state }) - use immutable updates
❌ Create new objects in selectors: useStore((state) => ({ a: state.a })) - causes infinite renders
❌ Use same storage name for multiple stores - causes data collisions
❌ Access localStorage during SSR without hydration check
❌ Use Zustand for server state - use TanStack Query instead
❌ Export store instance directly - always export the hook
| Issue | Error | Quick Fix |
|---|---|---|
| #1 Hydration mismatch | "Text content does not match" | Use _hasHydrated flag + onRehydrateStorage |
| #2 TypeScript inference | Types break with middleware | Use create<T>()() double parentheses |
| #3 Import error | "createJSONStorage not exported" | Upgrade to zustand@5.0.14+ |
| #4 Infinite loop | Browser freezes | Use shallow or separate selectors |
| #5 Slices types | StateCreator types fail | Explicit StateCreator<Combined, [], [], Slice> |
Most Critical - TypeScript double parentheses:
// ❌ WRONG: create<T>((set) => ...)
// ✅ CORRECT: create<T>()((set) => ...)See: references/known-issues.md for complete solutions with code examples.
import { create } from 'zustand'
import { devtools, persist } from 'zustand/middleware'
const useStore = create<MyStore>()(
devtools(
persist(
(set) => ({ /* store definition */ }),
{ name: 'my-storage' },
),
{ name: 'MyStore' },
),
)| Middleware | Purpose | Import |
|---|---|---|
persist | localStorage/sessionStorage | zustand/middleware |
devtools | Redux DevTools integration | zustand/middleware |
immer | Mutable update syntax | zustand/middleware/immer |
Order matters: devtools(persist(...)) shows persist actions in DevTools.
See: references/middleware-guide.md for complete middleware documentation.
| Pattern | Use Case | Key Technique |
|---|---|---|
| Computed values | Derived data | Compute in selector: state.items.length |
| Async actions | API calls | set({ isLoading: true }) + try/catch |
| Reset store | Logout, form clear | set(initialState) |
| Selector with params | Dynamic access | state.todos.find(t => t.id === id) |
| Multiple stores | Separation of concerns | Create separate create() calls |
See: references/common-patterns.md for complete implementations.
| Topic | Use Case | Key API |
|---|---|---|
| Vanilla store | Non-React, testing | createStore() from zustand/vanilla |
| Custom middleware | Logging, timestamps | Wrap StateCreator |
| Immer | Mutable update syntax | immer() middleware |
| Subscriptions | Side effects | store.subscribe() |
See: references/advanced-topics.md for complete implementations.
| Type | Files |
|---|---|
| Templates | basic-store.ts, typescript-store.ts, persist-store.ts, slices-pattern.ts, devtools-store.ts, nextjs-store.ts, computed-store.ts, async-actions-store.ts |
| References | middleware-guide.md, typescript-patterns.md, nextjs-hydration.md, migration-guide.md, known-issues.md, common-patterns.md, advanced-topics.md |
| Reference | Load When... |
|---|---|
known-issues.md | Debugging hydration, TypeScript, infinite loop, or slices errors |
common-patterns.md | Implementing computed values, async actions, reset patterns |
advanced-topics.md | Vanilla stores, custom middleware, Immer, subscriptions |
middleware-guide.md | Configuring persist, devtools, or combining middlewares |
typescript-patterns.md | Complex type inference issues, StateCreator problems |
nextjs-hydration.md | Next.js SSR/hydration problems |
migration-guide.md | Migrating from Redux, Context API, or Zustand v4 |
| Problem | Solution |
|---|---|
| Store updates don't trigger re-renders | Use selector: useStore(state => state.value) not destructuring |
| TypeScript errors with middleware | Use create<T>()() double parentheses |
| Hydration error with persist | Implement _hasHydrated flag pattern |
| Actions not showing in DevTools | Pass action name: set(newState, undefined, 'actionName') |
| Store resets unexpectedly | HMR causes reset in development |
{ "dependencies": { "zustand": "^5.0.14", "react": "^18.0.0+" } }Compatibility: React 18+, React 19, TypeScript 5+, Next.js 14+, Vite 5+
Official Docs: https://zustand.docs.pmnd.rs/ | GitHub: https://github.com/pmndrs/zustand
© secondsky, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 19 other files (scripts, references, assets) in plugins/zustand-state-management/skills/zustand-state-management of secondsky/claude-skills.
Open the folder on GitHubat commit 8837836
Zustand State Management next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Zustand State Management this skillsecondsky/claude-skills | 227 | — | ~2.5k | Automated safety check: Pass | MIT | |
| React ExpertJeffallan/claude-skills | 12k | — | ~1.4k | Automated safety check: Pass | MIT | |
| Nextjs15 Initbear2u/my-skills | 933 | — | ~2.4k | Automated safety check: Pass | None | |
| React Flow Node TSmicrosoft/skills | 3.1k | 6 repos | ~502 | Automated safety check: Pass | MIT | |
| React Generate Skilljiushiwon/wg-skills | 114 | — | ~2.8k | Automated safety check: Pass | Apache-2.0 | |
| React Idiomsirahardianto/awesome-agv | 157 | — | ~3.8k | Automated safety check: Pass | MIT |
Jeffallan/claude-skills
Builds React 19 components in TypeScript with Server Components, useActionState forms, custom hooks and state libraries, checked with tsc and React Testing Library.
bear2u/my-skills
A skill your agent uses when user wants to create a new Next.js 15 project (Todo/Blog/Dashboard/E-commerce/Custom domain) with App Router, ShadCN, Zustand, Tanstack Query, and modern Next.js stack
microsoft/skills
Create React Flow node components with TypeScript types, handles, and Zustand integration.
jiushiwon/wg-skills
This skill should be used when the user wants to create a standardized React 18 + TypeScript + Vite + Zustand project from scratch.
irahardianto/awesome-agv
React 19+ patterns: custom hooks, Suspense boundaries, state management, component composition, and web performance.
avibebuilder/claude-prime
A skill your agent uses for ANY work involving React, Next.js, TypeScript, or Tailwind in the browser layer.
secondsky/claude-skills
AutoAnimate (@formkit/auto-animate) zero-config animations for React.
secondsky/claude-skills
MUI Base UI unstyled React components with Floating UI. An agent skill from secondsky/claude-skills.
secondsky/claude-skills
This skill should be used when the user asks to "upload images to Cloudflare", "implement direct creator upload", "configure image transformations", "optimize WebP/AVIF", "create image variants"…
secondsky/claude-skills
Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare).
secondsky/claude-skills
Cloudflare Sandboxes SDK for secure code execution in Linux containers at edge.
secondsky/claude-skills
GitHub repository automation (CI/CD, issue templates, Dependabot, CodeQL).
Works with
Categories
Zustand state management for React with TypeScript. An agent skill from secondsky/claude-skills. Zustand State Management is an agent skill from secondsky/claude-skills. Zustand state management for React with TypeScript.
Zustand State Management fits situations like: redux/Context API migration; localStorage persistence; encountering hydration errors; typeScript inference issues.
Run `npx skills add secondsky/claude-skills --skill zustand-state-management -a claude-code`. Or copy the skill folder (plugins/zustand-state-management/skills/zustand-state-management in secondsky/claude-skills) into .claude/skills/zustand-state-management in your project. Claude Code loads it when a task matches its description.
Run `npx skills add secondsky/claude-skills --skill zustand-state-management -a codex`. Or copy the skill folder (plugins/zustand-state-management/skills/zustand-state-management in secondsky/claude-skills) into .agents/skills/zustand-state-management in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add secondsky/claude-skills --skill zustand-state-management -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/zustand-state-management, .gemini/skills/zustand-state-management, .github/skills/zustand-state-management and .opencode/skills/zustand-state-management in your project.
Going by SKILL.md and its folder, Zustand State Management needs TypeScript and a shell for the scripts in its folder and the command-line tools its instructions call (bun). Our summary lists: Node.js; A Bash shell.
SKILL.md names 2 domains. As links in the text: zustand.docs.pmnd.rs and github.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Zustand State Management is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.5k tokens (SKILL.md is roughly 9.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 11k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Zustand State Management: React Expert (Jeffallan/claude-skills, 12k stars), Nextjs15 Init (bear2u/my-skills, 933 stars), React Flow Node TS (microsoft/skills, 3.1k stars) and React Generate Skill (jiushiwon/wg-skills, 114 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
secondsky (a GitHub user) maintains it in secondsky/claude-skills, which has 227 GitHub stars. The repository holds 168 skills in this directory. The repository was last updated on September 28, 2026.
Source: secondsky/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.