Tools Games AI
Back to Docs

Cursor Agent Mode: Rules, @Files, and Plan Prompts

Agent Mode Is Not Autocomplete

Cursor Agent can edit multiple files, run commands, and iterateโ€”but only if your prompt defines scope, success criteria, and verification. Vague "fix my app" prompts waste credits and break unrelated code.

Scoped Task Template

"In this repo only: fix the login redirect loop after OAuth. Touch at most auth/ and middleware.ts. Do not refactor unrelated modules. After changes, run npm test -- auth and report results. If tests fail, fix once then stop and summarize blockers."

@ Context Discipline

Reference exact files with @file / @folder. Tell the agent what each file is for. If something is missing, ask it to request paths instead of guessing.

Plan-First Prompt

"Before editing, output a 5-step plan: files to change, risks, tests to run. Wait for my 'go' unless the fix is a one-line typo."

Project Rules

Put non-negotiables in .cursor/rules or project rules: package manager, test command, formatting, banned patterns (e.g. no new dependencies without approval). Agents follow persistent rules better than repeated chat reminders.