pr-review

Reviews GitHub pull requests via isolated worktrees and submits one consolidated verdict.

Updated Jul 4, 2023
One-click install
npx skills add https://github.com/kohdice/dotfiles --skill pr-review-kohdice
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pr-review
Source: https://github.com/kohdice/dotfiles/tree/main/config/agents/skills/pr-review
Command: npx skills add https://github.com/kohdice/dotfiles --skill pr-review-kohdice

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Reviewing a GitHub PR thoroughly requires reading the code locally with full context, but checking out PR branches pollutes your working tree, and ad-hoc reviews often miss concerns or produce scattered, duplicate comments. ## Core Features & Use Cases - Worktree-Isolated Review: Creates a single throwaway git worktree for the PR (handling fork PRs via detached HEAD checkout) and guarantees cleanup on success, failure, or interruption. - Multi-Lens Orchestration: Fans out read-only reviewer sub-agents across lenses like correctness, error-handling, security, design, tests, and language-specific idiom checks for C, Go, Rust, and Zig, with an inline single-pass fallback. - One Consolidated Verdict: Synthesizes all findings, dedups by location, classifies blockers vs nits, and submits exactly one GitHub review with inline comments, including self-approval guardrails. - Use Case: A teammate shares a PR URL touching Rust error-handling code. The skill checks out the PR in an isolated worktree, dispatches correctness and error-handling reviewers, and submits a single request-changes review with line-anchored comments. ## Quick Start Use the pr-review skill to review the GitHub pull request at this URL and submit a consolidated review.

Frequently Asked Questions about pr-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review a GitHub pull request locally with full code context?▼

Provide the PR URL or number and the skill creates a dedicated git worktree, checks out the PR in detached HEAD state, and reviews the code with full surrounding context. It then submits one consolidated review and removes the worktree.

How to submit a GitHub PR review with inline comments using gh?▼

Use gh api to POST to the pulls reviews endpoint with an event (APPROVE, REQUEST_CHANGES, or COMMENT), a summary body, and a comments array containing path, line, side, and body for each line-anchored finding.

Does this work with pull requests from forked repositories?▼

Yes. The worktree setup script runs gh pr checkout with the PR number, which resolves the head ref even for cross-repository fork PRs, and the detached HEAD checkout leaves no stray local branch behind.

Why can't I approve my own pull request on GitHub?▼

GitHub rejects self-approval. When the authenticated user is the PR author and there are no blockers, the skill submits a COMMENT review with an approval-style summary instead of attempting an APPROVE event.

When should I not use a worktree-based PR review?▼

Skip it for trivial checks that only need the web diff with no local checkout, when the goal is editing and pushing code rather than reviewing, or when the target is local uncommitted work rather than a GitHub PR.

Does the review rerun tests, linters, or builds?▼

No. The workflow assumes CI already runs tests, formatters, linters, and builds, so neither the parent nor any reviewer sub-agent repeats that work. The review focuses on judgment calls only a human-style reviewer can make.