Cursor is a powerful AI-powered code editor built on Visual Studio Code. We use it on a daily basis and it's
game-changer. It has revolutionized how developers write code., and the future is clearly not the same as it was
10 years ago.
The good news is that Cursor already uses Claude AI most of the time by default. That's good
since Claude clearly gives better generated code than other AI models. It's as if it understood the code context
better, and had more reliable assistance for complex programming tasks.
But Cursor sometimes switches between different AI models. This article will explain how to ensure Claude is always used, and give you some tips and best practices that will help you get the most out of your productivity with Claude in Cursor.
Why Use Claude with Cursor?
Claude 3.7 Sonnet, when integrated with Cursor, makes you unstoppable compared to default AI models:
- Superior Code Generation: Claude provides better programming capabilities, handling complex codebases with reduced error rates
- Enhanced Context Understanding: Claude can "see" and understand projects deeply, handling context across multiple files effectively
- Dual Operation Modes: Standard mode for everyday tasks and Extended Thinking mode for deeper analysis
- Production-Grade Code: Generates more reliable, production-ready code compared to other models
- Better Reasoning: Performs deeper analysis before responding, leading to more thoughtful solutions
Many developers report using Claude 90% of the time within Cursor, preferring it over other models for its reliability and understanding of complex codebases. Cursor intelligently selects Claude for most tasks, but you can also force it to use Claude when needed.
How to Force Cursor to Use Claude
While Cursor uses Claude by default for most operations, you can explicitly force it to use Claude in several ways:
Method 1: Select Claude in Chat Interface
When using Cursor's chat interface:
- Open the chat panel in Cursor
- Look for the model selector dropdown (usually at the top of the chat interface)
- Select "Claude" or "Claude 3.5 Sonnet" from the available models
- This ensures Claude is used for all subsequent conversations in that chat
Method 2: Set Claude as Default Model
To make Claude your default model:
- Open Cursor settings by pressing
Ctrl+Shift+J(orCmd+Shift+Jon Mac) - Navigate to the "Models" or "AI" section
- Set Claude as your default model for chat and Composer
- Save your settings
Method 3: Use Composer with Claude
When using Cursor's Composer feature for multi-file editing:
- Open Composer (usually
Ctrl+IorCmd+I) - Check the model indicator in the Composer interface
- If it's not Claude, click on it to switch to Claude
- Claude excels at understanding context across multiple files, making it ideal for Composer tasks
Note: Cursor typically uses Claude automatically for complex tasks, but explicitly selecting it ensures consistency, especially when you need Claude's superior reasoning capabilities.
Understanding Claude's Operation Modes
Claude offers two distinct operation modes that serve different purposes:
Standard Mode
Standard mode is perfect for everyday programming tasks. It provides quick responses and is ideal for:
- Quick code snippets and fixes
- Simple refactoring tasks
- Code explanations
- Routine development questions
Extended Thinking Mode
Extended Thinking mode performs deeper analysis and reasoning before responding. Use this mode for:
- Complex architectural decisions
- Multi-file refactoring projects
- Debugging intricate bugs
- Planning and analysis phases
- Understanding large codebases
While Extended Thinking mode may feel slightly less smooth compared to Cursor's native chat, it's highly effective for analysis and planning phases where deeper reasoning is required.
Best Practices for Using Claude with Cursor
To get the most out of Claude in Cursor, follow these proven best practices:
1. Add Documentation to Context
One of the most effective ways to improve Claude's performance is to add relevant documentation to Cursor's context. If you're working with frameworks like Wasp or other tools:
- Copy documentation markdown files into a
docsfolder in your project root - Use Cursor's
@symbol to reference the docs folder when asking questions - This helps Claude understand framework-specific patterns and best practices
Using the @docs as a guide, help me implement chat functionality
with Wasp's Websockets feature into my app. Give the app a chat page...
2. Configure Cursor Rules
Cursor and Claude can sometimes make common mistakes, such as hallucinating imports or skipping framework
features. You can prevent these issues by adding rules to Cursor's settings or creating a .cursorrules file in your
project root.
Example rules that can help:
- When importing Wasp functions from the SDK, use 'wasp' not '@wasp'
- Add new entities to schema.prisma, not directly to the database
- Always use proper TypeScript types when available
- Follow the project's existing code style and patterns
3. Index Your Entire Codebase
Make sure Cursor is indexing your entire codebase for better context understanding:
- Enable "Index codebase by default" in Cursor settings
- Check "Index new folders by default" under the "Show settings" dropdown
- This ensures Claude has access to all relevant code when making suggestions
4. Use Composer for Multi-File Changes
Cursor's Composer feature works exceptionally well with Claude for making changes across multiple files:
- Use Composer when you need to refactor code across multiple files
- Claude excels at understanding relationships between files
- Provide clear instructions about what you want to achieve
5. Leverage Claude for Complex Tasks
Claude particularly shines when working on:
- Full-stack application development
- Building SaaS applications
- Complex refactoring projects
- Understanding and documenting large codebases
- Architectural planning and design
Real-World Use Cases
Building Full-Stack SaaS Apps
Claude with Cursor is particularly powerful when building full-stack SaaS applications. Combined with starter templates like Open SaaS (built on Wasp), you can:
- Quickly implement authentication systems
- Add payment integrations (Stripe, Lemon Squeezy)
- Build admin dashboards
- Implement file uploads (AWS S3)
- Add OpenAI API integrations
- Set up email sending functionality
The combination of Claude's understanding and Cursor's multi-file editing capabilities makes it possible to build complete features in minutes rather than hours.
Code Review and Debugging
Claude excels at:
- Identifying potential bugs before they occur
- Suggesting performance improvements
- Recommending security best practices
- Explaining complex code logic
- Finding edge cases you might have missed
Troubleshooting Common Issues
Claude Not Being Used Automatically
If Cursor isn't using Claude when you expect it to:
- Manually select Claude from the model dropdown in the chat interface
- Check your Cursor settings to ensure Claude is set as the default model
- Restart Cursor if the model selection seems stuck
- For complex tasks, Cursor should automatically prefer Claude, but you can always force it
Context Understanding Issues
If Claude seems to misunderstand your codebase:
- Ensure your codebase is fully indexed
- Add relevant documentation to the project
- Use the
@symbol to reference specific files or folders - Provide more context in your prompts
When to Force Claude vs. Let Cursor Choose
Cursor is smart about model selection, but here's when you should explicitly force Claude:
- Complex Multi-File Refactoring: Claude excels at understanding relationships across files
- Architectural Decisions: When you need deep reasoning and analysis
- Large Codebase Understanding: Claude's context window handles large projects better
- Production Code Generation: When you need the most reliable, production-ready code
- Debugging Complex Issues: Claude's reasoning helps identify subtle bugs
For simple tasks like quick code snippets or basic questions, you can let Cursor choose automatically, as it will often use faster models for more simple requests.
Conclusion
Claude is already integrated into Cursor and used by default for most tasks, providing superior code generation, better context understanding, and more reliable assistance for complex programming tasks. By knowing how to force Claude when needed, you can ensure you're always getting the best AI assistance for your specific use case.
It doesn't matter if you're building full-stack SaaS applications, debugging more complex issues, or simply trying to write better code faster, Claude with Cursor offers a powerful combination that many developers find indispensable. The key is to understand when to explicitly select Claude versus letting Cursor choose automatically, and to experiment with different modes and features to develop your own workflow that maximizes productivity.