From Zero to Deploy · Module 1 · Lesson 1.5
1.5 Talking to Claude Code
How to ask, review, interrupt, and start over. The way of working you'll use in every project.
A good request has four parts
- What: what you want to exist or change.
- Where: which file or part of the app.
- How you’ll know it works: what you’ll see when it’s right.
- Limits: what not to do.
Compare:
fix the button
In index.html, the "Add" button does nothing when I click it. I want it to add the text from the input to the list below and clear the input. Don't change how the page looks.
The second request has everything: what, where, how you’ll know it works, and a limit. The AI doesn’t have to guess.
Ask for a plan before code
For anything bigger than a small change, ask for a plan first:
Before changing any files, explain in a few lines how you plan to do this.
Reading the plan takes 30 seconds and saves half an hour of code going in the wrong direction. Claude Code also has a plan mode, where it only plans and doesn’t edit anything. Press Shift+Tab to switch between modes. Copilot CLI and Cursor use Shift+Tab too; in Codex, type /plan.
Mention files by name
Claude Code reads project files when it needs to, but you can point it straight at one: type @ and the start of the file name (for example, @index.html) to include it in your request.
Reviewing what it does
Before editing, Claude Code shows you the change: removed lines in red, new lines in green. Read it before approving. If you don’t understand it, ask:
Before I approve: what does this change do and why is it needed?
When things go wrong
| Situation | What to do |
|---|---|
| It started doing something you didn’t want | Press Esc to interrupt |
| The change turned out badly | Type /rewind (or press Esc twice with the input empty), pick the request before the change, and choose Restore code. It undoes the files Claude edited. For older versions, there’s Git, from the first app module |
| The conversation got long and confused | Type /clear and start over, explaining the context in a few lines |
| You closed the terminal by accident | Run claude -c in the same folder to pick up where you left off |
| Situation | What to do |
|---|---|
| It started doing something you didn’t want | Press Esc to interrupt |
| The change turned out badly | Codex has no undo command. Ask it to undo the change and check with /diff. From the first app module on, Git saves every version |
| The conversation got long and confused | Type /new and start over, explaining the context in a few lines |
| You closed the terminal by accident | Run codex resume in the same folder and pick the conversation |
| Situation | What to do |
|---|---|
| It started doing something you didn’t want | Press Esc twice, quickly, to stop it |
| The change turned out badly | Type /rewind, pick the request before the change, and choose to restore the files too |
| The conversation got long and confused | Type /clear and start over, explaining the context in a few lines |
| You closed the terminal by accident | Run copilot --continue in the same folder to pick up where you left off |
| Situation | What to do |
|---|---|
| It started doing something you didn’t want | Stop it in the agent panel |
| The change turned out badly | Find the request before the change and click Restore Checkpoint. It undoes the files, but the messages stay. For older versions, there’s Git, from the first app module |
| The conversation got long and confused | Start a new chat and explain the context in a few lines |
| You closed Cursor by accident | Open the folder again: your past chats are still in the agent panel |
The working loop
Mark it complete to track your progress.