Cursor: Combine Editor Context, Plan Mode, and Repository Search
Cursor Agent works inside the editor and uses files, rules, skills, terminal, and search tools. An exact @-context helps when the files are known; Plan Mode and Explore are needed when the change path isn't found yet.
The modes of work set what the agent may do.
Mode · Use · Expected result
- Ask - A read-only question about the code; An explanation with files and symbols
- Plan - A complex, multi-file, or ambiguous task; An editable plan with files and verification
- Agent - Implementing the agreed scope; Edits, commands, and evidence
Cursor documents context in the prompt through references to files and folders, Docs, terminals, past chats, and Git changes. If the exact files are known, attach them; if not, describe the symptom and let the Agent search. The whole monorepo doesn't need attaching by hand - it only adds noise.
@src/discount.js @tests/discount.test.js
Reproduce the percentage bug before editing.
Use Plan Mode to explain the root cause and limit writes to src/discount.js.
Keep the public API and dependencies unchanged.
Run the focused test and full check, then inspect the final diff.The search tools are split by purpose: Instant Grep is for exact or regex search, and the Explore subagent does a broader search in a separate context and returns a summary. The decisive code still needs opening before the patch, and in large repos generated and vendored content is worth deliberately excluding from the index.
.cursorignorehas a limited scope. It blocks Agent, Tab, Inline Edit, and@-references to the listed files, but the official documentation warns: terminal and MCP server tools don't obey this file. Don't use it as the only secret protection.
Context and search are configured. What remains is to assemble Cursor's persistent surfaces: rules, skills, hooks, run modes, and worktrees.