Microsoft/zustand-store-ts — Agent Skills | officialskills.sh
Back to skills

zustand-store-ts

officialdevelopment

Generates Zustand stores with TypeScript types, subscribeWithSelector middleware, and a clear split between state interfaces and action interfaces.

Setup & Installation

npx skills add https://github.com/microsoft/skills --skill zustand-store-ts
or paste the link and ask your coding assistant to install it
https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-typescript/skills/zustand-store-ts
View on GitHub

What This Skill Does

Generates Zustand stores with TypeScript types, subscribeWithSelector middleware, and a clear split between state interfaces and action interfaces. Covers store creation, selector patterns, and subscribing to state changes outside React components.

Gets the subscribeWithSelector boilerplate and TypeScript interface separation right on the first try, skipping the trial-and-error of getting middleware generics and selector patterns to play well together.

When to use it

  • Setting up a typed global store with subscribeWithSelector middleware
  • Splitting state and action types into separate TypeScript interfaces
  • Writing individual selectors to avoid unnecessary re-renders
  • Subscribing to a specific state slice outside of React components
  • Scaffolding a new store file with JSDoc and index export wiring