An effective Cursor workflow

Cursor · Advanced · 14 min

Individual features help a little; a disciplined loop is what makes AI-assisted work reliably faster.

A dependable way to work in Cursor:

1. Explore. Ask Agent to explain the area you'll change: "how does checkout handle expired cards? Point me to the files." Read its answer and the key files. 2. Plan. For anything beyond a small fix, use Plan Mode. Make the plan list files, steps, what's out of scope and how to verify. 3. Build against a check. The agent stops when the work looks done; give it a way to know it is done. Best is a test as target: "write a failing test that reproduces the bug, show it failing, then fix the code until it passes, without changing the test". Type checks, linters, a build, or a screenshot comparison also work. 4. Review. Read the diffs, run the checks yourself or have Agent show the output, use /agent-review for risky code. 5. Commit in small steps, so every good state is saved. 6. Teach. When you corrected the agent on something it will meet again, add it to a rule or AGENTS.md.

Prompts that work: name the goal, the location (@-mentions), an example to imitate, constraints and the check. Prompts that don't: "improve this", "fix the bug", "make it better".

Size the tool to the task: Tab while typing, Inline Edit for one spot, Agent for multi-file work, Plan Mode when unsure, Cloud Agents for parallel, well-specified tasks.

Know when to stop: if two corrections haven't fixed it, revert (checkpoint or git), start a new chat and write a better prompt with what you learned.

Example

1  Agent: "Explain how @src/checkout handles expired cards. Which files matter?"
2  Shift+Tab (Plan Mode): "Fix: expired cards show a generic error.
   Plan files, steps, out of scope, and how we'll verify."  -> edit -> Build
3  "First add a failing test in checkout.test.ts reproducing it; show it fail.
    Then fix the code until it passes. Do not modify the test."
4  Review diffs; run: npm test && npx tsc --noEmit ; /agent-review
5  git commit -m "Show specific error for expired cards"
6  Add to .cursor/rules/payments.mdc: "Card errors map to codes in errors.ts"

Remember

  • Explore, plan, build against a check, review, commit, update rules
  • A failing test written first is the clearest target for the agent
  • After two failed corrections, revert and restart with a better prompt

Watch out for

  • Letting the agent "fix" a test failure by changing the test's expectations instead of the code.

Check yourself

  1. What's the most reliable way to tell the agent when a bug fix is done?

Sign in to answer, see the explanations, and get this lesson back as a quick review later.

Official docs: cursor.com/learn