Generate a state management store for the configured library
Generates a new Zustand store following project conventions. Stores hold UI state ONLY -- never server data or database records.
/new-store budget # stores/useBudgetStore.ts
/new-store transactionFilter # stores/useTransactionFilterStore.ts
/new-store app # stores/useAppStore.ts
| Argument | Required | Description |
|----------|----------|-------------|
| name | Yes | Store name in camelCase (e.g., budget, transactionFilter) |
Place the store at:
stores/use<PascalCaseName>Store.ts
Create the store with:
initialState object (extracted for reset)create<State>()((set) => ({...})) patternreset() action that restores initial stateSee references/store-examples.md for templates.
Create a test at:
__tests__/stores/use<PascalCaseName>Store.test.ts
With tests for:
beforeEachnpx tsc --noEmit
A Zustand store MUST only contain transient UI state. Ask yourself: "Does this data come from an API or database?" If yes, it belongs in React Query, not Zustand.
Acceptable state:
NEVER in Zustand:
initialState for the reset() actionreset() actionas const for literal types in initial stateSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer