Fleet 1.13:Teams are now shipping 5x more PRs with autonomous pipelines.See what's new →
FleetFleet
Agent templateEngineering

Code Reviewer AI Agent (Template)

A code reviewer agent checks out pull requests, reads the diff in full, and publishes a structured review with inline comments, a summary of concerns, and an explicit approve or request-changes decision. It is distinct from a tech lead: the reviewer focuses on correctness, readability, and style compliance for each individual PR rather than cross-cutting architectural direction.

In Fleet, you configure a code reviewer using the pr-reviewer role (or tech-lead / qa-engineer), because review quality depends heavily on the prompt. A role-specific reviewer prompt encodes your style guide, the categories of bugs your codebase is prone to, and the threshold for blocking a merge. Without this, a generic agent produces superficial reviews that miss the class of issues your team actually cares about.

What this agent owns

  • Read the full diff and understand the intent of each change before commenting
  • Check for logic errors, off-by-one mistakes, and unhandled edge cases
  • Verify that naming, structure, and formatting match the project style guide
  • Confirm that tests cover the changed behavior, not just the happy path
  • Publish an explicit approve or request-changes decision with actionable feedback

Recommended model: Claude Opus

Catching subtle bugs and enforcing nuanced style guidelines requires careful reasoning that Opus handles more reliably than Sonnet.

Example tasks

  • Review a PR that refactors the authentication middleware
  • Check a database migration PR for irreversible destructive operations
  • Verify that a new API endpoint follows the project's REST conventions
  • Identify missing error handling in a third-party integration PR
# create an agent from this template, then start it
$ fleet agent create --name code-reviewer--vendor claude-code --template <template-name>
$ fleet agent start code-reviewer

Find the exact template name with fleet template list.

Run this agent in your fleet

One binary. Five minutes. See every agent, coordinate every handoff, and keep a full audit trail of what your fleet did.