Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Create Zustand stores following established patterns with proper TypeScript types and middleware.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 2% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 18% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -4% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 38% | 0% |
Create Zustand stores following established patterns with proper TypeScript types and middleware.
Copy the template from assets/template.ts and replace placeholders:
{{StoreName}} → PascalCase store name (e.g., Project){{description}} → Brief description for JSDoctypescriptimport { create } from 'zustand'; import { subscribeWithSelector } from 'zustand/middleware'; export const useMyStore = create<MyStore>()( subscribeWithSelector((set, get) => ({ // state and actions })) );
typescriptexport interface MyState { items: Item[]; isLoading: boolean; } export interface MyActions { addItem: (item: Item) => void; loadItems: () => Promise<void>; } export type MyStore = MyState & MyActions;
typescript// Good - only re-renders when `items` changes const items = useMyStore((state) => state.items); // Avoid - re-renders on any state change const { items, isLoading } = useMyStore();
typescriptuseMyStore.subscribe( (state) => state.selectedId, (selectedId) => console.log('Selected:', selectedId) );
src/frontend/src/store/src/frontend/src/store/index.tssrc/frontend/src/store/*.test.tsThis skill is applicable to execute the workflow or actions described in the overview.
Other measured skills in the registry, with their headline benchmark lift.