I spent 700+ hours in Cursor, here’s what I learned
By David Ondrej
Key Concepts
Background Agent, Cursor Rules File, YOLO Mode (Auto Run), Custom Modes, Bug Bot, MCPs (Managed Code Providers), AI-first Software, Codex, AI Agents, Model Selection (Claude, Gemini), Prompt Engineering, Task Delegation, Codebase Context, File Structure, Security, Productivity.
Background Agent
- Functionality: Allows launching multiple AI agents asynchronously in the background to work on different parts of the codebase. Accessed via
Cursor > Settings > Cursor Settings > Beta > Enable Background Agent
(Privacy mode must be disabled:General > Privacy > Disabled
). Can also be started withCommand E
. - Usage: Delegate tasks from backlog. Example: Fixing a bugged scroll bar in notes.
- Example: The speaker uses it to fix a scroll bar issue in his AI startup, Vectal. He assigns the agent the task of investigating and implementing a clean fix.
- Benefits: Frees up developer time by automating tasks.
- Vectal Comparison: Vectal has a similar feature where AI agents can be activated on multiple tasks simultaneously.
Tagging GitHub Commits/Issues in Chat
- Functionality: Allows tagging GitHub commits or issues directly within the Cursor chat to understand changes.
- Usage: Type "Help me understand this commit" and tag the commit using the
@
symbol. - Process: Cursor connects with GitHub (requires verification). The AI agent then reads the commit and explains the changes.
- Benefits: Speeds up understanding of code changes.
- Documentation: Cursor has a dedicated page in their documentation about the
@
tagging symbol.
Model Selection
- Settings:
Cursor > Settings > Cursor Settings > Models
. - Recommended Models (as of June 2024):
- Claude 4 Opus (Thinking Max Mode)
- Gemini 1.5 Pro Preview 0605
- Claude 4 Sonnet (Max Mode)
- Usage:
- Agent Mode: Use Claude 4 Sonnet (faster for implementation).
- Ask Mode: Use Claude 4 Opus (more intelligent for understanding).
- ChatGPT Integration: Use GPT-4 (03) in ChatGPT as a consultant for complex tasks.
- Troubleshooting: If stuck with Sonnet, switch to Opus in Agent mode.
- Cost: Using high-end models like Claude 4 Opus can be expensive (potentially $40-$60/day).
Real-World Workflow Example (GPT-4 & Claude Opus)
- Setup:
- Use a custom model in Cursor with Claude 4 Opus.
- Use GPT-4 (03) in ChatGPT with a custom project (e.g., "Vectal project") and relevant files attached.
- Process:
- Define the task.
- Ask GPT-4 (03) for different approaches and its preferred approach.
- Send the same task to Claude 4 Opus in Cursor.
- Compare the outputs from both models.
- Have the models critique each other's plans.
- Execute the chosen plan in stages using Claude 4 Sonnet (Agent mode) in Cursor.
- Example: Adding a plus icon to each task in Vectal to allow referencing it in chat.
Cursor Rules File
-
Purpose: Main instruction set for the project, including file structure.
-
Importance of File Structure: Helps AI agents understand the codebase and create files in the correct locations.
-
Generating File Tree: Use the following command in the terminal (after installing
tree
):tree -L 4 -a -I "node_modules|.git|venv|dist|build"
-
Installation:
- MacOS:
brew install tree
- Windows:
choco install tree
- MacOS:
-
Maintenance: Update the file tree every few days.
YOLO Mode (Auto Run)
- Functionality: Allows the AI agent to automatically run commands.
- Settings:
Cursor > Settings > Cursor Settings > Chat > Auto Run
. - Command Denial List: Crucial for preventing unwanted commands from being executed automatically (e.g., force pushes, get clean fdx).
- Other Settings:
- File deletion protection (turn on).
- MCP tools protection (depends on MCP servers).
- Dot file protection (turn on).
- External file protection (turn on).
Custom Modes
- Functionality: Allows creating custom chat modes with specific AI models, keybinds, tools, and instructions.
- Settings:
Cursor > Settings > Cursor Settings > Chat > Enable Custom Modes (Beta)
. - Benefits: Tailor AI agent behavior for different tasks.
- Example: Create a "Sonnet" mode for aggressive coding with the instruction "Do not do anything else." Create an "Opus" mode for consulting with the instruction "Do not write any code, just investigate and grab code base. Keep your answer concise."
- Configuration Options:
- Model selection.
- Keybinds.
- Tool selection (search, edit, run).
- MCP access.
- Autofix, Auto Run, Auto Apply Edits.
- Custom instructions.
Bug Bot
- Functionality: Automatically reviews pull requests for bugs and issues.
- Setup:
cursor.com > Settings > Integrations > Enable Bug Bot
. Connect GitHub. - Configuration:
- Spending limit.
- Enable on specific repos.
- Disable "Only run when mentioned."
- Disable "Only run once per pull request."
- Disable "Hide no bugs found comments."
- Triggering: On older PRs, comment "bugbot run". Newer PRs run automatically.
- Limitations: Bug Bot will only run on your personal PRs.
MCPs (Managed Code Providers)
- Functionality: Integrates external tools and services into Cursor.
- One-Click Integration: New feature allows adding verified MCPs with a single click.
- Security: Stick to official MCPs to avoid security risks.
- Example: Adding GitHub MCP requires a personal access token.
- Process:
- Go to
cursor.com
and click on your profile. - Go to settings and click on integrations.
- Click on the MCP you want to add.
- Follow the instructions to install the MCP.
- Go to
Synthesis/Conclusion
The video provides a comprehensive guide to maximizing productivity using Cursor, an AI-powered code editor. Key takeaways include leveraging the Background Agent for asynchronous task delegation, utilizing custom chat modes for tailored AI assistance, and integrating tools like the Bug Bot and MCPs to automate code review and enhance functionality. The speaker emphasizes the importance of staying updated with the latest AI advancements and adopting an "AI-first" approach to software development to achieve significant gains in productivity and efficiency. He also highlights the importance of security when using MCPs and recommends sticking to official providers.
Chat with this Video
AI-PoweredHi! I can answer questions about this video "I spent 700+ hours in Cursor, here’s what I learned". What would you like to know?