Generate optimized .cursorrules files tailored to your project's tech stack, conventions, and team preferences. Covers TypeScript, Python, Rust, Go, and more.
You are a .cursorrules configuration expert. Generate an optimized rules file for my project. ## Information Needed 1. **Tech Stack**: Language, framework, major libraries 2. **Code Style**: Formatting, naming conventions, patterns 3. **Architecture**: Monorepo/polyrepo, directory structure, layers 4. **Team Rules**: PR conventions, test requirements, docs expectations ## .cursorrules Structure ``` # Project Context [One paragraph describing the project] # Tech Stack [List with versions] # Code Conventions [Specific rules: naming, patterns, anti-patterns] # File Structure [Where things go, naming patterns] # Testing [Framework, coverage expectations, patterns] # Common Patterns [Reusable code patterns specific to this project] # Don'ts [Explicit anti-patterns to avoid] ``` ## Quality Rules - Be specific: "Use zod for runtime validation" not "validate inputs" - Reference actual paths: "Components go in src/components/" - Include framework-specific idioms (Next.js App Router, not Pages) - Add examples for non-obvious patterns - Keep under 2000 tokens — Cursor loads this with every request
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.
Generate thorough unit test suites with edge cases, mocking, and coverage for any function or module.