Cursor, Set Up Properly: Rules, Codebase Indexing, and Agent Mode
9 October 2026 · Updated 28 November 2026 · 12 min read · by Yang Kai
A practical Cursor setup guide: rules files that actually constrain the agent, how codebase indexing works, agent mode habits, and the new X Subscription pricing explained plainly (checked November 2026).
Template inside: Cursor project rules starter template
Contents
- Cursor at a glance
- The mental model: editor first, agent second
- What you need before you start
- Step 1: Set Privacy Mode deliberately
- Step 2: Let the index finish, then prune it
- Step 3: Write rules that actually constrain the agent
- A starter rules file
- Step 4: Agent habits that keep diffs reviewable
- Pricing, without the fog
- Common mistakes
- How we researched this
- The verdict
Most people install Cursor, skip the setup, and judge it inside a week. That judgement is usually unfair in both directions: the editor feels magical on autocomplete and disappointing as an agent, because the two parts that make the agent good — a rules file and a finished index — were never done.
This guide covers the four setup jobs that decide what Cursor is worth to you: rules that constrain the agent, codebase indexing and privacy, agent-mode habits that keep diffs reviewable, and pricing, which changed shape in late 2026 and confuses almost everyone.
Everything below is built from Cursor’s official documentation and pricing page, checked November 2026. It is desk research, not a hands-on review, and the “How we researched this” note at the end says exactly what that means.
Cursor at a glance
| Part | What it does | The setup that matters |
|---|---|---|
| Tab | Predictive multi-line autocomplete | Nothing — it works out of the box |
| Chat | Questions and scoped edits with @ references |
Pin files deliberately instead of letting retrieval guess |
| Agent | Multi-file changes, terminal commands, plans | Rules file + plan review before execution |
| Indexing | Embeddings of your codebase for retrieval | Let it finish; exclude noise with .cursorignore |
| Rules | Standing instructions in .cursor/rules/ |
Write specific, checkable conventions (template below) |
| Pricing | Subscription pool + third-party models at API price | Know which models draw on the pool and which bill separately |
The mental model: editor first, agent second
Cursor is a fork of VS Code, so your extensions, keybindings and settings import over, and the editing surface is familiar on day one. The AI is layered on top in three systems that suit three different sizes of job.
Tab is the autocomplete: it suggests multi-line edits based on your recent changes, not just the current line. It is the cheapest and most-used part of the product.
Chat answers questions and makes scoped edits. Its quality depends on context you pin with @ references — specific files, folders, documentation or web pages — rather than whatever retrieval finds on its own.
Agent mode (the evolution of Composer) takes a goal, plans multi-file changes, runs terminal commands and presents diffs to accept or reject. Most disappointment with Cursor comes from using Chat for work Agent exists for, or Agent for a two-line fix Tab would have finished first.
What you need before you start
- A Cursor account and the editor installed; the free tier is enough to follow this setup.
- A real project under Git, so every agent run can be reviewed and reverted as a diff.
- Your VS Code settings imported (Cursor offers this on first launch) if you are migrating.
- About 30–45 minutes: five for privacy, ten for the index, the rest for a first rules file.
Step 1: Set Privacy Mode deliberately
Cursor’s index and AI features process your code through Cursor’s services and model providers. Privacy Mode is the setting that controls this: with it enabled, Cursor states that your code is not stored or used for training, by Cursor or by its model providers.
The setting takes ten seconds and is easy to leave on a default you never chose. On client or proprietary work, that choice should be deliberate, not inherited. Team admins can enforce it across an organisation on team plans.
While you are in settings, note the usage dashboard’s location. You will want it in week one, when the pricing section below starts to matter.
Step 2: Let the index finish, then prune it
When you open a project, Cursor builds an index of the codebase — chunked, embedded representations of your files, stored so the agent can retrieve relevant code from files you never opened.
This is the real difference from a plain chat assistant. Ask “where is the retry logic for uploads?” and it can answer from a file you forgot existed.
Three practical notes:
- Indexing respects
.gitignore. A separate.cursorignorefile excludes generated code, vendored dependencies and large fixtures that would otherwise pollute retrieval. - The first index on a large repo takes minutes, not seconds. Let it finish before judging answer quality; early answers are working from a partial map.
- Retrieval is a starting point, not a guarantee. On precision work, pin the files yourself with
@fileand@folder.
The same retrieval idea powers MCP-connected workflows; see what MCP adds to an editor workflow if you plan to wire external tools in.
Step 3: Write rules that actually constrain the agent
Cursor reads project rules from the .cursor/rules/ directory as .mdc files — Markdown with a small frontmatter block that controls when each rule applies.
| Rule type | Set by | Applies when |
|---|---|---|
| Always Apply | alwaysApply: true |
Every request, unconditionally |
| Apply Intelligently | A description in frontmatter |
The agent judges the rule relevant |
| Apply to Specific Files | globs patterns |
Files matching the pattern are in context |
| Apply Manually | No frontmatter trigger | You @-mention the rule by name |
The legacy single .cursorrules file at the repo root still works, but the directory format is the one to build on. Scoped rules cost less context and contradict each other less: your API conventions only load for API files, your test style only for tests. Cursor also reads an AGENTS.md file if your repo carries one for other tools.
Write rules the way you would brief a contractor: specific, checkable, and about this codebase. “Use the repository pattern in src/data/; never query the ORM from a route handler” changes output. “Write clean code” changes nothing.
Keep each rule file short. A rule the agent cannot hold alongside the task is decoration, and a stale rule is worse than none, because the agent follows it confidently into the wrong pattern.
A starter rules file
Save as .cursor/rules/project-conventions.mdc:
---
description: Core conventions for this repository
alwaysApply: true
---
# Stack and structure
- TypeScript strict mode. No `any` without a comment saying why.
- Route handlers live in src/routes/ and contain no business logic.
- All data access goes through src/data/ repositories.
# Patterns to follow
- Errors: throw AppError from src/lib/errors.ts, never raw strings.
- Tests: one test file per source file, named *.test.ts beside it.
- New endpoints must update the OpenAPI schema in src/openapi/.
# Never do this
- Never add a dependency without asking first.
- Never edit files under src/generated/ — regenerate them instead.
- Never use default exports in new files.
Then add scoped files — api.mdc with globs: src/routes/**, tests.mdc with globs: **/*.test.ts — as conventions accumulate. Review rules monthly; this mirrors the maintenance discipline in the CLAUDE.md guide for terminal agents: instruction files are code, and they rot like code.
User rules, team rules and rule conflicts
Project rules are not the only layer. User Rules in Cursor’s settings apply to every project on your machine — the right home for personal preferences like commit-message style. Team Rules on team plans are set by admins and apply across the organisation’s repos.
When rules conflict, the more specific file is the one to fix, not the one to shout louder in. A glob-scoped rule that contradicts an always-apply rule produces inconsistent behaviour that looks like model randomness. If the agent’s output swings between two patterns, audit the rules before blaming the model: overlapping globs are the usual cause.
One more habit: when the agent gets something right after a correction, ask whether the correction belongs in a rule. Rules written from real corrections age better than rules written from imagination.
Step 4: Agent habits that keep diffs reviewable
- One goal per agent run. Commit between runs, so a bad run is one revert instead of an afternoon of archaeology.
- Read the plan before execution on anything touching more than three files. A 20-second plan review is cheaper than auditing a 20-file diff.
- Review diffs file by file. Cursor applies changes across many files at once, and a plausible-but-wrong edit in file nine is the classic failure.
- Pin context on precision work.
@fileand@folderreferences beat retrieval guesses when the exact file matters.
Pricing, without the fog
Cursor’s pricing changed fundamentally in October 2026: it is now sold through the X Subscription, bundled with Grok. The plans on Cursor’s pricing page (checked November 2026):
| Plan | Price | What it means for Cursor |
|---|---|---|
| Free | $0 | Limited agent and chat requests |
| Plus | $8/month | Cursor included, but Grok models only |
| Premium | $30/month | 4× the Plus usage pool; cloud agents and automations; third-party models available |
| Super | $100/month | 15× the Plus usage pool; priority model access at peak times |
| Ultra | $200/month | 50× the Plus usage pool; earliest access to new products and models |
Three mechanics matter more than the headline prices:
- The included pool covers Cursor’s own and Grok models, and refreshes weekly, so one heavy day does not wipe out a month.
- Third-party models — Claude, GPT, Gemini — are not included in any plan’s pool. From Premium up they are available inside Cursor at API list price, billed separately from prepaid credit. If you mainly run Claude inside Cursor, the plan price is the floor, not the bill.
- Spending caps exist for that third-party usage. Set one before your first heavy agent week, not after the invoice.
Legacy plans: the old Pro ($20/month, with roughly $20 of included API-rate usage), Pro+ ($60) and the previous Ultra still run for existing subscribers, but new customers cannot buy them. If you are on a legacy plan, compare carefully before switching — the included third-party usage was the valuable part, and the new plans do not reproduce it. Teams and Enterprise plans sit alongside the individual tiers for organisations that need shared billing, pooled usage or admin controls.
Compare the shapes before committing: the three-way agent comparison puts Cursor’s model next to flat subscriptions, and the Claude Code cost ladder shows what the terminal alternative costs at each level of use.
What a month actually looks like
Two usage shapes land in very different places under this pricing. A Tab-heavy developer — completions all day, Chat for questions, Agent for an occasional scoped change — lives mostly inside the included pool, and a mid-tier plan covers the month. An agent-heavy developer — multi-file Agent runs on a frontier third-party model, several times a day — spends the pool quickly and then pays API list price per task, so their real bill is plan plus a variable top-up that scales with ambition.
Neither shape is wrong. The mistake is buying for one shape while working in the other, which is why the usage dashboard matters more in month one than any plan comparison, this one included.
Common mistakes
- Judging Chat on agent-sized work. Multi-file changes are Agent’s job; Chat with no pinned context will underwhelm.
- Skipping the rules file. Without one, the agent defaults to generic patterns — including ones your project deleted last year.
- Ignoring the usage dashboard in month one. Under the new pricing, model choice is a budget decision; check weekly until your habits are predictable.
- Leaving Privacy Mode on its default for client work, instead of choosing it on purpose.
FAQ
Is Cursor just VS Code with a plugin? No. It is a fork of VS Code with its own Tab model, codebase indexing and agent built into the editor core, which is why its completions and retrieval feel different from an extension. Your VS Code extensions and settings do carry over.
What is the difference between .cursorrules and .cursor/rules/?
.cursorrules is the legacy single file at the project root, still honoured but no longer the format to build on. .cursor/rules/ holds .mdc files whose frontmatter controls when each rule applies — always, by agent judgement, by file pattern, or manually.
Does Cursor index my code on their servers? Cursor builds embeddings of your code for retrieval. Privacy Mode controls storage and training use: Cursor states that with it enabled, code is not used for training by Cursor or its model providers. Set it explicitly, particularly for client or proprietary work.
Which plan should a new user buy in November 2026? Plus ($8/month) only makes sense if Grok models are enough for you. Most developers who want Claude or GPT models inside Cursor need Premium ($30/month) plus a prepaid balance for those models at API list price — so budget the two parts separately. The head-to-head with a terminal agent is in Cursor vs Claude Code.
Does Cursor work offline? No. Tab, Chat and Agent all call cloud models, so the AI features need a connection; offline, Cursor is a capable VS Code-class editor and nothing more. If offline coding assistance is a requirement, a local model setup is the alternative — the local LLMs for coding guide covers what that can and cannot do.
Is my old Cursor Pro plan gone? No. Legacy Pro, Pro+ and Ultra plans continue for existing subscribers; they are simply no longer sold to new customers. Because legacy Pro included third-party model usage that the new plans bill separately, run the numbers for your own usage before migrating.
How we researched this
This guide is desk research: Cursor’s official documentation (rules, indexing, privacy), the pricing page on cursor.com read in November 2026, and Cursor’s published plan announcements for the legacy tiers. No hands-on testing is claimed, and no benchmark figures appear because Cursor publishes none we could cite. Prices and plan structures carry a “checked November 2026” stamp because this vendor changes them often — the October 2026 restructure is the second pricing model in under two years.
The verdict
Cursor set up properly is an editor with a genuinely useful agent, and the setup is the product: Privacy Mode chosen, index finished and pruned, rules written for your codebase, plans read before diffs. Do those four jobs and the remaining question is purely economic — whether the subscription pool plus API-price third-party models beats a flat terminal subscription for your habits. GitHub Copilot’s agent mode takes a similar brief-and-review approach inside plain VS Code, and the Windsurf guide covers the other editor readers ask about most. If terminals suit you better, OpenCode is the open-source take on the same workflow.
Category: Claude Code & Context Engineering · Tags: #ai-coding #tutorial #pricing
Next step: this article is part of Claude Code guides, which covers the full topic from first setup to advanced use.