zustand-patterns

zustand-patterns is a skill for Claude Code from yonatangross/orchestkit. It costs 59 tokens per session (1,588 once invoked), scanned A, original, MIT.

A reference for managing shared application state with Zustand 5.x in React and TypeScript. Shared state is data used by multiple interface components, such as a logged-in user, settings, or a shopping basket.

In plain words
What is it for?
Use it when designing Zustand stores, selectors, slices, persistence, Immer updates, logging, or developer-tool integration in a React application.
Why use it?
It helps avoid passing the same data through many component layers and explains patterns for splitting stores, selecting data, persisting it, and adding middleware.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; mentions Claude Code.

Part of the ork plugin — 107 skills, 36 commands, 36 agents, 32 hooks shipped together

Good fit Use it when designing Zustand stores, selectors, slices, persistence, Immer updates, logging, or developer-tool integration in a React application.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yonatangross/orchestkit/zustand-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add yonatangross/orchestkit --skill zustand-patterns
Clone the repo
git clone --depth 1 https://github.com/yonatangross/orchestkit

Made for: Claude Code.

Or install ork, the plugin that ships this one along with the rest of its 107 skills, 36 commands, 36 agents, 32 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for zustand-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/yonatangross/orchestkit/zustand-patterns/github.svg)](https://agentmods.dev/skills/yonatangross/orchestkit/zustand-patterns)
Your own site
<a href="https://agentmods.dev/skills/yonatangross/orchestkit/zustand-patterns"><img src="https://agentmods.dev/badge/skills/yonatangross/orchestkit/zustand-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for zustand-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/yonatangross/orchestkit/zustand-patterns"><img src="https://agentmods.dev/badge/skills/yonatangross/orchestkit/zustand-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,588 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 29 May 2026
  • Snyk pass 29 May 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 20
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.01588
Opus 5 $0.00030 $0.00794
Sonnet 5 $0.00012 $0.00318
Haiku 4.5 $0.00006 $0.00159

Measured 3d ago against content hash aac1ff564db4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

zustand-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/store-template.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ork/skills/zustand-patterns/SKILL.md · 137 lines

How it starts

The opening of the file, as written. The whole thing — 137 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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/pmndrs/zustand/blob/main/docs/learn/guides/testing.md
Server-state ownership (use TanStack Query, not Zustand) https://tanstack.com/query/latest/docs/framework/react/guides/does-this-replace-client-state

Read the full file on GitHub · 137 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago Changed aac1ff564db4
  2. 6d ago First seen · 137 lines · 59 tokens per session scan A 5e798e210315

Subscribe to this mod's changes

zustand-patterns is a skill published in the GitHub repository yonatangross/orchestkit (229 stars, last pushed today), licensed MIT. It adds 59 tokens to every session and 1,588 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

zustand-docs

Zustand — small, fast, scalable state management for React. Store creation, hooks, middleware, TypeScript.

pledgeandgrow/pledge-skills · 29 tokens

redux-docs

Redux 5.x + Redux Toolkit 2.x — store, reducers, actions, middleware, slices, async thunks, TypeScript, testing.

pledgeandgrow/pledge-skills · 34 tokens

nextjs-state-management

Apply best practices for managing URL, server, and client state in Next.js applications. Use when choosing between URL params, SWR/TanStack Query, Zustand, or Context for state, or when fixing hydration mismatches from localStorage.

FilippoDeSilva/skills · 53 tokens

zustand-store-ts

Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.

microsoft/skills · 42 tokens

airflow-plugins

Builds Airflow 3.1+ plugins that embed FastAPI apps, custom UI pages, React components, middleware, macros, and operator links directly into the Airflow UI. Use when building anything custom inside Airflow 3.1+ that involves Python and a browser-facing interface - creating an Airflow plugin, adding a custom UI page or…

astronomer/agents · 147 tokens

opengeni-sites

Build, inspect, edit, validate, and publish OpenGeni Sites as ordinary Bun + React source projects compiled to one self-contained HTML artifact. Use for interactive pages, dashboards, visualizations, workflows, and focused apps that may call workspace tools through the typed Site bridge.

Cloudgeni-ai/opengeni · 60 tokens