The Cursor AI Editor Playbook
📋 Contents
Cursor is the first AI editor where the AI actually feels like a collaborator rather than an autocomplete widget. But there's a gap between "installed Cursor" and "getting 2x-3x productivity" that most tutorials don't bridge. This is that bridge.
Setup for Maximum Productivity
The default Cursor configuration is fine. These settings are better:
Model Selection
Cursor gives you access to Claude, GPT-4o, and Gemini models. For most coding tasks:
- Claude 3.7 Sonnet — best for complex refactoring, multi-file changes, architectural discussions. More likely to ask clarifying questions instead of guessing.
- GPT-4o — fast, good for quick questions, debugging snippets, and when you need a quick answer more than a thoughtful one.
- claude-3-5-haiku / gpt-4o-mini — for Tab completion in background. Faster, cheaper, and for autocomplete you want speed over depth.
The .cursorrules File (Now Cursor Rules)
This is the single highest-leverage setup step. Create a file at your project root called .cursorrules (or use Cursor Rules in Settings for newer versions). This gets injected as context into every AI interaction in that project.
Example for a TypeScript/React project:
# Project: [Your App Name]
## Stack
- TypeScript 5.x, React 18, Next.js 14 App Router
- Tailwind CSS, Shadcn UI components
- PostgreSQL via Prisma ORM
- Zod for validation
## Coding conventions
- Always use TypeScript strict mode — no `any`
- Prefer named exports over default exports
- Error handling: use Result pattern, never throw from async functions
- State: Zustand for global state, React Query for server state
- Testing: Vitest + Testing Library, aim for 80% coverage
## Avoid
- Do NOT use class components
- Do NOT use any deprecated React patterns (useLayoutEffect for simple cases, etc.)
- Do NOT add console.log (use proper logging with our Logger utility)
- Do NOT create inline styles — use Tailwind classes
## File structure
- Components in /components/{feature}/{ComponentName}.tsx
- Hooks in /hooks/use{Name}.ts
- API routes follow REST conventions in /app/api/
A well-written rules file means you stop correcting the AI on the same things repeatedly. It's a one-time 30-minute investment that pays back every day.
Key Settings to Change
- Cursor Settings → Features → Tab: Enable "Auto-import" so Tab completion also handles import statements automatically.
- Privacy Mode: Enable if you're working on proprietary code. When enabled, code is never stored by model providers or used for training. Required for most enterprise codebases.
- Long context: Enable "Include conversation history in context" for Chat — this gives the AI memory of your discussion within a session.
- Editor font: Use a coding font with ligatures (Fira Code, JetBrains Mono) — it makes the AI-generated code easier to read quickly.
Tab vs Chat vs Composer: What Each Is Actually For
These three features are not interchangeable. Using the wrong one wastes time.
| Feature | Shortcut | Best For | Limitations |
|---|---|---|---|
| Tab Completion | Tab | Line/block completion, finishing your thought, autocomplete as you type | Single location only; no cross-file changes |
| Chat (Ctrl+L) | Ctrl+L | Questions, explanations, debugging help, reviewing selected code | Doesn't make changes — you apply suggestions manually |
| Composer (Ctrl+I) | Ctrl+I | Making actual code changes — inline or across files, generating new files | Requires more precise instructions; slow for quick questions |
| Agent Mode | Ctrl+I → Agent | Multi-step tasks, running tests, reading errors and fixing them autonomously | Can go off-rails on ambiguous tasks; review diffs carefully |
Chat: When to Use It
Select code → Ctrl+L → ask a question. The selected code appears as context. Chat is for understanding, not changing:
- "Explain what this function does in plain English"
- "What's the time complexity of this algorithm?"
- "What are the potential race conditions here?"
- "How would a senior engineer refactor this?"
Composer: The Real Power
Composer (Ctrl+I) is where Cursor pulls ahead of every other AI coding tool. Key patterns:
Multi-file refactoring:
Refactor the authentication system to use JWT instead of sessions.
The relevant files are @auth/session.ts, @middleware/auth.ts,
and @api/login.ts. Update all files consistently and maintain
backward compatibility for 30 days with a migration flag.
New feature from description:
Create a rate limiting middleware for our Express API.
Requirements:
- 100 requests per minute per IP (sliding window)
- Redis-backed (we have ioredis configured in @lib/redis.ts)
- Return 429 with Retry-After header
- Log rate limit hits to our existing Logger
- Skip rate limiting for /health and /metrics routes
Agent Mode
Agent mode is Cursor running autonomously: it can read error messages, run terminal commands, fix failures, and iterate. Use it for:
- Setting up boilerplate ("create a new Next.js page with this data fetching pattern")
- Fixing failing tests (agent reads the test output and iterates)
- Running migrations and fixing schema mismatches
Don't use Agent for anything in production code without human review. It's a power tool, not an autopilot.
Workflow: React Project from Scratch with Cursor
Here's an actual workflow for starting a new React/Next.js project:
- Scaffold with CLI, not AI:
npx create-next-app@latest— don't use Cursor for this. CLI scaffolding is deterministic; AI scaffolding varies. - Write your .cursorrules immediately — before any coding. This shapes everything that follows.
- Architecture conversation in Chat: Describe what you're building and ask "What are the main architectural decisions I should make upfront for this type of app?" This surfaces issues you haven't thought of yet.
- Component generation via Composer: "Create a ProductCard component based on this type definition: [paste type]. Follow our Shadcn pattern from @components/ui/Card.tsx."
- Test generation after each component: Select the component → Chat → "Generate Vitest tests for this component. Include interaction tests with Testing Library."
- Refactoring with context: When you find a pattern you're repeating, use Composer with @codebase: "I'm writing this same error handling pattern in multiple places. Create a custom hook that abstracts it and update the 3 files that need it."
Migrating from VS Code
Cursor is a VS Code fork, so migration is nearly zero effort.
What Transfers Automatically
- Themes and color schemes (exact same rendering engine)
- Keybindings (Cursor adds its own on top, no conflicts by default)
- Settings (settings.json is compatible)
- Snippets
- Tasks and launch configurations
What Requires Manual Steps
- Extensions: Most VS Code extensions work in Cursor, but they need reinstalling. Some extensions from the VS Code Marketplace need to be installed via VSIX if they're not in Cursor's marketplace. In practice, all major extensions (Prettier, ESLint, GitLens, Docker, REST Client) are available.
- GitHub Copilot extension: If you had Copilot, uninstall it in Cursor — it conflicts with Cursor's native AI features.
- Remote Development: VS Code Remote (SSH, Dev Containers) works in Cursor but may need the extension reinstalled.
The Import Flow
First launch → "Import from VS Code" → Cursor reads your VS Code config automatically. It takes about 30 seconds. After that, the only real difference you'll notice is the new AI sidebar.
Working with Large Codebases
This is where most Cursor guides fall apart. Context management is the skill that separates productive Cursor users from frustrated ones.
Understanding Context Windows
Every AI call has a token limit. When you use @codebase, Cursor does semantic search to find relevant files — it doesn't send your entire codebase. The quality of that retrieval depends on how well your question matches the semantics of the code.
Precision Context Beats Broad Context
Instead of: "Fix the bug in the payment system" (which forces @codebase to guess)
Use: "@payments/checkout.ts @types/payment.ts — there's a race condition when two users checkout simultaneously with the same coupon code. The relevant function is `validateCoupon` on line 87."
The more specific your context pins, the better the output. Reference specific files with @filename, specific functions with @symbol, and specific line ranges when relevant.
The Context Hierarchy
@filename— pin a specific file. Best for targeted changes.@symbol— pin a specific function/class/type. Best for focused debugging.@codebase— semantic search across your indexed codebase. Best for architecture questions.@web— search the web. Use for library docs, not your code questions.@docs— index-specific documentation. Set up for your main libraries once.
Project-Level Architecture Context
Create an ARCHITECTURE.md in your project root and add it to your Cursor Rules or reference it regularly with @ARCHITECTURE.md. Put the high-level system design, data flow, key decisions, and their rationale. When the AI needs to make architectural decisions, this prevents it from suggesting approaches that conflict with your existing system.
Cursor vs GitHub Copilot: Real Developer Take
| Capability | Cursor | GitHub Copilot |
|---|---|---|
| Tab completion quality | Excellent | Excellent (comparable) |
| Multi-file edits | ✅ Composer handles this natively | ❌ Chat only; you apply changes manually |
| Context precision | ✅ @file, @symbol, @codebase | Limited — relies on open files |
| Model choice | ✅ Claude, GPT-4o, Gemini | OpenAI models only |
| GitHub integration | Manual | ✅ Native PR review, issue context |
| Agent/autonomous mode | ✅ Agent mode (strong) | ✅ Agent mode (improving) |
| Price | $20/mo (Pro) | $10/mo (Individual), $19/user/mo (Business) |
| VS Code feel | Identical (it's a fork) | Extension inside VS Code |
| Privacy mode | ✅ Built-in toggle | ✅ Available (Business+) |
Choose Cursor if: You do heavy refactoring, work across many files simultaneously, want model choice, or spend significant time on architectural changes. The Composer is genuinely in a different league for multi-file work.
Choose Copilot if: Your team already uses GitHub deeply (PRs, issues, Actions), you want the lowest cost per seat, or you need a lighter footprint (Copilot as extension vs. Cursor as full editor).
Cost Analysis: When Free Isn't Enough
| Plan | Price | Limits | Who Needs It |
|---|---|---|---|
| Free (Hobby) | $0 | 2,000 completions/mo, 50 slow premium requests | Trying it out, light use. You'll hit the limit fast if Cursor is your daily driver. |
| Pro | $20/mo | Unlimited completions, 500 fast premium requests, unlimited slow requests | Any developer using Cursor as primary editor. This is the right tier for individuals. |
| Business | $40/user/mo | All Pro + centralized billing, team management, enforced privacy mode | Teams with compliance requirements or companies that need to manage seat licenses. |
The free tier is genuinely limited for daily use — 2,000 Tab completions sounds like a lot, but a 4-hour coding session can burn through several hundred. Pro at $20/mo is the obvious tier for working developers. At $20 vs. the $10 you'd spend on Copilot, the question is whether the Composer's multi-file capabilities are worth $10/mo to you. For most developers who try them both: yes.