Skip to content

Code Review

The /code_review command runs a structured, multi-phase code review against a base branch and delivers the results directly to your Telegram chat.

Basic usage

/code_review

Reviews the current branch against master by default.

To review against a different base branch:

/code_review development

What it does

When you run /code_review, Claude:

  1. Pulls the latest commits from both the review branch and the base branch
  2. Diffs the review branch against the base (git diff base...HEAD)
  3. Spawns a background sub-agent (Claude Opus) to analyze the diff
  4. Synthesizes the findings into a structured report
  5. Delivers a summary to your Telegram chat and attaches the full report as a document

Initialization message

Once the review starts, Claude sends a confirmation message with branch and commit info:

💡 Code Review Initialization
Review Branch: feature/my-feature
Commit: a3f9c12 — feat: add new feature
Base Branch: master
Commit: b1d2e34 — chore: release v1.2.0
⏳ Processing...
This operation may take several minutes.
🔔 You will be notified upon completion.

Review output

When the review finishes, Claude sends a Telegram summary with:

  • Verdict🟢 APPROVED, 🟡 CONDITIONAL, or 🔴 REJECT
  • Grade — A through F
  • Issues found — each with severity, file, category, and description
  • Action checklist — items required before merge

Grades and verdicts:

GradeMeaningVerdict
ANo issues🟢 APPROVED
BLow severity only🟢 APPROVED
CAt least one Medium or High🟡 CONDITIONAL
DAt least one Critical🔴 REJECT
FTwo or more Critical🔴 REJECT

Issue severity levels:

SeverityMeaning
🔴 CriticalAuth bypass, data loss, RCE — directly exploitable
🟠 HighLogic error with clear impact under realistic conditions
🟡 MediumDefensive coding gap or latent bug, no direct exploit
🔵 LowStyle or consistency issue, no functional impact

If issues are found, the full report is also sent as a document (.md file) with detailed descriptions, code snippets, and suggested fixes for every issue.

Existing report detection

If a report already exists for the current commit, Claude asks:

A report already exists for commit a3f9c12 on branch feature/my-feature.

  • Send existing report
  • Re-review code

Choose Send existing report to retrieve the cached result instantly, or Re-review code to run a fresh analysis (useful after making fixes).

Report history

Reports are saved inside the active repository under:

.code-review-reports/<branch-name>/<commit-hash>_#<n>_<datetime>_code_review_report.md

Multiple reviews for the same commit are numbered (#0, #1, #2, …) so you can track how the quality changed between fix attempts.

Requirements

  • An active session with a cloned repository (/repo clone + /start)
  • The base branch must exist on the remote
  • The current branch must have commits that differ from the base