✻Founding-member pricing: every lesson for $19/mo. The first 3 lessons are free. Start lesson 1 →
Unit 1 · Claude Code Foundations · Lesson 6 of 40

Code Review with Claude

Use Claude Code as a reviewer: /code-review on your branch, focused review prompts, a fresh-context second opinion and /security-review.

ACADEMY9 min+68 XP4-question quiz

🎯 By the end of this lesson you'll be able to

  • Run /code-review on local changes
  • Write review prompts that find real bugs
  • Use a fresh context for an unbiased second opinion
  • Know about deeper and automated review options

Two hats: author and reviewer

Claude is a strong author, but it's an equally strong reviewer. Review is where a coding agent quietly saves you the most time: catching the off-by-one, the missing await or the unhandled null before your teammates (or your users) do.

/code-review

The built-in /code-review reviews your current diff, a branch, a pull request number or a path. It looks for correctness bugs and reports findings ranked by severity.

text
/code-review                 # review the current changes
/code-review 482             # review pull request #482
/code-review --fix           # apply the fixes after reviewing

For a deep multi-agent review of a branch in the cloud, /code-review ultra launches a more thorough (and billed) review.

▶Watch it runReviewing a diff
Reviewing a diff

Prompts that produce useful reviews

A vague "review this" gets you vague style comments. Tell Claude what to look for and what to skip:

text
review the diff against main for correctness only: race conditions, error handling,
and edge cases around empty carts. skip style and naming.

If you're checking against a spec, say so, and say "skip style". Reviews get sharper when the reviewer knows the target.

✻
Fresh eyes beat self-review

The session that wrote the code is biased toward believing it works. For important changes, review in a fresh context: run /code-review, start a second session, or ask for a subagent reviewer. A second session makes a great reviewer.

Security reviews

/security-review focuses specifically on vulnerabilities in your pending changes: injection, auth mistakes, secrets in code and unsafe deserialization. Treat it as a smart first pass, not a replacement for your security process.

Review in the pull request

Teams can go further: Claude can review pull requests on GitHub and comment inline. You'll set up GitHub Actions and managed Code Review in Unit 8.

☑Practicesaved on this device

Check your understanding

?Lesson quiz10 XP per correct answer · +25 for a perfect score
QUESTION 1 OF 4

What makes a review prompt produce more useful findings?

Why: Targeted reviews ('correctness only, skip style') find real bugs.
QUESTION 2 OF 4

Why review in a fresh context?

Why: A reviewer that didn't write the code has no stake in it being right.
QUESTION 3 OF 4

Which command focuses on vulnerabilities in pending changes?

Why: /security-review looks specifically for security problems.
QUESTION 4 OF 4

What does /code-review --fix do?

Why: Review first, then apply the fixes automatically.
0 / 4 correct
Academy lesson

Unlock lesson 6 and the next 34

You've finished the free lessons. Join the Academy for $19/month to unlock every lesson, quiz, terminal simulation and puzzle, plus the final exam and your certificate of completion.

  • All 40 lessons across 9 units
  • 165+ quiz questions
  • Final exam + certificate
  • New lessons as Claude Code evolves
  • XP, streaks and badges
  • Cancel anytime

Already a member? Log in to continue.

Key takeaways

  • Claude is as valuable as a reviewer as it is as an author.
  • Focused review prompts find real bugs; vague ones find style nits.
  • Review in a fresh context for an unbiased second opinion.
  • Use /security-review as a smart first pass on risky changes.

Nice work. Lesson 6 done?

Mark it complete to earn +68 XP, keep your streak alive and unlock badges.

Written by Curtis Cornell from Anthropic's public Claude Code documentation. Last reviewed November 14, 2026. Claude Code changes fast; if something here differs from your version, the official docs win.

Start lesson 1 free →