Create type-safe state management stores with actions, selectors, persistence, and devtools integration.
Create a state management store for [feature] using [Zustand/Jotai]. Requirements: For Zustand: - Define state interface with all state properties typed - Create actions as methods on the store (not separate functions) - Use immer middleware for immutable state updates - Add persist middleware for localStorage persistence (selective) - Add devtools middleware for Redux DevTools integration - Create custom selector hooks (useUserName, useCartItems, not raw useStore) - Handle async actions (API calls) with loading/error states - Add computed/derived values using selectors - Reset store function for testing and logout - Split large stores into slices For Jotai: - Define base atoms with TypeScript types - Create derived atoms for computed values - Use atomWithStorage for persistence - Create atom families for parameterized atoms - Group related atoms in a single file - Provider setup for testing isolation
Generate optimized .cursorrules files tailored to your project's tech stack, conventions, and team preferences. Covers TypeScript, Python, Rust, Go, and more.
Leverage Cursor's Agent mode to build complete features end-to-end. Handles file creation, terminal commands, dependency installation, and multi-file edits in one flow.
Generate complete React components with TypeScript types, props interface, stories, and unit tests in one prompt.
Generate robust Next.js API routes with Zod validation, error handling, rate limiting, and TypeScript types.
Design database tables with proper types, constraints, indexes, and migration files for PostgreSQL/Supabase.
Generate FastAPI endpoints with Pydantic request/response models, dependency injection, and async database operations.