gh-pr-reviewClaude Skill

Review GitHub pull requests using the gh-pr-review extension.

43.9k Stars
4.1k Forks
2024/05/24

Install & Download

Linux / macOS:

请登录后查看安装命令

Windows (PowerShell):

请登录后查看安装命令

Download and extract to ~/.claude/skills/

namegh-pr-review
descriptionAutomated code review for local branches, PRs, commits, and files. Supports single-agent review with interactive fix selection, or multi-agent deep review with reviewer-verifier adversarial mechanism and risk-based auto-fix.
<!-- Based on https://github.com/Tencent/tgfx/tree/main/.codebuddy/skills/cr --> <!-- Adapted for Claude Code Agent tool and Cherry Studio tech stack -->

/gh-pr-review — Code Review

Automated code review for local branches, PRs, commits, and files. Detects review mode from arguments and routes to the appropriate review flow — either quick single-agent review with interactive fix selection, or multi-agent deep review with risk-based auto-fix.

All user-facing text matches the user's language. All questions and option selections MUST use your interactive dialog tool (e.g. AskUserQuestion) — never output options as plain text. Do not proceed until the user replies. When presenting multi-select options: ≤4 items → one question. >4 items → group by priority or category (each group ≤4 options), then present all groups as separate questions in a single prompt.

Route

Run pre-checks, then match the first applicable rule top-to-bottom:

  1. git branch --show-current → record whether on main/master.
  2. git status --porcelain → record whether uncommitted changes exist.
  3. Check whether the current environment supports Agent tool with parallel subagents (agent teams).
#ConditionAction
1$ARGUMENTS is diagreferences/diagnosis.md
2$ARGUMENTS is a PR number or URL containing /pull/references/pr-review.md
3Agent teams NOT supportedreferences/local-review.md
4Uncommitted changes existreferences/local-review.md
5On main/master branchreferences/local-review.md
6Everything else→ Question below

Each means: Read the target file and follow it as the sole remaining instruction. Ignore all sections below. Do NOT review from memory or habit — each target file defines specific constraints on how to obtain diffs, apply fixes, and submit results.


Question

Ask a single question: "Agent Teams is available (multiple agents working in parallel). Enable multi-agent review with reviewer–verifier adversarial mechanism and auto-fix?" Provide 4 options:

OptionDescription
Teams + auto-fix low & medium risk (recommended)Multi-agent review; auto-fix most issues, only confirm high-risk ones (e.g., API changes, architecture).
Teams + auto-fix low riskMulti-agent review; auto-fix only the safest issues (e.g., null checks, typos, naming). Confirm everything else.
Teams + auto-fix allMulti-agent review; auto-fix everything. Only issues affecting test baselines are deferred.
Single-agent + manual fixSingle-agent review; interactively choose which issues to fix afterward.

Hand off

OptionFIX_MODE
Teams + auto-fix low & medium risk (recommended)references/teams-review.mdlow_medium
Teams + auto-fix low riskreferences/teams-review.mdlow
Teams + auto-fix allreferences/teams-review.mdfull
Single-agent + manual fixreferences/local-review.md

Pass $ARGUMENTS to the target file. For teams-review, also pass FIX_MODE (low / low_medium / full).

Similar Claude Skills & Agent Workflows