Give a clear task, review the diff, redirect early
After this, you'll be able to use Claude Code or Cursor's agent mode to make a targeted file change by writing a precise task description and reviewing the diff before accepting.
Complete Using AI code completion as a daily habit first; this lesson builds on using AI to generate and review code changes.
AI coding tools like Claude Code and Cursor don't just complete lines of code; they read your entire project and make actual file changes based on a task you describe in plain English. Your job in this workflow is three things: write a precise task description, review the diff the agent produces, and redirect it early if it goes wrong.
Now try it: pick a single function in a project you are working on and write a task description that names the file, the function, and the exact behavior you want changed. Review every line of the diff before accepting; reading diffs is the core skill of agent IDE use.
Paste this into Claude
I am working in [describe your project: what it is and what language it uses]. I need to make a change to [specific file name and function or section]. Right now it [describe the current behavior: what it does that is wrong or missing, one sentence]. I want it to [describe the desired behavior: what it should do instead, one sentence]. The change should not affect [describe any behavior that must stay the same]. When you are done, explain what you changed and why in one sentence. Do not change any other files without telling me why you need to.
Check yours against
Read every line of the diff, confirm the change does exactly what you described, and run the affected feature to verify nothing else broke.
Pulling this out of your own head now is the part that actually moves it into long-term memory. Re-reading only feels like it does.
From memory, think of one small change you want in your own project, not the exercise task. Write the task you'd give Claude Code or Cursor so it can't be misread, and what you'd do before accepting the result.
One good answer: 'In the contact form file, show an error message when the email box is empty. Before accepting, I'd read every line of the diff and try the form.' If your task has one behavior you can see working and you read the diff first, it holds. 'Improve the form' fails.
The agent IDE handles the editing; your job is the task description and the diff review. Vague tasks produce large diffs that touch files you didn't intend. Specific tasks produce small, targeted ones.