by Cursor
AI-first IDE with context-aware code generation, multi-file editing, and custom rules system.
Cursor is an AI-powered code editor (VS Code fork) that integrates LLMs directly into the editing experience. Known for codebase-aware completions, multi-file edits, and natural language coding.
Select code and describe the change:
"Add error handling for the case where the user is not found"
"Refactor this to use async/await instead of .then()"
"Add TypeScript types to all function parameters"
Ask questions about your code:
"How does the authentication flow work in this project?"
"What happens when a payment fails?"
"Find all places where we query users without pagination"
Generate multi-file changes:
"Add a new API endpoint POST /api/comments that:
- Validates input with Zod
- Requires authentication
- Creates a comment linked to a post
- Sends a notification to the post author
- Add the corresponding frontend form component"
@file src/lib/auth.ts — reference specific files
@folder src/api/ — reference entire directories
@codebase — search the full project
@docs Next.js — reference documentation
@web — search the internet
| Practice | Why |
|---|---|
| Be specific about files | "In src/api/users.ts, add..." > "Add a user endpoint" |
| Include constraints | "Using Prisma, no raw SQL" |
| Reference existing patterns | "Follow the same pattern as src/api/posts.ts" |
| Iterate, don't regenerate | Edit the result rather than starting over |
| Use .cursorrules | Project-level instructions for consistent AI behavior |
Create at project root to guide AI behavior:
# Project conventions
- Use TypeScript strict mode
- Prefer named exports over default exports
- Use Prisma for all database operations
- Error handling: return Result type, never throw
- Testing: Vitest with React Testing Library
- Styling: Tailwind CSS, no inline styles
Quick tips from the community about what works with Cursor right now.
Sign in to share a tip.
No tips yet. Add a tip for this model.