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.
npx skills add pledgeandgrow/pledge-skills --skill zustandgit clone --depth 1 https://github.com/pledgeandgrow/pledge-skillsWrote 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.
[](https://agentmods.dev/skills/pledgeandgrow/pledge-skills/zustand)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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 API —
create()returns a hook you call with selectors - Shallow merge by default —
set()shallow-merges state updates - Middleware support —
persist,devtools,immer,redux,combine,subscribeWithSelector - Vanilla stores —
createStore()for framework-agnostic state management - TypeScript-first — curried
create<T>()(...)pattern for full type inference - Performance — selector-based subscriptions minimize re-renders;
useShallowfor 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 })))
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.
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.
- 8d ago First seen · 107 lines · 29 tokens per session scan A 33da4c32e842
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.
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.
fp-react
Practical patterns for using fp-ts with React - hooks, state, forms, data fetching. Works with React 18/19, Next.js 14/15.
frontend
Modern frontend development with React, Vue, and web technologies.
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.
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.
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…