From pr-review
Review a GitHub PR: calibrated inline comments via gh CLI. Use --deep for multi-lens review with confidence scoring.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pr-review:pr-reviewThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Review the GitHub pull request specified in $ARGUMENTS. If no argument is given, detect the current PR via `gh pr view`.
Review the GitHub pull request specified in $ARGUMENTS. If no argument is given, detect the current PR via gh pr view.
Supports two modes:
--deep): four parallel review lenses + confidence scoring — slower, more thorough, filters false positives.Extract a PR number from $ARGUMENTS. Accept: bare number (42), hash-prefixed (#42), or full GitHub URL. If empty, run gh pr view --json number to get the current branch's PR.
Parse flags from $ARGUMENTS:
--deep → enable deep multi-lens mode--dry-run → print review to terminal without posting to GitHub--approve → post as an approval (if no blocking issues)Before looking at the diff, understand the repo's current state. Run these commands:
gh repo view --json name,description,createdAt,pushedAt
git rev-list --count HEAD
ls -1
Also check whether these exist: README.md, test directories (test/, tests/, spec/, __tests__/), CI config (.github/workflows/, .circleci/, .travis.yml), linter config (.eslintrc*, .rubocop*, pyproject.toml, ruff.toml, .golangci*).
Use this to classify repo maturity — greenfield, growing, or mature — before forming any opinions.
gh api repos/{owner}/{repo}/languages
Also check for framework and tooling signals by looking for: package.json, tsconfig.json, go.mod, Cargo.toml, pyproject.toml, requirements.txt, Gemfile, pom.xml, build.gradle, docker-compose.yml, or similar. Note the primary languages, frameworks, and build tools.
From the detected stack, build a short internal list of the most relevant best-practices references for those technologies. This list is for calibration — do NOT include it in the review output.
gh pr view $PR_NUMBER --json title,body,baseRefName,headRefName,headRefOid,author,additions,deletions,changedFiles
gh api repos/{owner}/{repo}/pulls/$PR_NUMBER/comments
gh api repos/{owner}/{repo}/pulls/$PR_NUMBER/reviews
Treat existing feedback as first-class input.
{path, original_position?, body} (be forgiving about small text differences).gh pr diff $PR_NUMBER
If --deep is set, gather git history for context. Cap at 10 files (by lines changed) and 10 commits per file:
# For each touched file (up to 10):
git log --oneline -10 -- <file>
git log --all --oneline --grep="revert" -- <file>
Read the three shared agent files and apply them for the rest of this skill:
${CLAUDE_SKILL_DIR}/../../agents/shared/calibration.md (repo maturity, tech-stack, edge-case rigor, research discipline, DRY policy, verify-before-flagging)${CLAUDE_SKILL_DIR}/../../agents/shared/taxonomy.md (comment labels, blocking rules, quantitative limits)${CLAUDE_SKILL_DIR}/../../agents/shared/style.md (voice, emoji, tone)--deep)Load the reviewer persona:
${CLAUDE_SKILL_DIR}/../../agents/reviewer.mdUsing the persona and shared foundations, produce:
@@ hunk header — NOT the actual line number), and comment bodyCalibrate depth to repo maturity (see calibration.md). Keep comments high-signal and concise.
--deep)Read the four lens agent files:
${CLAUDE_SKILL_DIR}/../../agents/lens-general.md${CLAUDE_SKILL_DIR}/../../agents/lens-security.md${CLAUDE_SKILL_DIR}/../../agents/lens-architecture.md${CLAUDE_SKILL_DIR}/../../agents/lens-git-history.mdLaunch 4 Agent calls in parallel. Each agent receives:
Additionally, the git-history lens receives the git log output gathered in Step 2.
Each lens produces structured findings. Do not let findings from one lens influence another — they must be independent.
Collect all structured findings from all 4 agents into a single list. Each finding has: {file, lines, label, body, severity, reasoning, lens}.
Load the confidence scorer:
${CLAUDE_SKILL_DIR}/../../agents/confidence-scorer.mdFeed the scorer:
The scorer runs 3 passes:
Only Medium+ findings survive.
Produce:
--dry-run mode: Print the review body and all inline comments to the terminal. Do not post to GitHub.
Default and --approve mode: Post via gh api:
gh api repos/{owner}/{repo}/pulls/$PR_NUMBER/reviews \
--input - << 'EOF'
{
"commit_id": "<HEAD_SHA>",
"body": "<overall verdict>",
"event": "<COMMENT|APPROVE|REQUEST_CHANGES>",
"comments": [
{"path": "file.js", "position": 4, "body": "issue: ..."}
]
}
EOF
Use REQUEST_CHANGES only if there are blocking issue: comments. Use APPROVE only if --approve was passed and there are no blocking issues. Otherwise use COMMENT.
In deep mode, only post Medium+ findings as inline comments.
Print a one-line summary:
npx claudepluginhub asbarron/claude-skills --plugin pr-reviewReviews GitHub pull requests end-to-end using the gh CLI. Covers diff analysis, commit history, CI checks, and severity-leveled feedback submission.
Reviews a pull request for code quality and correctness. Use when asked to review a PR or when running as an automated PR reviewer.