Context Cursor Foundations

Cursor @ References

Use @file, @folder, @web, and @docs to give the AI precise context

11 of 66

What are @ references?

In Cursor chat or Composer, type @ to attach specific context to your message. This tells the AI exactly what to look at instead of guessing.

Reference types

ReferenceWhat it does
@fileAttach a specific file to the conversation
@folderInclude all files in a directory
@codeReference a specific symbol (function, class)
@webSearch the web for current information
@docsSearch indexed documentation
@gitReference git history (diffs, commits)
@codebaseSearch across the entire codebase
@notepadsInclude a saved notepad

Usage examples

@auth.ts fix the login validation bug

@src/components/ create a new Button component matching the existing style

@web what is the latest React 19 API for use()

@git review the last 3 commits for issues

Tips

  • Use @file for targeted questions about specific code
  • Use @folder when the AI needs to understand a module
  • Use @codebase sparingly: it uses more tokens
  • Combine references: @auth.ts @types.ts fix the type mismatch

Source: docs.cursor.com/context/@-symbols

Working out which model to run this on? See The Codex. Packaging it as a reusable skill? See The Armory.