mcpField
Z
zustand

zustand

github.com/pproencaDevelopment221451 installsUpdated 11w ago
Repository

About zustand

A reference skill for performance and architecture practices in Zustand state management for React. Its 43 rules cover store design, selectors, updates, middleware, SSR, TypeScript, and advanced patterns.

Key features

  1. 0143 rules across eight categories
  2. 02Store architecture guidance
  3. 03Selector and re-render optimization
  4. 04State update and middleware practices
  5. 05SSR and hydration guidance
  6. 06TypeScript and advanced patterns

Use cases

  1. 01Designing Zustand stores for a React app
  2. 02Reducing unnecessary component re-renders
  3. 03Configuring persistence and middleware
  4. 04Reviewing SSR and hydration state patterns

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pproenca/dot-skills --skill zustand

After installing, type/zustandin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

metadata.json
assets/templates/
_template.md
references/
_sections.md
adv-computed-getters.md
adv-context-stores.md
adv-third-party-integration.md
adv-transient-updates.md
mw-combine-order.md
mw-devtools-actions.md
mw-immer-nested.md
mw-persist-migration.md
mw-persist-partialize.md
mw-slice-middleware.md
render-avoid-object-returns.md
render-equality-fn.md
render-memo-children.md
render-split-components.md
render-subscribe-external.md
render-use-shallow.md
select-always-use.md
select-atomic-picks.md
select-auto-generate.md
select-avoid-inline.md
select-custom-hooks.md
select-memoize-computed.md
select-stable-returns.md
ssr-check-window.md
ssr-hydration-hook.md
ssr-manual-rehydrate.md
ssr-skip-hydration.md

Details

From the project README

Community Zustand Best Practices

Comprehensive performance and architecture guide for Zustand state management in React applications. Contains 43 rules across 8 categories, prioritized by impact from critical (store architecture, selector optimization) to incremental (advanced patterns).

When to Apply

Reference these guidelines when:

  • Creating new Zustand stores
  • Optimizing re-render performance with selectors
  • Implementing persistence or middleware
  • Integrating Zustand with SSR/Next.js
  • Reviewing code for state management patterns

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Store ArchitectureCRITICALstore-
2Selector OptimizationCRITICALselect-
3Re-render PreventionHIGHrender-
4State UpdatesMEDIUM-HIGHupdate-
5Middleware ConfigurationMEDIUMmw-
6SSR and HydrationMEDIUMssr-
7TypeScript PatternsLOW-MEDIUMts-
8Advanced PatternsLOWadv-

Quick Reference

1. Store Architecture (CRITICAL)
2. Selector Optimization (CRITICAL)
3. Re-render Prevention (HIGH)
4. State Updates (MEDIUM-HIGH)
5. Middleware Configuration (MEDIUM)
6. SSR and Hydration (MEDIUM)
7. TypeScript Patterns (LOW-MEDIUM)
8. Advanced Patterns (LOW)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information

Comments

Markdown supported