zustand-docs

zustand-docs is a skill for Claude Code, Codex from pledgeandgrow/pledge-skills. It costs 29 tokens per session (1,006 once invoked), scanned A, original, MIT.

A small React library for keeping shared application state—data that multiple components need—in a central store accessed through hooks.

In plain words
What is it for?
It is for managing React state, selecting only the data a component needs, persisting stores, connecting developer tools, and using TypeScript.
Why use it?
It lets React components share and update state with less setup code and without wrapping the application in provider components.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for managing React state, selecting only the data a component needs, persisting stores, connecting developer tools, and using TypeScript.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pledgeandgrow/pledge-skills/zustand
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 pledgeandgrow/pledge-skills --skill zustand
Clone the repo
git clone --depth 1 https://github.com/pledgeandgrow/pledge-skills

Made for: Claude Code, Codex.

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-docs

README.md
[![agentmods](https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/zustand/github.svg)](https://agentmods.dev/skills/pledgeandgrow/pledge-skills/zustand)
Your own site
<a href="https://agentmods.dev/skills/pledgeandgrow/pledge-skills/zustand"><img src="https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/zustand/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-docs

Your own site · 80×15
<a href="https://agentmods.dev/skills/pledgeandgrow/pledge-skills/zustand"><img src="https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/zustand.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,006 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.
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.00029 $0.01006
Opus 5 $0.00015 $0.00503
Sonnet 5 $0.00006 $0.00201
Haiku 4.5 $0.00003 $0.00101

Measured 8d ago against content hash 33da4c32e842, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

zustand-docs 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 8d ago.

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.

skills/zustand/SKILL.md · 107 lines

How it starts

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

Zustand — React State Management

Overview

Zustand is a small, fast, and scalable state management library for React. It uses a hook-based API with no boilerplate, no providers, and no context. State lives in a store created via create(), and components subscribe to slices of that store using selector functions.

Key Features

  • No providers needed — stores are standalone hooks, no <Provider> wrapper required
  • Hook-based APIcreate() returns a hook you call with selectors
  • Shallow merge by defaultset() shallow-merges state updates
  • Middleware supportpersist, devtools, immer, redux, combine, subscribeWithSelector
  • Vanilla storescreateStore() for framework-agnostic state management
  • TypeScript-first — curried create<T>()(...) pattern for full type inference
  • Performance — selector-based subscriptions minimize re-renders; useShallow for shallow comparison
  • Next.js / SSR compatible — per-request store creation with context providers

Quick Reference

Create a store

import { create } from 'zustand'

const useStore = create((set) => ({
  count: 0,
  increment: () => set((state) => ({ count: state.count + 1 })),
}))

Use in a component

function Counter() {
  const count = useStore((state) => state.count)
  const increment = useStore((state) => state.increment)
  return <button onClick={increment}>{count}</button>
}

With TypeScript (curried form)

interface BearState {
  bears: number
  increase: (by: number) => void
}
const useBearStore = create<BearState>()((set) => ({
  bears: 0,
  increase: (by) => set((state) => ({ bears: state.bears + by })),
}))

With persist middleware

import { create } from 'zustand'
import { persist } from 'zustand/middleware'

const useStore = create()(persist(
  (set) => ({ count: 0, inc: () => set((s) => ({ count: s.count + 1 })) }),
  { name: 'my-storage' },
))

Prevent unnecessary re-renders with useShallow

import { useShallow } from 'zustand/react/shallow'

const { count, text } = useStore(useShallow((state) => ({ count: state.count, text: state.text })))

Read the full file on GitHub · 107 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 107 lines · 29 tokens per session scan A 33da4c32e842

Subscribe to this mod's changes

zustand-docs is a skill published in the GitHub repository pledgeandgrow/pledge-skills (10 stars, last pushed 1mo ago), licensed MIT. It adds 29 tokens to every session and 1,006 once invoked, about $0.0001 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-03.

Related

Other skills, from other repositories

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.

yonatangross/orchestkit · 59 tokens

fp-react

Practical patterns for using fp-ts with React - hooks, state, forms, data fetching. Works with React 18/19, Next.js 14/15.

tmolavi/mcp-agent-skills-hub · 37 tokens

frontend

Modern frontend development with React, Vue, and web technologies.

miles990/claude-software-skills · 13 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

Functional Programming in React

Practical patterns for using fp-ts with React - hooks, state, forms, data fetching. Works with React 18/19, Next.js 14/15.

whatiskadudoing/fp-ts-skills · 39 tokens

fast-typescript-check

Keep www-sacred's TypeScript fast to type-check and fast to run. Use when touching the ASCII/canvas animation components (the only real per-frame code here), tightening type-check wall-clock, or auditing a change for runtime or compiler regressions. Scoped to this repo — a React 19 / Next.js 16 component library plus…

internet-development/www-sacred · 84 tokens