@ Symbols - Context is Everything
Master @ symbols to give AI perfect context for better results
๐ก What You'll Learn
- All 5 @ symbol types and when to use each
- How @ symbols 10x your AI accuracy
- Advanced @ combinations for power users
- Pro tips from real developers
๐ฏ Why @ Symbols Matter
@ symbols are the secret to getting 10x better AI responses. Without context, the AI guesses. With @ symbols, it knows.
โ Without @ Symbols
Result: Generic answer about authentication that may not match your codebase
โ With @ Symbols
Result: Specific answer using your exact patterns, types, and conventions
๐ The 5 @ Symbol Types
@Files
Reference specific files
When to use: When you need to reference a specific file's code, logic, or patterns
Pro Tips:
- โ Type @ and start typing - autocomplete will help
- โ Can reference multiple files: @file1.ts @file2.ts
- โ Works in Chat, Composer, and Cmd+K prompts
@Folders
Reference entire directories
When to use: When you need context about multiple related files or overall structure
Pro Tips:
- โ Great for understanding project structure
- โ Helps AI learn your naming conventions
- โ Use for "create similar to what's in @folder/"
@Codebase
Semantic search across your entire project
When to use: When you don't know where something is or need to find patterns across files
Pro Tips:
- โ Requires codebase indexing (check status bar)
- โ Searches by meaning, not exact text
- โ Can be slow on large projects (>100MB)
- โ ๏ธ Works best with specific questions
@Docs
Query official documentation
When to use: When you need authoritative answers from official framework/library docs
Supported Docs:
@Web
Search the internet for current info
When to use: When you need the latest information, breaking changes, or recent best practices
Pro Tips:
- โ Great for checking latest versions/updates
- โ Useful for obscure error messages
- โ ๏ธ Slower than other @ types
- โ ๏ธ Requires internet connection
๐ฅ Advanced @ Combinations
You can combine multiple @ symbols for ultra-precise context:
Create a new API route similar to @src/app/api/users/route.ts but for posts. Follow the patterns in @src/app/api/ and use types from @src/types/
๐ก Combines @File + @Folder + @Folder for perfect context
@Codebase where do we validate user input? Then update @src/lib/validation.ts to follow the same pattern for email validation
๐ก Combines @Codebase search + @File editing
@Docs Next.js explain the new caching in App Router, then apply it to @src/app/
๐ก Combines @Docs learning + @Folder application
๐ @ Symbol Comparison
| @ Type | Scope | Speed | Best For |
|---|---|---|---|
| @Files | Single file | โกโกโก Fast | Specific code |
| @Folders | Directory | โกโก Medium | Structure/patterns |
| @Codebase | Entire project | โก Slower | Finding things |
| @Docs | External docs | โกโก Medium | Learning APIs |
| @Web | Internet | โก Slowest | Latest info |
โก Pro Tips from Power Users
๐ก Tip 1: Start narrow (@File), expand if needed (@Folder โ @Codebase)
๐ก Tip 2: Use @Files to teach AI your coding style and patterns
๐ก Tip 3: @Codebase is expensive - use it when you really don't know where code is
๐ก Tip 4: Combine @Docs with your files: "@Docs React + @myComponent.tsx"
๐ก Tip 5: @Web is best for "what's new in X 2025" type questions
๐ Practice Exercise
Master @ Symbols:
- Use @Files: "Explain @[pick any file in your project]"
- Use @Folders: "What's the structure of @src/?"
- Use @Codebase: "@Codebase where do we handle errors?"
- Use @Docs: "@Docs [your framework] explain [concept]"
- Use @Web: "@Web what's new in [your tech stack] 2025?"
- Combine: Use 2-3 @ symbols in one prompt
๐ Common Issues
@ autocomplete doesn't work
Wait a second after typing @ for autocomplete to load. Check that indexing is complete (bottom status bar).
@Codebase returns no results
Codebase not indexed yet, or your project is too large. Be more specific with your search query.
@Docs doesn't have my library
Use @Web instead to search the internet for that library's docs.
๐ Next Steps
Learn how to customize AI behavior with Cursor Rules: Cursor Rules Tutorial โ