Cursor Agent: 10 Pro Tips!

By Cursor

Share:

Here are 10 pro tips for working with the Cursor agent, along with additional bonus tips.

1. Utilize Plan Mode for Feature Implementation

Plan Mode allows the Cursor agent to analyze your codebase, understand your application's structure, and generate a detailed plan for implementing new features.

  • Process:
    1. Open a new chat in the agent input (Command N).
    2. Toggle to Plan Mode (Shift Tab).
    3. Describe the feature you want to implement. For example, "Let's make a new page to show my top artists on Spotify."
    4. The agent will research your existing code (e.g., your current Spotify implementation) and ask clarifying questions.
    5. It generates a Markdown file outlining the plan, referencing specific components and files, and creating to-dos.
    6. You can edit the plan directly, removing unnecessary steps (e.g., "we don’t need a brief intro about music taste").
    7. Once satisfied, hit "Build" to have the agent implement the plan using the selected model (e.g., Claude 4.5 Sonnet).
  • Example: The speaker used Plan Mode to add a "top artists" page to their personal website. Initially, it resulted in a permissions error with the Spotify token, which was resolved by pasting the error message back into the chat for the agent to fix.

2. Leverage the Context Menu and @branch

The context menu, accessed by typing @ in a new chat, provides access to various contextual information. The @branch feature allows you to review changes on a specific branch.

  • Process:
    1. Create a new branch (Command Shift P, then "create branch," e.g., "top-artists").
    2. Open a new chat.
    3. Type @ to bring up the context menu.
    4. Select @branch to review changes on the current branch.
  • Context Menu Options: The menu includes options to reference files, folders, public documentation, past chats, linter errors, and specific files or folders to include in the agent's context.
  • Example: The speaker used @branch to have the AI review the code generated for the top artists feature, identifying a potential issue with cache times.

3. Create Custom Commands

You can define your own commands by creating Markdown files within a commands folder in your Cursor project.

  • Process:
    1. Create a new folder named commands in your Cursor project.
    2. Inside commands, create a Markdown file (e.g., PR.md).
    3. Write your prompt within the Markdown file. For example, "Your job is to create a PR with a descriptive title. Always use the GitHub CLI. If you haven’t already made a commit, do that first."
    4. These custom commands will appear in the agent's slash command menu.
  • Example: A custom PR command was created to automate the process of creating a pull request using the GitHub CLI, including making a commit if necessary. The agent successfully generated a pull request link.

4. Pass Images to the Agent

The agent can process images, allowing you to guide its output based on visual references.

  • Process:
    1. Copy an image.
    2. Paste the image into the agent's chat window.
    3. Provide a prompt that references the image.
  • Example: The speaker pasted an image of Spotify Wrapped and asked the agent to make the "top artists and music page look closer to the image with artist photos please." The agent then updated the code to fetch artist images and adjust the display to resemble the Wrapped format. The speaker noted that adding "please" and "thank you" might improve model performance.

5. Fork or Duplicate Chats

You can duplicate an existing chat to explore different implementation paths while retaining the current context.

  • Process:
    1. Click the "..." menu on a chat.
    2. Select "duplicate chat."
    3. Make changes in the duplicated chat.
  • Recommendation: While duplicating is an option, it's generally recommended to use the smallest number of tokens in the context window possible.

6. Monitor the Context Window Gauge

The context window gauge (e.g., 12% used for Claude Sonnet 4.5's 200k context window) indicates how much of the model's context limit you've consumed.

  • Tip 6.5 (Summarize Command): You can use a /summarize command to compact the current conversation, reducing token usage. Be intentional about when and how you use this.

7. Manage Usage Visibility

In settings, you can toggle "usage summary" from "auto" (shows only when near limits) to "always" for constant visibility of your usage percentage and reset date. This is useful for cost-conscious users.

  • Example: The speaker showed they had used 38% of their usage limit.

8. Utilize Keyboard Shortcuts

Keyboard shortcuts streamline interaction with the agent.

  • Key Shortcuts:
    • Command I: Open the agent window.
    • Command Slash: Change the selected model (e.g., to GPT-5 High Fast or Claude 4.5 Sonnet).
  • Customization: Many shortcuts can be configured in the settings.

9. Start New Conversations Frequently

For new features, it's advisable to start new conversations rather than extending existing ones indefinitely.

  • Reasoning: Long conversations can consume a large portion of the context window, potentially degrading model quality over time.
  • Shortcut: Command N to start a new chat.

10. Revert Changes within a Conversation

You can go back in time within a conversation to revert to a previous state.

  • Process:
    1. Make a change and let the agent implement it.
    2. If you dislike the change, click a button to go back to a previous checkpoint in the conversation.
    3. Confirm discarding changes up to that point.
  • Note: This is useful for small adjustments or significant rollbacks. However, Git is still recommended for persistent change management.

Bonus Lightning Round Tips

  • Completion Sound & Notifications: In settings, you can enable a completion sound when the agent finishes or system notifications for task completion or permission requests.
  • Generate Codebase Visualizations: The agent can generate diagrams of your codebase.
    • Example: The speaker asked for a Mermaid diagram of the Spotify flow, which detailed the user-to-app interaction, API endpoints, OAuth flow, and token handoffs, useful for documentation.
  • New Agent Layout (Beta): A redesigned interface with agents on the left sidebar, the main conversation in the center, and diffs on the right. This layout integrates with browser features like network logs, DOM inspection, and terminal execution.

Key Concepts

  • Cursor Agent: An AI assistant integrated into the Cursor IDE.
  • Plan Mode: A feature that allows the agent to analyze code and create implementation plans.
  • Context Menu: A menu accessed by typing @ in the chat, offering various contextual information sources.
  • @branch: A context menu option to review changes on a specific Git branch.
  • Custom Commands: User-defined prompts stored in Markdown files that can be executed via slash commands.
  • Context Window: The amount of information a language model can process at once.
  • Tokens: Units of text processed by language models.
  • Usage Summary: A feature to track AI usage against limits.
  • Keyboard Shortcuts: Predefined key combinations for quick actions.
  • Mermaid Diagram: A text-based diagramming tool.
  • Git: A version control system for tracking changes in code.

Chat with this Video

AI-Powered

Load the transcript when you're ready to chat so the initial page stays lighter.

Ready to summarize another video?

Summarize YouTube Video