React State Management
involvex/youtube-music-cli
Master modern React state management with Redux Toolkit, Zustand, Jotai, and React Query.
Zustand 5 state management patterns. An agent skill from Gentleman-Programming/Gentleman-Skills.
$ npx skills add Gentleman-Programming/Gentleman-Skills --skill zustand-5 -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Gentleman-Programming/Gentleman-Skills zustand-5 --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/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/curated/zustand-5 .claude/skills/zustand-5 && 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-5" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/curated/zustand-5 into .claude/skills/zustand-5/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-5", 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/Gentleman-Programming/Gentleman-Skills/tree/main/curated/zustand-5Type 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 Gentleman-Programming/Gentleman-Skills --skill zustand-5 -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Gentleman-Programming/Gentleman-Skills zustand-5 --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/curated/zustand-5 .agents/skills/zustand-5 && 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-5" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/curated/zustand-5 into .agents/skills/zustand-5/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-5", 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 Gentleman-Programming/Gentleman-Skills --skill zustand-5 -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Gentleman-Programming/Gentleman-Skills zustand-5 --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/curated/zustand-5 .cursor/skills/zustand-5 && 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-5" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/curated/zustand-5 into .cursor/skills/zustand-5/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-5", 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/Gentleman-Programming/Gentleman-Skills.git --path curated/zustand-5--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 Gentleman-Programming/Gentleman-Skills --skill zustand-5 -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Gentleman-Programming/Gentleman-Skills zustand-5 --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/curated/zustand-5 .gemini/skills/zustand-5 && 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-5" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/curated/zustand-5 into .gemini/skills/zustand-5/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-5", 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 Gentleman-Programming/Gentleman-Skills zustand-5Installs 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 Gentleman-Programming/Gentleman-Skills --skill zustand-5 -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/curated/zustand-5 .github/skills/zustand-5 && 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-5" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/curated/zustand-5 into .github/skills/zustand-5/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-5", 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 Gentleman-Programming/Gentleman-Skills --skill zustand-5 -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Gentleman-Programming/Gentleman-Skills zustand-5 --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/curated/zustand-5 .opencode/skills/zustand-5 && 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-5" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/curated/zustand-5 into .opencode/skills/zustand-5/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-5", 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-5Zustand 5 state management patterns. An agent skill from Gentleman-Programming/Gentleman-Skills.
Zustand 5 is an agent skill from Gentleman-Programming/Gentleman-Skills. Zustand 5 state management patterns. Trigger: When managing React state with Zustand.
Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Frontend & Design, covering State management. It works with Zustand. The repository describes itself as: Community-driven AI agent skills for Claude Code, OpenCode, and other AI assistants. Curated patterns and community contributions. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit c8036a3. 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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From 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 5 loads about 1.2k tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 24 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); files beside SKILL.md are not scanned.
The full file from Gentleman-Programming/Gentleman-Skills at commit c8036a3, republished under its Apache-2.0 licence (© Gentleman-Programming). 24 words, ~1,187 tokens.
.claude/skills/zustand-5/SKILL.md (or your agent's skills folder).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>
);
}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;
}
const useSettingsStore = create<SettingsStore>()(
persist(
(set) => ({
theme: "light",
language: "en",
setTheme: (theme) => set({ theme }),
setLanguage: (language) => set({ language }),
}),
{
name: "settings-storage", // localStorage key
}
)
);// ✅ Select specific fields to prevent unnecessary re-renders
function UserName() {
const name = useUserStore((state) => state.name);
return <span>{name}</span>;
}
// ✅ For multiple fields, use useShallow
import { useShallow } from "zustand/react/shallow";
function UserInfo() {
const { name, email } = useUserStore(
useShallow((state) => ({ name: state.name, email: state.email }))
);
return <div>{name} - {email}</div>;
}
// ❌ AVOID: Selecting entire store (causes re-render on any change)
const store = useUserStore(); // Re-renders on ANY state changeinterface UserStore {
user: User | null;
loading: boolean;
error: string | null;
fetchUser: (id: string) => Promise<void>;
}
const useUserStore = create<UserStore>((set) => ({
user: null,
loading: false,
error: null,
fetchUser: async (id) => {
set({ loading: true, error: null });
try {
const response = await fetch(`/api/users/${id}`);
const user = await response.json();
set({ user, loading: false });
} catch (error) {
set({ error: "Failed to fetch user", loading: false });
}
},
}));// userSlice.ts
interface UserSlice {
user: User | null;
setUser: (user: User) => void;
clearUser: () => void;
}
const createUserSlice = (set): UserSlice => ({
user: null,
setUser: (user) => set({ user }),
clearUser: () => set({ user: null }),
});
// cartSlice.ts
interface CartSlice {
items: CartItem[];
addItem: (item: CartItem) => void;
removeItem: (id: string) => void;
}
const createCartSlice = (set): CartSlice => ({
items: [],
addItem: (item) => set((state) => ({ items: [...state.items, item] })),
removeItem: (id) => set((state) => ({
items: state.items.filter(i => i.id !== id)
})),
});
// store.ts
type Store = UserSlice & CartSlice;
const useStore = create<Store>()((...args) => ({
...createUserSlice(...args),
...createCartSlice(...args),
}));import { create } from "zustand";
import { immer } from "zustand/middleware/immer";
interface TodoStore {
todos: Todo[];
addTodo: (text: string) => void;
toggleTodo: (id: string) => void;
}
const useTodoStore = create<TodoStore>()(
immer((set) => ({
todos: [],
addTodo: (text) => set((state) => {
// Mutate directly with Immer!
state.todos.push({ id: crypto.randomUUID(), text, done: false });
}),
toggleTodo: (id) => set((state) => {
const todo = state.todos.find(t => t.id === id);
if (todo) todo.done = !todo.done;
}),
}))
);import { create } from "zustand";
import { devtools } from "zustand/middleware";
const useStore = create<Store>()(
devtools(
(set) => ({
// store definition
}),
{ name: "MyStore" } // Name in Redux DevTools
)
);// Access store outside components
const { count, increment } = useCounterStore.getState();
increment();
// Subscribe to changes
const unsubscribe = useCounterStore.subscribe(
(state) => console.log("Count changed:", state.count)
);zustand, state management, react, store, persist, middleware
© Gentleman-Programming, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in curated/zustand-5 of Gentleman-Programming/Gentleman-Skills.
Open the folder on GitHubat commit c8036a3
Zustand 5 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 5 this skillGentleman-Programming/Gentleman-Skills | 657 | — | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| React State Managementinvolvex/youtube-music-cli | 456 | 13 repos | ~3k | Automated safety check: Pass | MIT | |
| LobeHub Data Fetching Layerslobehub/lobehub | 83k | — | ~1.7k | Automated safety check: Pass | Custom licence | |
| Create Storeryokun6/ryos | 1.3k | — | ~2.1k | Automated safety check: Pass | AGPL-3.0 | |
| LobeHub Zustand Store Patternslobehub/lobehub | 83k | — | ~1.6k | Automated safety check: Pass | Custom licence | |
| Nextjs15 Initbear2u/my-skills | 933 | — | ~2.4k | Automated safety check: Pass | None |
involvex/youtube-music-cli
Master modern React state management with Redux Toolkit, Zustand, Jotai, and React Query.
lobehub/lobehub
Explains how LobeHub client code fetches data through services, SWR store hooks and cache keys, and when to avoid useEffect fetching or duplicated state.
ryokun6/ryos
Create or modify ryOS Zustand stores following repo conventions — persist middleware, partialize, versioned migrations, the debounced write-behind storage adapter for large slices, and cloud-sync…
lobehub/lobehub
Conventions for Zustand stores in LobeHub: list and detail state shapes, public, internal and dispatch actions, reducers, optimistic updates and naming rules.
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
bropines/xray-config-ui-editor
Development and maintenance of Xray Config UI Editor. An agent skill from bropines/xray-config-ui-editor.
Gentleman-Programming/Gentleman-Skills
Core catalog of 8 critical Elixir/Phoenix anti-patterns covering error handling, separation of concerns, Ecto queries, and testing.
Gentleman-Programming/Gentleman-Skills
Creates new AI agent skills following the Agent Skills spec.
Gentleman-Programming/Gentleman-Skills
Angular architecture: Scope Rule, project structure, file naming, style guide.
Gentleman-Programming/Gentleman-Skills
Angular core patterns: standalone components, signals, inject, control flow, zoneless.
Gentleman-Programming/Gentleman-Skills
Angular forms: Signal Forms (experimental) and Reactive Forms.
Gentleman-Programming/Gentleman-Skills
Angular performance: NgOptimizedImage, @defer, lazy loading, SSR.
Works with
Categories
Zustand 5 state management patterns. An agent skill from Gentleman-Programming/Gentleman-Skills. Zustand 5 is an agent skill from Gentleman-Programming/Gentleman-Skills. Zustand 5 state management patterns.
Zustand 5 fits situations like: tasks that involve State management.
Run `npx skills add Gentleman-Programming/Gentleman-Skills --skill zustand-5 -a claude-code`. Or copy the skill folder (curated/zustand-5 in Gentleman-Programming/Gentleman-Skills) into .claude/skills/zustand-5 in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Gentleman-Programming/Gentleman-Skills --skill zustand-5 -a codex`. Or copy the skill folder (curated/zustand-5 in Gentleman-Programming/Gentleman-Skills) into .agents/skills/zustand-5 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 Gentleman-Programming/Gentleman-Skills --skill zustand-5 -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-5, .gemini/skills/zustand-5, .github/skills/zustand-5 and .opencode/skills/zustand-5 in your project.
SKILL.md names no scripts, command-line tools or credentials: Zustand 5 is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. 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. Review the folder before installing.
Zustand 5 is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.2k tokens (SKILL.md is roughly 4.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Zustand 5: React State Management (involvex/youtube-music-cli, 456 stars), LobeHub Data Fetching Layers (lobehub/lobehub, 83k stars), Create Store (ryokun6/ryos, 1.3k stars) and LobeHub Zustand Store Patterns (lobehub/lobehub, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Gentleman-Programming (a GitHub organization) maintains it in Gentleman-Programming/Gentleman-Skills, which has 657 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on March 28, 2026.
Source: Gentleman-Programming/Gentleman-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.