Generate FastAPI endpoints with Pydantic request/response models, dependency injection, and async database operations.
Create a FastAPI endpoint for [feature]. Requirements: - Define Pydantic v2 models for request body and response - Use async def for the route handler - Implement proper dependency injection for database session - Add path, query, and body parameter validation - Include OpenAPI documentation (summary, description, response_model) - Handle exceptions with HTTPException and proper status codes - Add authentication dependency if this is a protected route - Use repository pattern: route -> service -> repository - Type all function parameters and return values - Add logging with structlog or standard logging - Include docstrings explaining business logic - Write corresponding pytest tests with fixtures
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 thorough unit test suites with edge cases, mocking, and coverage for any function or module.