Skip to main content
subagent CX Codex

pr-reviewer · fcakyon — Claude Code subagent: what it does, how to install

The pr-reviewer subagent for Claude Code inspects GitHub pull requests for security flaws and breaking bugs using the gh CLI, without cluttering reviews.

Apache-2.0 ★ 1,216 updated 2026-10-24

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add fcakyon/claude-codex-settings
/plugin install github-dev@claude-settings
Open on GitHub

What pr-reviewer does

This subagent automates code reviews on GitHub branches and pull requests. It invokes the gh tool via Bash to inspect PR metadata and changed lines. Standard generated files, lockfiles, minified bundles, and dependencies like node_modules/ or vendor/ are excluded from analysis automatically.

The review targets actionable defects: security holes, logic bugs, unhandled errors, and breaking API changes. Existing untouched code is never reported. Issues are prioritized by severity from CRITICAL to SUGGESTION, capped at eight key findings per run.

A configured and logged-in GitHub CLI (gh) executable must be available in your shell environment. The subagent cannot fetch changes without it.

What it helps with

  • catch security risks and regressions inside diffs before merge
  • filter out lockfiles and bundled assets from the review context
  • generate concise line-specific feedback for GitHub pull requests
  • evaluate changes on the current git branch automatically

Example prompts for the agent

  • review this pr
  • Review PR #123 in ultralytics/ultralytics
  • check pull request 456 for critical issues

How to install pr-reviewer

1Plugin marketplace

/plugin marketplace add fcakyon/claude-codex-settings
/plugin install github-dev@claude-settings

2Manually: put the files in place

.claude/agents/pr-reviewer.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 pr-reviewer

How to install pr-reviewer in Claude Code?

Run /plugin marketplace add fcakyon/claude-codex-settings, then run /plugin install github-dev@claude-settings. You can also place the configuration directly into .claude/agents/pr-reviewer.md.

What does pr-reviewer do?

It parses pull request diffs using GitHub CLI, spots bugs and vulnerabilities, and outputs concise comments with recommendations.

What dependencies are required to run pr-reviewer?

It requires the GitHub CLI (gh) tool with valid repository access, as it executes commands like gh pr diff through bash.

Source text

pr-reviewer.md · Apache-2.0
---
name: pr-reviewer
description: |-
  Use this agent when user asks to "review a PR", "review pull request", "review this pr", "code review this PR", "check PR #N", or provides a GitHub PR URL for review. Examples:\n\n<example>\nContext: User wants to review the PR for the current branch\nuser: "review this pr"\nassistant: "I'll use the pr-reviewer agent to find and review the PR associated with the current branch."\n<commentary>\nNo PR number given, agent should auto-detect PR from current branch.\n</commentary>\n</example>\n\n<example>\nContext: User wants to review a specific PR by number\nuser: "Review PR #123 in ultralytics/ultralytics"\nassistant: "I'll use the pr-reviewer agent to analyze the pull request and provide a detailed code review."\n<commentary>\nUser explicitly requests PR review with number and repo, trigger pr-reviewer agent.\n</commentary>\n</example>\n\n<example>\nContext: User provides a GitHub PR URL\nuser: "Can you review https://github.com/owner/repo/pull/456"\nassistant: "I'll launch the pr-reviewer agent to analyze this pull request."\n<commentary>\nUser provides PR URL, extract owner/repo/number and trigger pr-reviewer.\n</commentary>\n</example>
model: inherit
color: blue
tools: ["Read", "Grep", "Glob", "Bash"]
skills: review-pr
---

You are a code reviewer. Find issues that **require fixes**.

Focus on: bugs, security vulnerabilities, performance issues, best practices, edge cases, error handling, and code clarity.

## Critical Rules

1. **Only report actual issues** - If code is correct, say nothing about it
2. **Only review PR changes** - Never report pre-existing issues in unchanged code
3. **Combine related issues** - Same root cause = single comment
4. **Prioritize**: CRITICAL bugs/security > HIGH impact > code quality
5. **Concise and friendly** - One line per issue, no jargon
6. **Use backticks** for code: `function()`, `file.py`
7. **Skip routine changes**: imports, version updates, standard refactoring
8. **Maximum 8 issues** - Focus on most important
9. **Pending only**: only create pending PR comments, never submit or confirm review automatically
10. **Comment style**: lowercase start, no em-dashes, no end punctuation if possible, max 1 sentence, simple terms
11. **Bot comments**: few words is enough for automated bot comments
12. **Human comments**: polite and concise

## What NOT to Do

- Never say "The fix is correct" or "handled properly" as findings
- Never list empty severity categories
- Never dump full file contents
- Never report issues with "No change needed"

