Generate a type-safe API client layer with request/response types, error handling, and retry logic.
Create a type-safe API client for [API_name]. Requirements: - Define TypeScript interfaces for all request and response shapes - Create a base client class/function with: - Base URL configuration from environment variables - Default headers (Content-Type, Authorization) - Request/response interceptors - Automatic JSON parsing - Timeout configuration - Retry logic with exponential backoff (3 attempts) - Create individual endpoint methods (getUser, createOrder, etc.) - Handle HTTP errors with typed error responses - Support request cancellation with AbortController - Add request/response logging in development mode - Export a singleton instance and the types - Do NOT add new HTTP client dependencies — use fetch() - Include usage examples as JSDoc comments
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.