Use cases · Claude Code

Code review with Claude Code: commands, rules and a standing reviewer

Claude Code has three kinds of review built in: /code-review in your own session, a deeper multi-agent review in the cloud with /code-review ultra, and managed Code Review, which comments on GitHub pull requests for Team and Enterprise plans. This page covers when to use each, the rules that keep comments useful and how to make review a job someone does every day.

What Claude Code does for code review

  • Reviews each pull request for bugs, missing tests and risky changes, and comments inline on GitHub.
  • Follows your written review rules, so comments stay off what the linter already checks.
  • Reviews its own changes, and other agents', before they reach a person.
  • Tracks follow-ups: a comment that needs work becomes an issue instead of getting lost.

Claude Code features for code review

FeatureWhat it doesHow to start
/code-reviewFinds correctness bugs in your branch's changes, or in a pull request, branch or path you name; /review is an alias/code-review high 142 --comment posts inline comments; --fix applies the fixes
/code-review ultraA multi-agent review in the cloud that verifies bugs before you merge/code-review ultra, or with a pull request number
Code Review (managed)Reviews pull requests on GitHub and comments inline; Team and EnterpriseAn Owner turns it on; anyone can comment @claude review
REVIEW.mdTunes what managed Code Review flags: severity, paths to skip, extra checksCommit it to the repository

How to set up Claude Code for code review

  1. Connect the tools

    /code-review needs nothing extra for your own branch. To review a pull request by number and post comments with --comment, work in a checkout of the repository with the GitHub CLI signed in.

    # Sign in to GitHub once
    gh auth login
    
    # Review pull request 142 at high effort and post inline comments
    /code-review high 142 --comment
  2. Write the rules in CLAUDE.md

    Claude Code reads CLAUDE.md at the start of every session, claude -p runs included. Put the job's rules there, or in a skill under .claude/skills/ if they're long. See the CLAUDE.md guide.

    ## Code Review Rules
    - Flag missing tests for new branches in billing/ and auth/.
    - Any SQL migration needs a rollback; say so if it doesn't have one.
    - Don't comment on formatting; the linter handles it.
    - Comment only: never approve, request changes or merge.
  3. Run it without the interactive interface

    claude -p runs one task and exits, so cron, CI or another tool can start it. Choose what it may do without asking with --allowedTools or --permission-mode; --output-format json returns the result with its cost.

    # Review a pull request from CI or cron; /code-review follows CLAUDE.md in -p runs
    claude -p "/code-review 142 --comment"
  4. Put it on a schedule

    Make it a cloud scheduled task with /schedule (Pro, Max, Ultra, Team and Enterprise), a desktop scheduled task, or /loop while a session stays open. See how to make Claude Code proactive.

Source: Claude Code documentation

Limits and safety

  • It comments; it doesn't own the change. Keep approvals and merges with people.
  • Reviews use your plan's usage. Review on request or when a pull request is ready, not on every push.
  • It reviews the diff and the repository. It can't test against production data.
  • Since Claude Code v2.1.302, claude -p starts in Manual mode: an action that needs approval is denied unless a rule allows it. Allow only the tools the job needs.

Claude Code or Codex for code review?

The rules carry over. Write them once in AGENTS.md and put @AGENTS.md in CLAUDE.md, and both agents read the same file.

Step by step for the other agent: code review with Codex.

Claude CodeCodex
Rules fileCLAUDE.mdAGENTS.md
Connect toolsclaude mcp addcodex mcp add or config.toml
Run without youclaude -pcodex exec
Schedule/schedule, desktop scheduled tasks, /loopScheduled tasks in the ChatGPT app, cron
Built in for code review/code-review, /code-review ultra, @claude review/review, codex review, @codex review
With Crewmark

Make code review someone's job

Commands run when someone remembers to run them. Crewmark turns your own Claude Code into an AI employee with a role, a goal in numbers, working hours and a heartbeat, so the work happens on schedule and shows up on a board.

  1. Start from the role

    The AI software engineer, with these rules in its brief.

  2. Put the work on its board

    Add the job as a recurring issue. The employee wakes on its heartbeat, does it and reports in a comment.

  3. Related

    AI code review on every PR compares every option, and security review covers vulnerabilities.

FAQ

How do I review a pull request with Claude Code?

Run /code-review <PR number> --comment in a session to post the findings as inline comments on GitHub. Without --comment it reports in the session; --fix applies the fixes to your working tree.

Does /code-review read REVIEW.md?

No. /code-review follows your CLAUDE.md, including in claude -p runs. REVIEW.md configures the managed Code Review service on GitHub.

What is /code-review ultra?

A deep, multi-agent review that runs in the cloud and verifies the bugs it finds before you merge. Run it on your branch, or pass a pull request number.

Can Claude Code review every pull request automatically?

Managed Code Review does that on Team and Enterprise plans. On any plan, a scheduled task or a Crewmark employee can run /code-review on whatever is ready for review.

Checked against Claude Code's and OpenAI's Codex documentation on November 13, 2026.

Hand code review to an AI employee on Claude Code.

Crewmark turns Claude Code and Codex sessions into AI employees with roles, goals, working hours and a heartbeat.