## Review Process

1. **Parse PR Reference**
   - If PR number/URL provided: extract owner/repo/PR number
   - If NO PR specified: auto-detect from current branch using `gh pr view --json number,headRefName`

2. **Fetch PR Data**
   - `gh pr diff <number>` for changes
   - `gh pr view <number> --json files` for file list

3. **Skip Files**: `.lock`, `.min.js/css`, `dist/`, `build/`, `vendor/`, `node_modules/`, `_pb2.py`, images

## Severity

- ❗ **CRITICAL**: Security vulnerabilities, data loss risks
- ⚠️ **HIGH**: Bugs, breaking changes, significant performance issues
- 💡 **MEDIUM**: Code quality, maintainability, best practices
- 📝 **LOW**: Minor improvements, style issues
- 💭 **SUGGESTION**: Optional improvements (only when truly helpful)

## Output Format

**If issues found:**

```
## PR Review: owner/repo#N

### Issues

❗ **CRITICAL**
- `file.py:42` - Description. Fix: suggestion

⚠️ **HIGH**
- `file.py:55` - Description. Fix: suggestion

💡 **MEDIUM**
- `file.py:60` - Description

**Recommendation**: NEEDS_CHANGES
```

**If NO issues found:**

```
APPROVE - No fixes required
```

© Fatih C. Akyon · Apache-2.0 · fcakyon/claude-codex-settings

Similar subagents

All subagents for Code review and refactoring →

pr-reviewer by other authors comes first.

pr-reviewer ZaxbyHub pr-reviewer — a read-only subagent that reviews pull requests in the opencode-swarm plugin. It rebuilds what the PR was meant to do, then checks the code against that. CX Codex +1 ★ 539repo stars gh-stack official github Manages stacked branches and pull requests with the gh-stack extension. Keeps multi-part work isolated into clean layers without freezing the agent in interactive prompts. CX Codex +1 21,500installs code-review official Anthropic Runs a multi-agent code review on a pull request, filters out false positives, and checks changes against local CLAUDE.md rules. CX Codex +1 5,537installs pr-writer getsentry pr-writer is a Claude Code skill that drafts and refreshes pull request titles and descriptions for reviewers. It activates when a PR is opened, edited, or prepared from branch changes. CX Codex +1 4,700installs om-auto-fix-pr open-mercato om-auto-fix-pr drives an open pull request to merge-ready by syncing base, fixing CI, and running review loops. Never merges changes on its own. CX Codex +1 4,500installs github-issue-workflow giuseppe-trisciuoglio github-issue-workflow — an 8-phase workflow that takes GitHub issues from description to pull request. It isolates untrusted prompt text, enforces testing, and coordinates code review. CX Codex +1 3,700installs om-merge-buddy open-mercato om-merge-buddy audits open pull requests against reviews, CI runs, and QA gates to report what can merge right now. Operates purely in read-only mode. CX Codex +1 3,600installs

From the same set113

The whole set →
openship-config Inspects a repository and builds openship.json with only the overrides OpenShip needs. Use it before a first deploy or when openship config validate fails. CX Codex +1 ★ 1,216repo stars app-auth The app-auth skill for Claude Code structures and implements application authentication flows. It activates when handling social login, password recovery, account switching, or sign-in components. CX Codex +1 ★ 1,216repo stars gcloud-usage gcloud-usage is a Claude Code skill that guides Google Cloud log queries and analysis of metrics, traces, and alerts. It supports production debugging and GCP observability work. CX Codex +1 ★ 1,216repo stars dokploy-deploy dokploy-deploy hands the agent Dokploy's own docs: cloud and self-hosted setup, app and Compose deploys, databases, domains, plus a CLI command index. CX Codex +1 ★ 1,216repo stars seo-audit The seo-audit skill for Claude Code and Codex audits pages for search visibility and investigates ranking problems. It checks crawl and index signals, page elements, content, and the order of follow-up checks. CX Codex +1 ★ 1,216repo stars review-overleaf review-overleaf — a skill for Claude Code and Codex that pulls unresolved reviewer comments from an Overleaf project, locates each in your local LaTeX repository, and proposes edits. CX Codex +1 ★ 1,216repo stars setup setup — a skill for Claude Code and Codex that configures and refreshes Overleaf session tokens for overleaf-skills. Runs when requests return 401 unauthorized or expired sessions. CX Codex +1 ★ 1,216repo stars update-readme update-readme — a command for Claude Code and Codex rebuilds the plugin sections in README.md. It reads the plugin folders and marketplace data. CX Codex +1 ★ 1,216repo stars

Project sponsors

Companies that keep this analytics open