AI PUBLISHED UPDATED

How to Better Use Cursor

Before You Start Reading

Table of Contents

Most Essential Cursor Shortcuts

(If you’re using Mac, replace Control with Command)

Tab

When dealing with Cursor’s code auto-completion, use these shortcuts:

Chat

Apply

Cursor Features You Might Not Know About

Cursor Chat Applications

Generate Commit Message

Cursor’s commit field has a built-in “Generate Commit Message” button. I recommend setting up global Cursor Rules to ensure Cursor generates messages following Conventional Commits.

For example:

When generating commit messages, follow conventional commit format, starting with a category such as: feat:, fix:, docs:, style:, refactor:, perf:, test:, chore:, revert:, etc., then only give one line commit message.

Important Cursor Considerations

Cursor can read a maximum of 250 lines in normal mode and up to 750 lines in max mode.

My Cursor User Rules

Open Cursor Settings, navigate to the Rules page, and write your Rules under the User Rules section.

I’ve modified the Rules shared by Cursor employees (reference link) to create my own User Rules as follows (text version available here):

My Cursor Project Rules

Beyond global settings, Cursor also supports project-level prompts. To implement this, create a .cursor folder in your project, then create a rules subfolder within .cursor and set up different prompt files.

I think this needs some experimentation and hands-on experience before I can share best practices. However, I’ve found some excellent examples worth trying in your own projects:

Prompt Writing Techniques

This section isn’t specifically about Cursor, but to use Cursor effectively, the fundamental principle is understanding how to craft better AI prompts.

1. Start every new conversation with the Goal, Return Format, Warnings, Context framework

This prompt writing approach was recommended by OpenAI co-founder Greg Brockman and became widely shared on X (reference link):

By leveraging Cursor’s features effectively, you can provide rich context to AI models. The most important aspect of prompting is describing your goals and requirements with crystal clarity.

2. Ensure high-quality responses through the “Single Context Principle”

The single context principle (single purpose composers) concept was shared by Cursor team member Eric Zakariasson on X (reference link).

My understanding is that each conversation thread should focus on “solving one specific purpose.” When I open a New chat to solve “Purpose A,” but encounter unrelated issues during the conversation, I open another New chat to address those separately, then return to the original conversation to continue with “Purpose A.”

After discovering this concept, I realized I’ve been instinctively using this approach. I mentally categorize it as “main quests” and “side quests,” creating conversation threads that branch like a tree.

3. For ambiguous or complex questions, add this at the end of your prompts: “If you need clarification or have any questions, feel free to ask.”

This encourages Cursor to proactively ask questions, helping you provide more context and improving response quality (reference link).

4. To preserve key points from lengthy conversation threads, use this prompt: “Summarize what you did and output in Markdown format that I can copy directly.”

From existing code

From chat sessions

6. Example prompts for different software development phases and scenarios

[Design Phase]

I strongly recommend storing technical design documents directly in your code repository.

Scenario: Modifying Technical Design Documents

Scenario: Creating Visual Aids for Text Content

When you want to create visual aids for text content, you can choose to generate ASCII or Mermaid diagrams.

Scenario: Quickly Understanding a Codebase

[Implementation Phase]

Scenario: Implementing Test-Driven Development (TDD) Workflow

Scenario: Code Review

Scenario: Writing Commit Messages

As mentioned in the Cursor Features You Might Not Know About section, Cursor’s commit field has a built-in “Generate Commit Message” button. I recommend setting up global Cursor Rules to ensure Cursor generates messages following Conventional Commits.

For example:

When generating commit messages, follow conventional commit format, starting with a category such as: feat:, fix:, docs:, style:, refactor:, perf:, test:, chore:, revert:, etc., then only give one line commit message.

Scenario: Writing PR Messages

As mentioned in the My Cursor Project Rules section above, I recommend adding a PR message template to your project-specific Cursor Rules (place it in .cursor/rules/pr_generation.mdc). Combined with Cursor’s @git feature, you can use prompts like “Use the PR Generation prompt to write a description for these two commits” to generate comprehensive PR messages. For templates and detailed instructions, see ExplainThis Guide 3-6.

Scenario: Assisting with Code Review

Reference