Review what Claude wrote
Trust but verify — always review before committing
⏱ Est. ~5 min
01 · Read
Claude Code is powerful, but not perfect. Just like you'd review a coworker's code before merging, you should always review what Claude writes before committing.
This isn't distrust — it's being a responsible engineer. Even experienced human engineers get their code reviewed. The habit of reviewing changes is what separates people who use AI well from people who use it badly.
Good news: you already know the tool. It's git diff.
02 · Real-machine exercise
After Claude makes changes to your project, review them with git diff. It shows you, line by line, what was added, removed, and changed.
git diff
03 · Read
Reading a diff is a skill. Quick refresher on what you're looking at:
Key points
- Green lines (starting with +) are added code
- Red lines (starting with -) are removed code
- Test in the browser — does the change actually work as expected?
- If you're happy, stage and commit
- If something's wrong, tell Claude what to fix — iterate!
04 · Quiz
In git diff, what color represents added lines?
05 · Fill in the blank
Before committing Claude's changes, always run git _____ to review them.
06 · Checklist
Use this code review checklist for every Claude change. Make it a habit — it takes one minute and saves hours of debugging.
- I ran git diff to see what changed
- I understand what the changes do
- I tested it in the browser
- I'm ready to commit (or keep iterating)
Other lessons in this chapter
⚠ The full interactive experience needs JavaScript. Please enable it and reload.
※ This is an independent Traditional Chinese teaching project — not an official Anthropic product. Claude™ is a trademark of Anthropic, PBC.