Zustand

From pproenca/dot-skills · View interactive version

Zustand is an AI agent skill from the GitHub repository pproenca/dot-skills. Zustand state management best practices for React applications. Use when writing, reviewing, or refactoring Zustand stores to ensure optimal performance and maintainability. Triggers on tasks involving state management, stores, selectors, re-renders, and Zustand patterns.

How to use this skill

Skill file

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:

Rule Categories by Priority

| Priority | Category | Impact | Prefix |

|----------|----------|--------|--------|

| 1 | Store Architecture | CRITICAL | store- |

| 2 | Selector Optimization | CRITICAL | select- |

| 3 | Re-render Prevention | HIGH | render- |

| 4 | State Updates | MEDIUM-HIGH | update- |

| 5 | Middleware Configuration | MEDIUM | mw- |

| 6 | SSR and Hydration | MEDIUM | ssr- |

| 7 | TypeScript Patterns | LOW-MEDIUM | ts- |

| 8 | Advanced Patterns | LOW | adv- |

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

| File | Description |

|------|-------------|

| references/_sections.md | Category definitions and ordering |

| assets/templates/_template.md | Template for new rules |

| metadata.json | Version and reference information |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.