Concise Zustand 5 store patterns covering selectors, middleware, slices, and async actions for React state.
- CCM score
- 57 of 100
- skills.sh installs
- 214
- GitHub stars
- 681
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers basic stores, persist, immer, and devtools middleware with a store-per-concern layout
- Includes
useShallowselector guidance and a slices pattern for combining user and cart state - Enforces selecting specific fields instead of the whole store to avoid unnecessary re-renders
- Designed for React projects that manage client state with Zustand and need async fetch handling
Install
$ npx -y skills add gentleman-programming/gentleman-skills --skill zustand-5 -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Basic Store
import { create } from "zustand";
interface CounterStore {
count: number;
increment: () => void;
decrement: () => void;
reset: () => void;
}
const useCounterStore = create<CounterStore>((set) => ({
count: 0,
increment: () => set((state) => ({ count: state.count + 1 })),
decrement: () => set((state) => ({ count: state.count - 1 })),
reset: () => set({ count: 0 }),
}));
// Usage
function Counter() {
const { count, increment, decrement } = useCounterStore();
return (
<div>
<span>{count}</span>
<button onClick={increment}>+</button>
<button onClick={decrement}>-</button>
</div>
);
}
Persist Middleware
import { create } from "zustand";
import { persist } from "zustand/middleware";
interface SettingsStore {
theme: "light" | "dark";
language: string;
setTheme: (theme: "light" | "dark") => void;
setLanguage: (language: string) => void;
}
Details
- Repository
- github.com/gentleman-programming/gentleman-skills
- Category
- Frontend & UI Code
- First seen
- Jun 3, 2026
Questions
What is the zustand-5 skill for?
The zustand-5 skill teaches an AI assistant Zustand 5 state management patterns for React. It covers basic stores, persist, selectors with useShallow, async actions, slices, Immer, DevTools and using a store outside React.
How do I install the zustand-5 skill?
Run npx -y skills add gentleman-programming/gentleman-skills --skill zustand-5 -y in a project. The skill then lets the agent write React state code with Zustand 5 following these patterns.
Which category does zustand-5 belong to and what leads it?
zustand-5 sits in the Frontend and UI Code category on Claude Marketplaces. It is listed alongside vercel-react-best-practices, web-design-guidelines, design-taste-frontend, vercel-composition-patterns and lark-apps, and it focuses specifically on Zustand state stores.
Does zustand-5 help avoid unnecessary re-renders?
Yes, the skill shows selecting specific fields in Zustand 5 selectors and using useShallow for multiple fields. It warns against selecting the entire store, which re-renders on any state change.
More from gentleman-programming/gentleman-skills
All 13Similar to Zustand 5
More Frontend & UI Codezustand-patternsyonatangross/orchestkit1.5K installsZustand 5.x state management reference covering slices, middleware, Immer, persistence, and selectors with TypeScript.
zustandpedronauck/skills373 installsFocused Zustand guide that sets store structure, selector hooks, and middleware conventions for client-only shared state.
zustand-state-managementmindrally/skills1K installsLead-in line for a Zustand best-practices skill covering store design, selectors, middleware, SSR, and testing.
zustand-state-builderpatricio0312rev/skills265 installsModular Zustand store patterns with TypeScript, persistence, devtools, and immer middleware for global state.
zustand-store-tssickn33/agentic-awesome-skills254 installsTyped Zustand store patterns with subscribeWithSelector, split state and actions, and selector-based rendering.
react-state-managementsickn33/agentic-awesome-skills425 installsModern React state management guide covering Redux Toolkit, Zustand, Jotai, and React Query with concrete store patterns.