Skip to main content
subagent CX Codex

code-review — Claude Code subagent: PR review via GitHub CLI

code-review — a subagent for Claude Code that reviews a pull request through gh and posts a comment listing confirmed bugs. Skips closed, draft, or already-reviewed PRs without prompting.

no license ★ 406 updated 2026-06-25

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/code-review.md
Open on GitHub

What code-review does

The subagent breaks the review into stages. Three Haiku agents first check whether the PR is worth reviewing at all — closed, draft, automated, or already seen. Then five Sonnet agents run in parallel, each taking a different angle: CLAUDE.md compliance, shallow bug scan, git blame history, comments from earlier PRs on the same files, and code comments in the modified files.

Every candidate issue gets a confidence score from 0 to 100. Only issues scoring 80 or above reach the final comment. That threshold filters out linter-level nitpicks, pre-existing bugs, and intentional functional changes — things a senior engineer would skip.

The comment includes a short bug description, a direct link to the line with the full commit SHA, and a quote from CLAUDE.md when the violation traces there. Build and type-checking are out of scope: the subagent assumes CI handles those separately. The gh CLI must be installed with read access to PRs and write access to comments.

What it helps with

  • catch bugs in a pull request without manually reading the diff
  • verify changes against project CLAUDE.md rules
  • filter false positives using a per-issue confidence threshold
  • post a review comment with links to exact lines and commit SHAs
  • skip draft, closed, or already-reviewed PRs automatically

Example prompts for the agent

  • Review pull request #42 for bugs
  • Check PR #17 against CLAUDE.md and flag any issues
  • Run code-review on the latest open PR in this repo

How to install code-review

Manually: put the files in place

.claude/agents/code-review.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about code-review

How do I install code-review in Claude Code?

Create the file .claude/agents/code-review.md in your repository root. Claude Code picks it up automatically from there.

What does the code-review subagent do?

It runs several parallel agents to check a PR for bugs, CLAUDE.md compliance, and historical context, then scores each finding and posts only those with a confidence of 80 or higher.

What does the subagent need to work?

The gh CLI must be installed with permissions to read PRs and write comments. The subagent routes all GitHub interaction through it.

Similar subagents

All subagents for Code review and refactoring →

From the same set26

The whole set →
adversarial-review adversarial-review subjects fresh builds to hostile inspection using isolated reviewer contexts and mandates empirical reproduction on the running system. CX Codex +1 ★ 406repo stars human-writing The human-writing skill guides an agent to shape prose around its language, voice, and format. Use it for articles, posts, headlines, and other writing tasks. CX Codex +1 ★ 406repo stars qa-manual-tester qa-manual-tester takes over a real browser and pokes at your app the way a tester would: clicks, typing, screenshots, console reads. Handy when a feature needs a hands-on pass. CX Codex ★ 406repo stars comparator comparator runs blind comparisons between two AI outputs against the original prompt. Identifies the stronger result without knowing which skill produced each file. CX Codex ★ 406repo stars change-core-self change-core-self asks you about the project, works out a fitting identity for the agent from scratch, and stores it as a rule file loaded on every session. CX Codex +1 ★ 406repo stars grader grader assesses agent execution transcripts and generated files against expectations, flags superficial passes, and critiques test assertions. CX Codex ★ 406repo stars create-phase The create-phase command clarifies a development phase through Q&A, then creates an HTML wireframe with the decisions needed for implementation in Claude Code plan mode. CX Codex +1 ★ 406repo stars visual The visual command turns a discussion into a self-contained HTML document with diagrams, wireframes and matrices the agent implements from in plan mode. CX Codex +1 ★ 406repo stars

Project sponsors

Companies that keep this analytics open