How Claude Code edits work
Claude Code doesn't push changes blindly. Every file edit follows a confirm-before-write pattern that keeps you in control.
How to read a diff
A diff is the most important document in the edit workflow. Here's how to read one quickly and catch problems before they land in your codebase.
undefined vs false return bug AND a Date.now() / 1000 unit bug. If you only asked for the first fix, this is scope drift. Not necessarily bad, but you need to see it and decide. Always ask: did Claude fix more than I asked for?Git is your undo button
The single habit that makes Claude Code sessions fearless: commit before every significant AI-assisted change. Git turns "Claude broke something" into a five-second recovery.
"I don't fear Claude making a mistake. I fear not having a commit to roll back to."
Common wisdom from experienced Claude Code usersgit checkout -b claude/fix-token-validationgit checkout -- filename instead.When Claude gets it wrong
It will happen. Claude misunderstands scope, misses context, or produces code that passes your review but fails at runtime. Here's how to handle it cleanly.
/undo. This reverts the most recent file write. It's the fastest recovery for a change you haven't committed yet.git checkout main and delete the branch. Your main branch is untouched. Start fresh with a sharper prompt.Make your first real edit today
Pick something real, not a toy project. A bug, a missing feature, a function that needs a test. Work through the full workflow: branch → prompt → diff review → accept → commit.
- Created a feature branch before starting the session
- Reviewed the full diff before accepting any change
- Identified at least one case of scope drift or unexpected change in the diff
- Successfully applied a change and committed it
- Used /undo or git checkout to roll back at least once (practice it)
- Asked Claude to explain its approach before a complex edit
- Ended the session with a clean commit and a one-paragraph summary of what changed
Week 01 complete
You've covered the full foundation: mental model, installation, code reading, prompting technique, and real edits. Week 02 starts with writing tests, the skill that amplifies everything else you've built this week.
Take the weekend. Use Claude Code on a real task. Notice what feels natural and what still feels awkward. That gap is your Week 02 curriculum.