Review and Fix PR
Description
@description Review an existing PR with parallel agents, fix findings, and push. @arguments $PR_NUMBER: GitHub PR number to review and fix Read PR #$PR_NUMBER thoroughly using `gh pr view`. Understand
Installation
claude install-skill https://github.com/trailofbits/claude-code-config README
Review and Fix PR
@description Review an existing PR with parallel agents, fix findings, and push. @arguments $PR_NUMBER: GitHub PR number to review and fix
Read PR #$PR_NUMBER thoroughly using `gh pr view`. Understand the full context: description, linked issues, commit history, and the diff against the base branch.
Detect the upstream repository: if a git remote named `upstream` exists, use it as the canonical repo. Otherwise, fall back to `origin`. Resolve the canonical repo's `owner/name` (e.g. from `git remote get-url upstream`) and store it — use `--repo ` on every `gh` command to ensure they target the correct repository. Run `git fetch ` to ensure you are working with up-to-date code.
Check out the PR branch locally.
Execute every step below sequentially. Do not stop or ask for confirmation at any step.
1. Review
Run two review passes in parallel, then merge findings.
Pass A — pr-review-toolkit agents
Launch these Task tool agents **in parallel** (single message, multiple tool calls), each with `subagent_type` from the pr-review-toolkit plugin. Tell each agent which files changed (from `git diff --name-only ...HEAD`):
| agent | focus |
|---|---|
pr-review-toolkit:code-reviewer |
Code quality, style, project guidelines |
pr-review-toolkit:silent-failure-hunter |
Silent failures, swallowed errors, bad fallbacks |
pr-review-toolkit:pr-test-analyzer |
Test coverage gaps and missing edge cases |
Pass B — external second opinion
Launch these Task tool agents **in parallel with Pass A** — all 5 agents in a single message, multiple tool calls. Each uses `subagent_type: general-purpose`.
**Codex reviewer** — tell the agent to run:
codex review --base / \
-c model='"gpt-5.3-codex"' \
-c model_reasoning_effort='"xhigh"'
- undefined
**Gemini reviewer** — tell the agent to run:
git diff /...HEAD > /tmp/pr-review-diff.txt
# Build prompt file (avoids heredoc shell expansion issues)
{
echo "Review this diff for code quality, bugs, and improvements."
if [ -f CLAUDE.md ] || [ -f .claude/CLAUDE.md ]; then
echo ""
echo "Project conventions:"
echo "---"
cat CLAUDE.md .claude/CLAUDE.md 2>/dev/null
echo "---"
fi
echo ""
echo "Diff:"
cat /tmp/pr-review-diff.txt
} > /tmp/pr-review-prompt.txt
# Pipe prompt via stdin to avoid shell metacharacter issues
cat /tmp/pr-review-prompt.txt | gemini -p - \
-m gemini-3-pro-preview \
--yolo
- undefined
Related Skills
使用 Git Worktrees
创建孤立的 Git worktrees,带有智能目录选择与安全验证。
Git community Claude skills github
[Building agent skills blog](https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills)
Git community #148
, [#161](https://github.com/affaan-m/everything-claude-code/pull/161))
Git community GitHub MCP
| Token | Repos, issues, PRs, workflows |
Git community GitHub MCP Server
Official first-party server to read repos, manage issues/PRs, and automate workflows.
Git community mcp-server-github
GitHub API integration for repos, issues, PRs.
Git community