Review your branch
What have I changed in the auth module on this branch? Group the changes by intent.It is 5pm on a Friday. You rebase your feature branch onto main for the deploy and hit a three-way conflict in the file two other people touched this week. The commit messages on both sides say “wip” and “fixes,” so you have no idea what intent each change carried. Twenty minutes later you are reading git blame line by line, the deploy window is closing, and a teammate’s PR has been sitting unreviewed for two days because nobody had time to read 600 lines of diff.
This is where AI-assisted version control earns its keep. Cursor reads diffs, branches, and PR history the same way it reads code, so it can draft the commit message, reason about both sides of a conflict, and review a PR before a human ever opens it. This guide covers the Cursor-specific workflows for commits, conflicts, reviews, and team-shared context — and the exact prompts that make them reliable.
.cursor/BUGBOT.md config that makes automated PR review catch your team’s specific mistakes.cursor/rules/ that keep everyone’s AI output consistentNever write another generic commit message. Cursor analyzes your staged changes and generates contextual, meaningful messages:
For faster commits, bind message generation to a shortcut:
// In Keyboard Shortcuts (Cmd/Ctrl+R then Cmd/Ctrl+S){ "key": "cmd+m", "command": "cursor.generateGitCommitMessage"}Cursor 2.0 removed the @Git, @Branch, and @Recent Changes mentions. The agent now reads git state on its own when you ask in plain language — it runs git log, git diff, and git blame as tools. Skip the @ syntax and ask directly:
Review your branch
What have I changed in the auth module on this branch? Group the changes by intent.Compare against main
Compare this branch with main and summarize the behavioral differences,not just the line-level diff.Inspect recent commits
Show what changed in my last three commits and flag anything that looksunintentional or unrelated to the feature.Fetch a PR
Fetch PR #123 from this repo and explain what it changes and why.Checkpoints are automatic snapshots created when Agent makes changes to your code. They’re your instant undo button for AI modifications.
Two ways to restore:
Click Restore Checkpoint on any previous Agent request
Hover over any Agent message and click the + button
When conflicts arise, let AI help resolve them intelligently:
The default “Resolve in Chat” prompt is fine for trivial conflicts, but for anything where both sides changed behavior, give the agent explicit instructions about what to preserve. Generic “merge these” prompts tend to pick one side and silently drop the other:
The “stop and ask” instruction matters: it is the difference between a merge you can trust and one where the agent quietly discarded a teammate’s change to make the conflict markers disappear.
With the GitHub MCP server connected, the agent can open the PR for you instead of you switching to the browser. The quality of the description depends entirely on how specific your prompt is — “make a PR” produces a restated diff; the prompt below produces something a reviewer can actually use:
Cursor indexes your repository’s pull requests, so the agent can mine historical decisions instead of you grepping closed PRs by hand. Ask in plain language and reference what you are looking for:
How have we implemented authentication in past PRs? List the relevant PR numbersand summarize the approach each one took, then tell me which pattern is current.The agent surfaces the matching PRs and can fetch the full diff of any one you name as a follow-up.
BugBot automatically reviews PRs for potential issues:
Bug Detection
Catches null checks, error handling, security issues
Code Standards
Enforces team conventions and best practices
Performance
Flags potential performance problems
Security
Identifies security vulnerabilities
Create .cursor/BUGBOT.md with team-specific rules:
# BugBot Configuration
## Critical Rules- All API endpoints must have authentication- No console.log statements in production code- SQL queries must use parameterized statements
## Code Style- Use async/await instead of promises- Prefer const over let- Destructure objects when possible
## Performance- Warn about N+1 query patterns- Flag synchronous file operations- Check for missing database indexesTeams can share indexing work for faster onboarding:
Models do not retain memory between completions, so durable architectural decisions belong in a version-controlled file the whole team shares — not in a chat the agent forgets. Cursor reads both .cursor/rules/ files and a project-root AGENTS.md at the start of the model context. For a quick, readable home for “facts everyone should know,” AGENTS.md is the lowest-friction option:
# Project Instructions
## Money handling- All monetary values are stored as integer cents, never floats.- Any code that touches prices, totals, or currency must use the Money helper in src/lib/money.ts and never do raw floating-point math.
## Conventions- Authentication uses JWT with a 15-minute access-token expiry.- Pagination is cursor-based, not offset/limit.Record decisions that are durable; leave one-off facts out so the file does not go stale. When a decision changes, edit the file and commit it so every teammate’s agent picks up the change.
Team-wide consistency through .cursor/rules/:
---alwaysApply: true---
- Use TypeScript for all new files- Follow ESLint configuration- Write tests for all new features- Use semantic commit messages- All endpoints return consistent error format- Use middleware for authentication- Validate input with Joi schemas- Return 201 for successful creation- Unit test coverage minimum 80%- Integration tests for all API endpoints- E2E tests for critical user flows- Mock external services in testsWhen two unrelated features both need to ship, you do not have to serialize them. Cursor’s Cloud Agents run on isolated branches in the background, so you can dispatch one and keep working locally on the other. Launch them from the agent sidebar (or from Slack — see below) and each opens its own PR when done. Keep the tasks genuinely independent; two agents editing the same module will just hand you a merge conflict later.
A realistic review loop with Cursor in the mix looks like this:
Walk me through the authentication flow in this PR and flag any place a token could leak into logs.Address every BugBot comment on this PR. For each one, make the fix and reply with a one-line note on what you changed.This is the part most people get wrong. The Cursor Slack app is not a conversational bot that summarizes PRs or answers questions in-channel. Mentioning @Cursor spawns a Cloud Agent that works on a coding task in a repository and opens a PR — it picks the repo and model from your message and recent activity. Use it to kick off work without leaving Slack:
@Cursor in backend-api, fix the login bug where expired sessions return 200@Cursor with opus, refactor the auth module to use the new token helper@Cursor branch=develop autopr=false add rate limiting to the password reset endpoint@Cursor list my agentsUse branch= to set the base branch and autopr=false if you do not want it to open a PR automatically. Run @Cursor settings to set a channel’s default repository, and @Cursor help for the current command list. There is no “summarize this PR for QA” command — for that, ask the agent inside the IDE using the PR-fetch prompt from earlier.
When a teammate needs docs, point the agent at the code rather than describing what you want:
The agent can drive git directly through its terminal tool, so these are pasteable prompts, not scripted output:
Create a feature branch off main called fix/cart-totals, cherry-pick commits5abc123 and 7def456, then push it to origin and show me the resulting log.Rebase this feature branch onto main. If you hit a conflict, keep my feature'sbehavior, explain each resolution, and stop to ask if a resolution is ambiguous.For repetitive checks, encode them in a git hook rather than re-prompting every time. A pre-commit hook that runs lint and type-check before each commit:
#!/bin/bashnpm run lintnpm run type-checkConsistent Standards
Use shared rules and BugBot configuration
Knowledge Capture
Record durable decisions in shared rules and AGENTS.md
Regular Syncs
Share AI learnings in team meetings
Progressive Adoption
Start with volunteers, expand gradually
Track these metrics to measure improvement:
You typed @Git or @Recent Changes out of habit and the agent ignored it. Those mentions were removed in Cursor 2.0. Drop the @ and ask in plain language (“compare this branch with main”) — the agent runs git itself.
The agent “resolved” a conflict by silently picking one side. Re-prompt with the explicit “keep both intents, stop and ask if incompatible, show me a diff before applying” instruction from the merge-conflict prompt above, and review the diff before accepting.
BugBot only knows what you tell it. Open .cursor/BUGBOT.md, add a concrete rule for the pattern it missed (e.g. “flag any SQL built with string concatenation”), and confirm BugBot is enabled for the repo in your Cursor dashboard.
Remember @Cursor starts a coding agent, not a chat bot. If it picked the wrong repo, name it explicitly (@Cursor in backend-api, ...) or set a channel default with @Cursor settings. Use autopr=false while you are still calibrating prompts.
A teammate’s Cursor is re-indexing from scratch. Check that the shared codebase index is enabled in your team settings and that they have access to the same workspace and repository.