# Anthropic's NEW Claude Code Review Agent (Full Open Source Workflow) <!-- ref: @content/youtube/patrick-ellis/2025-09-14-anthropic-claude-code-review-agent-open-source-workflow version: 3 updated_at: 2026-10-31T18:24:35.575Z --> Claude Code (Patrick Oakley Ellis, 2025-09-14): The Claude Code team stopped reviewing most of their own pull requests line by line — Claude Code is now roughly 95% written by Claude Code, and the PRs it produces are larger than a human can meaningfully read. *Synthesized from Patrick Oakley Ellis on Patrick Oakley Ellis, 2025-09-14.* Patrick Oakley Ellis is the CTO and co-founder of a Seattle-based AI-native startup that has worked with Google, Microsoft, Coca-Cola, Nike, and Disney, and has been running Claude Code since its February 2025 release. ## Core Thesis The Claude Code team stopped reviewing most of their own pull requests line by line — Claude Code is now roughly 95% written by Claude Code, and the PRs it produces are larger than a human can meaningfully read. Anthropic's answer was to have a separate Claude instance do the mechanical review while humans do something closer to acceptance testing, and they have open-sourced the tooling. Ellis argues the real bottleneck in AI-native development has moved from code generation to code review, and walks through implementing Anthropic's playbook across slash commands, subagents, and GitHub Action runners. ## Key Insights - Anthropic's CPO describes the Claude Code team as patient zero for this way of working: they began with conventional line-by-line PR review, concluded Claude is usually right, and shifted humans to acceptance-style review over another Claude's analysis. - **The bottleneck moved.** Pre-agent, generation and review were roughly balanced. Agents multiply output volume, so review has to scale with it — and simultaneously has to become *more* diligent, because agent hallucinations show up as subtle security issues or quiet deviations from codebase patterns rather than obvious breakage. - Ellis rejects the common claim that Claude Code fails on large codebases: in his experience it is the messy environment, not a model limitation. - **Split the review by comparative advantage.** Machines handle pattern matching, fast analysis, and consistent analysis — security scanning, bug detection, syntax, completeness, style-guide adherence, and checking the PR against the acceptance criteria written into the original issue or spec. Humans keep the strategic layer: what business problem this solves, architectural fit, whether the UI/UX actually looks and feels right. - **Inner loop vs. outer loop.** The inner loop is you working interactively with Claude Code via slash commands and subagents to shape a PR. The outer loop is GitHub Action runners using Claude Code's headless mode to do an automated first pass once the PR exists. Both are worth instrumenting; they use different mechanisms. - **The orchestration layer has three parts** — context, tools, validators — a framing Ellis credits to Sean Grove of OpenAI at the AI Engineer World's Fair. Context means prompts, docs, the codebase, CLAUDE.md, business objectives, stack architecture, service docs, and enough detail in the ticket itself. Tools means codebase search, web search, and MCPs like Playwright for screenshots. Validators means architecture guidelines, code styles, and — most powerfully — explicit paired examples of good output and bad output. - **Engineering process encapsulation.** Your team's architectural principles, security expertise, SEO knowledge, or design judgment can be packaged into a markdown file — a subagent, slash command, CLAUDE.md section, GitHub Action, or MCP — and handed to anyone. Ellis's point is that you no longer need every discipline in house, only the markdown files from people who have it. - **Subagents preserve the main thread's context.** Ellis routes his pragmatic code review through a subagent specifically so the review's intermediate reasoning doesn't consume the main thread's 200k token window; the main thread receives only the executive summary. - **Give the model a role.** Framing a prompt as "you're a staff-level site reliability engineer focused on X" pulls the model toward the relevant regions of its training. Ellis applies this in every agent definition, not just interactive prompts. - Anthropic's own repos are the underrated resource — not just the content of the workflows, but the formatting conventions. Ellis specifically points at the `claude-code-action` repo (v1 exposes the Claude Code SDK to TypeScript, Python, CLI, and bash environments), its `examples/` folder of copy-ready YAML, the `claude-code-security-review` repo where he found the security slash command's source, and a `src/create-prompt` TypeScript file that shows how Anthropic compiles the master system prompt — including how it instructs Claude to manage a to-do list and gather context. - The shipped `/security-review` command works off recently diffed files, runs a full audit criteria set, has a defined structured-output format with severity ratings, and — importantly — carries an explicit workflow for excluding false positives. The GitHub Action version stays silent when it finds nothing. - **Agents mirror their environment**, so a clean codebase is itself an input to review quality, maintained in a loop by the automated reviews. ## Actionable Takeaways 1. Update Claude Code and use the two built-in slash commands: `/review` (defaults to the current PR, or pass "review the last three commits") and `/security-review`. No setup required. 2. Run `/install-github-app` in the terminal. It opens a GitHub OAuth flow and opens a PR in your repo adding two workflow files to `.github/workflows` — a Claude Code runner and a code-review runner. 3. In those workflow YAMLs, uncomment and set the model parameter to Opus — Ellis's explicit pro tip. Replace the default bullet-point prompt with your own distilled review criteria, and grant the already-included GitHub MCP so the runner can post and edit inline PR comments in real time. 4. Wrap your review command in a subagent rather than running it in the main thread, with an explicit list of allowed bash commands and MCPs, so review context never touches your 200k window. 5. Build your review criteria the way Ellis did: run a deep research report (he prefers Gemini over ChatGPT for this — Google's index plus first-party integrations like YouTube), then feed that report plus Anthropic's `create-prompt` source plus their open-source YAML format into Gemini Deep Think, which runs multiple Gemini 2.5 Pro passes in parallel and aggregates. Customize the result for your repo. 6. Anchor security review on an established framework such as the OWASP Top 10 rather than inventing categories. 7. Include paired good-output and bad-output examples inside every subagent, slash command, and Action prompt — this is the validator that makes review consistent. 8. Mine community collections for agent definitions and merge the best into one workflow: a widely shared agents repository with over 11,000 stars covering data engineer, data scientist, debugger, and security specialist roles; a `claude-code-templates` repo at about 5.4k stars; and a claude-code-commands site built by a colleague of Ellis's hosting downloadable commands. 9. Look past code review for the next bottleneck — product management and spec development are the same shape of manual choke point. ## Notable Quotes > "Claude is generally right and it's producing pull requests that are probably larger than most people are going to be able to review." — Anthropic's CPO, in a clip played by Patrick Oakley Ellis > "It's not the actual fundamental model's problem. It's the environment that's messy that they're putting them in." — Patrick Oakley Ellis > "You are only as good as what you're told and what you're able to search around and find out." — Patrick Oakley Ellis > "You don't need to be an expert, you just need to know where to find the expertise." — Patrick Oakley Ellis --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*