Cursor deep dive: project index, rules, @-mentions, Composer
The features that make Cursor feel different — and how to configure them for your repo.
Cursor feels magical the first day and confusing the second when you realize you're using 30% of what it does. Here's how to actually configure it to work with your codebase.
The three surfaces to understand
Cursor has three different interaction modes:
- Tab autocomplete. Inline suggestions. Default, always on.
- Cmd-K (inline edit). Highlight code or a blank line, describe a change. Fast, focused edits.
- Chat / Composer. The sidebar conversation; can span multiple files; best for bigger asks.
Each rewards different habits. Tab for flow. Cmd-K for precise changes. Chat for plan-and-execute work.
Project indexing — the foundation
Cursor builds a semantic index of your repo. When you @-mention a file or ask a question, it retrieves relevant code into context.
Configure:
.cursorignore— like.gitignore, keeps noise out of the index. Addnode_modules, build outputs, lock files, large data.- Re-indexing schedule (Settings → Indexing).
A clean index is the difference between useful context and polluted context.
Rules — the most underused feature
.cursor/rules/ is where you teach Cursor your project's conventions. Example file:
---
description: How to write new routes
globs: src/app/**/*.tsx
---
- Every route lives under src/app in the App Router convention.
- Use Server Components by default; mark client components with "use client".
- For forms, prefer Server Actions over API routes.
- Error boundaries go in error.tsx; loading states in loading.tsx.
When Cursor works on files matching the glob, it applies these rules to its suggestions.
Having 5-10 rules files covering different areas of your codebase dramatically improves suggestion quality.
@-mentions
Your most valuable productivity hotkey:
- @FileName — include file in context.
- @Folder — include a whole folder.
- @Git — include the diff or recent commit.
- @Docs — pull from registered docs (React docs, etc.).
- @Web — live web search.
Be liberal with @-mentions in the Composer. The default context is minimal; the more relevant @-mentions you add, the better the output.
Composer vs. Agent mode
Composer is the current flagship. It has two sub-modes:
- Normal: you approve each file change.
- Agent: Composer runs autonomously — edits files, runs commands, iterates.
Agent mode is powerful but needs supervision on unfamiliar tasks. Keep the diff view open.
Keyboard flow that matters
- Cmd-K (inline edit) on a highlighted block — the most underused shortcut.
- Cmd-L (Composer focus) — jumps to chat from anywhere.
- Cmd-I (ask about highlighted code) — context-aware explanation.
Spend 15 minutes drilling these. They compound.
MCP integration
Cursor supports Model Context Protocol. You can register MCP servers (from your own code or public ones) and Cursor's agent can call them as tools. Useful for:
- Your internal API docs.
- Database introspection.
- Deployment commands.
- Observability queries.
Shipped MCP servers from the community cover many common needs (PostgreSQL, Linear, Notion, etc.).
What breaks in practice
- Monorepos with strict boundaries. Cursor's context can pull from files that shouldn't influence your current work. Use
.cursorignoreaggressively. - Very large files. The model gets distracted. Break them up if you can.
- Outdated indexes. Re-index after large restructures.
- Agent mode on unfamiliar code. It'll confidently refactor things you didn't want touched. Use Normal mode in new areas until you trust it.
Check your understanding
2-question self-check
Optional. Your answers feed your knowledge score on the track certificate.
Q1.The single highest-leverage Cursor configuration investment is…
Q2.@-mentions in Composer are used to…
Continue in this track
More lessons from AI Coding Tools Mastery.
Lesson 1
The modern AI coding stack: what each tool is actually for
Cursor, Claude Code, Copilot, VS Code, Windsurf — a map of who does what well.
Lesson 3
Claude Code: the CLI for agentic engineering
Slash commands, subagents, MCP, hooks — using Claude Code as a first-class dev tool.
Lesson 4
GitHub Copilot: from inline completion to Copilot Workspace
Chat, edits, workspaces, code review, agent mode — when to use which.