Automated PR reviews by Claude Code for commits made by Codex and other AI agents. Like CodeRabbit, but for agent-to-agent code review.
Flow: Codex writes code → pushes a PR → Claude Code reviews it → posts a structured GitHub PR review with inline comments.
npm install -g multi-agent-review
cd your-project
mar init
# Reviews happen automatically when Codex finishes a turn.
# Or run manually:
mar review codex/my-feature- Node.js >= 20
- Claude Code CLI (
claudecommand) - GitHub CLI (
ghcommand, authenticated) - Codex CLI (optional, for automatic reviews)
-
mar initsets up your project:- Creates
.mar/config.jsonwith detected repo and branch defaults - Adds a
notifyhook to~/.codex/config.tomlso Codex triggers reviews automatically - Adds
.mar/to.gitignore
- Creates
-
When Codex finishes a turn, the notify handler checks:
- Is the branch a
codex/*branch? (configurable pattern) - Are there new commits since the last review?
- Is there an open PR for this branch?
- If all yes: spawns a background review
- Is the branch a
-
The review runs
claude -pwith a structured review prompt:- Reads the cumulative diff against the base branch
- Analyzes for security issues, bugs, performance problems, convention violations
- Returns structured JSON with findings
-
Posts to GitHub as a proper PR review:
- Summary with verdict and collapsible file walkthrough
- Inline comments on specific diff lines with severity badges
- Uses
COMMENTevent (advisory only, never blocks merges) - Updates existing review instead of posting duplicates
Add Claude reviews to any repo without installing the CLI:
# .github/workflows/review.yml
name: Claude Review
on: pull_request
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: TheCraigHewitt/multi-agent-review@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}| Input | Description | Required | Default |
|---|---|---|---|
anthropic_api_key |
Anthropic API key | Yes | — |
model |
Claude model to use | No | claude-sonnet-4-6 |
max_diff_lines |
Diff truncation limit | No | 5000 |
| Output | Description |
|---|---|
verdict |
Review verdict (clean, minor_issues, major_issues, critical) |
findings_count |
Number of findings |
Initialize in the current git repository. Detects the GitHub remote and base branch automatically.
Review a specific branch (defaults to current branch). Requires an open PR.
mar review codex/add-auth
# Preview review locally without posting to GitHub
mar review codex/add-auth --dry-runShow current configuration and recent review history.
Called automatically by Codex via the notify hook. Not intended for manual use.
After mar init, edit .mar/config.json:
{
"repo": "owner/repo",
"baseBranch": "main",
"branchPattern": "codex/*",
"model": "sonnet",
"reviewPrompt": null,
"maxDiffLines": 5000
}| Field | Description | Default |
|---|---|---|
repo |
GitHub owner/repo | Auto-detected |
baseBranch |
Branch to diff against | Auto-detected |
branchPattern |
Glob pattern for branches to review | codex/* |
model |
Claude model to use | sonnet |
reviewPrompt |
Path to custom review prompt | null (uses built-in) |
maxDiffLines |
Truncate diffs longer than this | 5000 |
Place a .mar/review-prompt.md in your project to override the default review prompt. The prompt receives the diff via stdin and should instruct Claude to return JSON matching the review schema.
PR reviews include a summary comment:
## Code Review
**Verdict:** Minor issues found (2 findings)
**Summary:** Adds token validation to the auth flow and updates session access control.
<details>
<summary>Walkthrough (3 files changed)</summary>
| File | Change |
|------|--------|
| `src/routes/auth.ts` | Add Zod validation for token exchange |
| `src/services/token-service.ts` | Extract token parsing helper |
| `src/routes/__tests__/auth.test.ts` | Add malformed token tests |
</details>And inline comments on specific lines:
**warning** Missing input validation on the token parameter.
\`\`\`suggestion
const token = z.string().min(1).parse(req.body.token);
\`\`\`
MIT