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_reviewReviews the current branch against master by default.
To review against a different base branch:
/code_review developmentWhat it does
When you run /code_review, Claude:
- Pulls the latest commits from both the review branch and the base branch
- Diffs the review branch against the base (
git diff base...HEAD) - Spawns a background sub-agent (Claude Opus) to analyze the diff
- Synthesizes the findings into a structured report
- 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-featureCommit: a3f9c12 — feat: add new feature
Base Branch: masterCommit: 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:
| Grade | Meaning | Verdict |
|---|---|---|
| A | No issues | 🟢 APPROVED |
| B | Low severity only | 🟢 APPROVED |
| C | At least one Medium or High | 🟡 CONDITIONAL |
| D | At least one Critical | 🔴 REJECT |
| F | Two or more Critical | 🔴 REJECT |
Issue severity levels:
| Severity | Meaning |
|---|---|
| 🔴 Critical | Auth bypass, data loss, RCE — directly exploitable |
| 🟠 High | Logic error with clear impact under realistic conditions |
| 🟡 Medium | Defensive coding gap or latent bug, no direct exploit |
| 🔵 Low | Style 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
a3f9c12on branchfeature/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.mdMultiple 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