zustand-store-patterns
Create or modify Zustand v5 stores in the MultimateAi codebase.
Skill by NarihitoM
Chalk Labs
Need help deploying zustand-store-patterns?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/narihitom-zustand-store-patterns
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/zustand-store-patterns
What's inside
- Skill name
zustand-store-patterns- Description
- Create or modify Zustand v5 stores in the MultimateAi codebase. Use when: building a new feature store, adding state to an existing store, understanding the common store shape, or fixing store-related bugs.
- License
- MIT
- Instructions
- 178 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Zustand Store Patterns
## When to Use
- Adding a new feature that needs client state
- Understanding the standard store fields
- Debugging store updates that don't trigger re-renders
- Adding provider/model selector state
## Common Store Shape
Every feature store follows this interface pattern:
```typescript
interface FeatureState {
// Chat state
provider: string;
model: string;
input: string;
sending: boolean;
sessionmessage: any[];
pendingImages: any[];
// Loading & pagination
loadingfetch: boolean;
loadingerror: boolean;
nextCursor: string | null;
hasMore: boolean;
// Image lightbox
lightboxOpen: boolean;
lightboxImage: string | null;
// UI state
copiedIndex: number | null;
pendingApproval: ToolApproval | null;
// Refs (stored in state for React compat)
pendingApprovalRef: React.MutableRefObject<any>;
threadIdRef: React.MutableRefObject<string>;
topSentinelRef: React.MutableRefObject<HTMLDivElement | null>;
scrollContainerRef: React.MutableRefObject<HTMLDivElement | null>;
abortControllerRef: React.MutableRefObject<AbortController | null>;
// Setters
setProvider: (provider: string) => void;
setModel: (model: string) => void;
setInput: (input: string) => void;
setSending: (sending: boolean) => void;
updateSessionMessages: (updater: (prev: any[]) => any[]) => void;
resetSending: () => void;
scrollToBottom: () => void;
}
```
## Store Template
```typescript
import { create } from "zustand";
interface FeatureStore {
// === State ===
provider: string;
model: string;
input: string;
sending: boolean;
sessionmessage: any[];
loadingfetch: boolean;
loadingerror: boolean;
// === Setters ===
setProvider: (provider: string) => void;
setModel: (model: string) => void;
setInput: (input: string) => void;
setSending: (sending: boolean) => void;
updateSessionMessages: (updater: (prev: any[]) => any[]) => void;
}
export const featurestore = create<FeatureStore>((set) => ({
// Initial state
provider: "",
model: "",
input: "",
sending: false,
sessionmessage: [],
loadingfetch: false,
loadingerror: false,
// Setters
setProvider: (provider) => set({ provider, model: "" }), // Reset model on provider change
setModel: (model) => set({ model }),
setInput: (input) => set({ input }),
setSending: (sending) => set({ sending }),
updateSessionMessages: (updater) =>
set((state) => ({ sessionmessage: updater(state.sessionmessage) })),
}));
```
## Critical Patterns
### 1. `setProvider` Resets the Model
```typescript
setProvider: (provider) => set({ provider, model: "" });
```
When the user switches providers, the selected model **must** reset to empty. This prevents sending a request with a model that doesn't exist on the new provider.
### 2. `updateSessionMessages` Pattern
Never mutate `sessionmessage` directly:
```typescript
// ✅ Correct
store.updateSessionMessages((prev) => [...prev, newMessage]);
// ❌ Wrong — won't trigger re-render
store.sessionmessage.push(newMessage);
```From NarihitoM/MultimateAi, MIT.
More from NarihitoM/MultimateAi
- 0.538score
agent-workflow-builder
NarihitoM
Build or debug multi-agent workflows in the MultimateAi desktop app.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
shadcn-ui-component
NarihitoM
Create or modify shadcn/ui components in the MultimateAi codebase (base-nova style, @base-ui/react primitives, Tailwind v4).
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
streaming-chat
NarihitoM
Implement or debug NDJSON streaming chat for service integrations in MultimateAi.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
tailwind-theming
NarihitoM
Work with Tailwind CSS v4 theming in the MultimateAi codebase.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
tanstack-query-patterns
NarihitoM
Use TanStack Query v5 patterns in the MultimateAi codebase.
SkillCFreshness: C★ 9Claude Code +9 - 0.289score
electron-agent-dev
NarihitoM
No description from the publisher yet.
SkillCFreshness: C★ 9Claude Code +9
Signals
- Stars
- 9
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Jul 23, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/NarihitoM/MultimateAi
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from NarihitoM
- 0.538score
agent-workflow-builder
NarihitoM
Build or debug multi-agent workflows in the MultimateAi desktop app.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
shadcn-ui-component
NarihitoM
Create or modify shadcn/ui components in the MultimateAi codebase (base-nova style, @base-ui/react primitives, Tailwind v4).
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
streaming-chat
NarihitoM
Implement or debug NDJSON streaming chat for service integrations in MultimateAi.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
tailwind-theming
NarihitoM
Work with Tailwind CSS v4 theming in the MultimateAi codebase.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
tanstack-query-patterns
NarihitoM
Use TanStack Query v5 patterns in the MultimateAi codebase.
SkillCFreshness: C★ 9Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get zustand-store-patterns running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
zustand-store-patterns skill. Agent Mart. https://agentmart.dev/skills/narihitom-zustand-store-patterns (last updated 2026-10-24)