Vibe Coder · Unit 8: Building With Claude Code · Lesson 14 of 15

Reviewing diffs

Engineers: review agent-written code as you would a colleague’s: scope, correctness, tests and security, before it merges.

Read the short notes and pictures.Do everything inside a blue frame.

Reviewing agent code

Generated code can look tidy and still be wrong, insecure or more than you asked for. Review it with the same care as any pull request, and use a second agent as an extra reviewer, never as a replacement for you.

A 3D scene of coloured blocks and cards. Scope: only the files you expected, unrelated refactors, new dependencies you did not ask for.
Check that only the expected files changed.

A review checklist

  1. Scope

    Unexpected files, dependencies or config changes.

  2. Logic

    Follow the main path and one failure path.

  3. Security

    Input validation, auth checks, secrets, queries.

  4. Tests

    Do they assert behaviour? Try breaking the code to see one fail.

A 3D scene of coloured blocks and cards. : Real tests, Hollow tests.
A real test fails when the code is wrong.

Using an agent to review

A fresh session

A reviewer that did not write the code finds more.

A different model

Codex reviewing Claude Code’s work, or the reverse.

A specific brief

"Look only for security problems in this diff."

ActivityBuild stepThe first working version

Review a real pull request

Review your open pull request with the four-step checklist. Ask a fresh agent session to review it too, compare findings, fix what matters, and merge.

Done when

Add your checklist to CLAUDE.md as the project’s review standard.

Keep these

  • Check scope first.
  • Read logic, security and tests.
  • Use a fresh agent as a second reviewer.