Cursor's Agent pane (Ctrl+L / Ctrl+I) becomes exponentially more powerful when you provide precise context using the @ mention system. Instead of pasting code manually, you reference exactly what the AI needs to see. You can also select code in the editor and press Ctrl+Shift+L to add the selection straight to the conversation.
| Mention | What It Does | Best For |
|---|---|---|
@file | References a specific file | Targeted questions about one file |
@folder | References an entire directory | Understanding module architecture |
@code | References specific symbols (functions, classes) | Debugging specific functions |
@web | Live web search during chat | Finding documentation, latest APIs |
@docs | Search external documentation | Framework docs, library references |
@git | Git history, diffs, branches | Understanding recent changes |
Older guides lean on @codebase for project-wide questions. Modern Cursor agents ship with a built-in semantic codebase search tool and use it automatically whenever a question spans the project — so you rarely need to attach everything manually anymore.