Agent skill · software engineering · yonatangross
zustand-patterns
Reference for Zustand 5.x state management including slices, middleware, Immer, useShallow, persistence, selectors, and devtools integration. Documents 7 core patterns with TypeScript examples and anti-patterns. Use when building React state management with Zustand instead of Redux.
Why this skill is useful
Documents specific Zustand patterns and TypeScript examples that enhance state management practices beyond generic knowledge.
What it needs
About 3k tokens when loaded. Last updated 2026-08-06. 215 stars on the source repository.
What this skill does
Zustand Patterns Modern state management with Zustand 5.x - lightweight, TypeScript-first, no boilerplate. Overview Global state without Redux complexity Shared state across components without prop drilling Persisted state with localStorage/sessionStorage Computed/derived state with selectors State that needs middleware (logging, devtools, persistence) Upstream coverage (do not restate) Zustand's own docs are the source for the mechanics. This skill carries only the OrchestKit delta on top of them, in references/ork-delta.md, the rules/ files, and the checklist. Topic First-party source ------- -------------------- Basic store, create<State>()(), actions, async actions https://github.com/pmndrs/zustand/blob/main/docs/reference/apis/create.md Slices pattern (splitting and combining stores) https://github.com/pmndrs/zustand/blob/main/docs/learn/guides/slices-pattern.md Typing slices and middleware mutator tuples https://github.com/pmndrs/zustand/blob/main/docs/learn/guides/advanced-typescript.md Immer middleware (draft mutations) https://github.com/pmndrs/zustand/blob/main/docs/reference/middlewares/immer.md persist: partialize, version, migrate, onRehydrateStorage, storage adapters https://github.com/pmndrs/zustand/blob/main/docs/reference/middlewares/persist.md devtools: action names, enabled, serialize, trace https://github.com/pmndrs/zustand/blob/main/docs/reference/middlewares/devtools.md subscribeWithSelector and non-React subscriptions https://github.com/pmndrs/zustand/blob/main/docs/reference/middlewares/subscribe-with-selector.md Selectors and useShallow re-render control https://github.com/pmndrs/zustand/blob/main/docs/learn/guides/prevent-rerenders-with-use-shallow.md v4 to v5 migration (createWithEqualityFn, React 18 floor) https://github.com/pmndrs/zustand/blob/main/docs/reference/migrations/migrating-to-v5.md SSR and hydration https://github.com/pmndrs/zustand/blob/main/docs/learn/guides/ssr-and-hydration.md Store testing and reset https://github.com/pmn …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills yonatangross/zustand-patterns