Cursor Productivity Tips: A Deep Dive
Key Concepts: Command Palette, AI Codebase Search, Global/Project Rules, PRD, Chat Modes (Chat, Manual, Agent), Context Specification, Web Context, Iterative Development, Code Review, UI from Image, Quick Edit, Model Selection, Credit Management, .cursorignore, Debugging Workflow, Auto Run Mode, AI Terminal, AI Commit Messages.
1. Command Palette: Quick Access to Functionality
- Main Point: The command palette offers a fast way to access Cursor's features, eliminating the need to navigate the UI.
- Process: Press
Command Shift P, type the desired action, and press Enter. - Examples:
- Opening files (
Command P). - Going to a specific line (colon + line number).
- Navigating to a function or variable (at sign + name).
- Opening files (
2. AI-Powered Codebase Search: Natural Language Queries
- Main Point: Use natural language to search the codebase when you're unsure of the exact file or keyword.
- Process: Open the AI chat, describe what you're looking for, and press Enter. Cursor will use AI to find relevant code.
3. Importing VS Code Settings: Seamless Transition
- Main Point: Import your existing VS Code settings and extensions into Cursor for a familiar environment.
- Process: Go to Cursor settings, general menu, and click the import option.
4. Global Rules: Consistent AI Output Across Projects
- Main Point: Define general coding rules to guide Cursor's AI and ensure consistent code generation across all projects.
- Details:
- Apply to every project.
- Specify commenting style, coding patterns, etc.
- Focus on positive instructions for better LLM understanding.
- Process: Go to Cursor settings, rules menu, and add your rules.
- Resources: Use the provided link to access example rules from Cursor developers and a community-driven rule repository.
5. Project Rules: Tailored Guidance for Specific Projects
- Main Point: Define coding rules specific to the current project, such as tech stack and coding style.
- Details:
- Stored as
.mdc(Markdown) files in a designated folder. - Four types of project rules:
always: Always triggered.manual: Triggered explicitly in the chat.auto attached: Triggered for specific files matching a pattern.agent requested: Triggered when the AI deems it necessary.
- Stored as
- Process: Go to Cursor settings, rules menu, and create new rules.
- Best Practices:
- Keep rules concise (under 500 lines).
- Reuse rules when prompts become repetitive.
- Debug rules by asking Cursor to confirm when it's using them (e.g., "always output 'I'm using this rule'").
- Note: The older, simpler cursor rules files are deprecated and should not be used.
6. Product Requirement Document (PRD): Blueprint for Software Projects
- Main Point: Use a PRD to define project requirements and guide Cursor's development process.
- Process:
- Generate a PRD using a reasoning model like GPT-4.
- Copy the PRD into your project.
- Add a project rule that instructs Cursor to always refer to the PRD when implementing features.
- Include a task completed table in the PRD and instruct Cursor to update it.
- Refer to specific tasks in the PRD within your AI chat.
7. Chat Modes: Choosing the Right Tool for the Job
- Main Point: Cursor offers three chat modes, each suited for different tasks and experience levels.
- Modes:
- Chat: For general coding questions and codebase understanding.
- Manual: For specific modifications, requiring explicit file context. Preferred by senior developers.
- Agent: Access to the entire codebase and all tools, including the command line. Suitable for beginners and small codebases. High risk, high reward.
- Workflow: Start with Agent mode for new projects, then switch to Manual as the project grows.
8. Specifying Context: Guiding the AI's Focus
- Main Point: Manually add files to the context to help Cursor focus on relevant code.
- Methods:
- Mention files with the
@sign. - Click the plus button.
- Reference library documentation (e.g., Next.js, Ruby on Rails).
- Mention files with the
- Trick: Close all editor tabs, open only the relevant ones, and use
/ reference open editorsto add them all at once.
9. Web Context: Accessing Up-to-Date Information
- Main Point: Use the
@webdirective to allow Cursor to search the web for current information, overcoming model cutoff dates. - Details: Models have a cutoff date (e.g., Code Llama 34B's cutoff is October 2024).
- Trade-off: Using
@webmakes requests slower.
10. Iterative Development: Step-by-Step Approach
- Main Point: Avoid trying to "one-shot" entire projects. Instead, break down the project into smaller tasks and implement them iteratively.
- Process:
- Use a PRD with a task list.
- Work on one task at a time.
- Refer to each task by its unique identifier in the AI chat.
- Verify the correctness of each completed task.
11. Code Review: Critical Evaluation of AI Suggestions
- Main Point: Carefully review all code changes suggested by Cursor before accepting them.
- Reasons:
- Cursor may introduce unintended changes or break existing functionality.
- Ensure you understand the changes being made.
- Actions:
- Ask Cursor to explain changes you don't understand.
- Tell Cursor if it shouldn't touch a specific file.
- Suggest simpler implementations if possible.
12. UI from Image: Rapid Prototyping
- Main Point: Generate UI code directly from an image of a design.
- Process:
- Upload an image to the AI chat.
- Ask Cursor to implement the UI based on the image.
- Specify the desired library or framework (e.g., Tailwind CSS, React).
13. Quick Edit: Streamlined Minor Changes
- Main Point: Quickly make small code changes without manually copying and pasting into the chat.
- Process:
- Select the code in your editor.
- Press
Command K. - Enter a description of the desired change (e.g., "bug fix," "refactor," "create a test").
- Review and accept the change.
14. Model Selection: Experimenting for Optimal Results
- Main Point: Manually select a different AI model if the default model doesn't produce satisfactory results.
- Process: Change the model in Cursor's settings.
15. Credit Management: Balancing Speed and Cost
- Main Point: Manage your Cursor credit usage to optimize speed and cost.
- Details:
- Cursor uses a credit system for fast AI requests.
- Premium models consume credits.
- After exhausting your quota, you can switch to non-premium models or usage-based pricing.
- Options:
- Switch to a non-premium model.
- Use usage-based pricing for unlimited fast requests (at an extra cost).
- Add your own custom model using your API key.
16. .cursorignore: Controlling AI Access
- Main Point: Use a
.cursorignorefile to exclude sensitive or irrelevant files from Cursor's AI processing. - Reasons:
- Security: Prevent access to files with API keys or other sensitive data.
- Performance: Avoid indexing irrelevant files like images or binaries.
- Answer Quality: Prevent the AI from using irrelevant context.
- Details:
- Cursor indexes all files and subfolders in the project root by default, excluding those in
.gitignore. - A default exclusion list handles most irrelevant files.
- Use
.cursorignorefor specific files that need to be excluded.
- Cursor indexes all files and subfolders in the project root by default, excluding those in
17. Debugging Workflow: AI-Assisted Bug Hunting
- Main Point: Use Cursor to add logging statements and analyze log output to identify and fix bugs.
- Process:
- Ask Cursor to add logs to the code for better visibility.
- Run the code and collect the log output.
- Paste the log output into the AI chat and ask Cursor to identify the cause of the issue and suggest a fix.
18. Auto Run Mode: Unleashing Agent Mode's Power
- Main Point: Enable auto run mode (formerly "YOLO mode") to allow the Agent mode to execute commands without confirmation.
- Process: Go to Cursor options, features, and tick auto run mode.
- Use Cases:
- Fixing bugs automatically.
- Resolving build errors (e.g., linting).
- Building entire apps (with caution).
19. AI Terminal: Streamlining Command Execution
- Main Point: Use the AI terminal to generate commands with the correct syntax.
- Process:
- Open the terminal.
- Press
Command K. - Describe the task you want to perform.
- Press Enter.
20. AI Commit Messages: Automated Commit Message Generation
- Main Point: Generate commit messages automatically using Cursor's AI.
- Process:
- Stage the files for the commit.
- Click the option to generate a commit message.
- Commit the changes.
- Customization: Bind the generate commit action to a keyboard shortcut in the keyboard shortcuts menu.
Synthesis/Conclusion:
These 19 (plus one bonus) tips provide a comprehensive guide to leveraging Cursor's features for enhanced coding productivity. From utilizing the command palette and AI-powered search to implementing project rules and automating debugging, these strategies empower developers to streamline their workflow, improve code quality, and accelerate project completion. The key takeaways emphasize iterative development, thorough code review, and strategic use of AI tools to maximize efficiency and minimize potential pitfalls. By mastering these techniques, developers can unlock the full potential of Cursor and achieve significant gains in their coding endeavors.
AI summaries can miss context or contain errors. Check important details against the original video.





