review-pr

Reviews others' GitHub pull requests and posts summary plus inline comments via gh API.

Updated Dec 25, 2021
One-click install
npx skills add https://github.com/kotahashihama/dotfiles --skill review-pr-kotahashihama
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: review-pr
Source: https://github.com/kotahashihama/dotfiles/tree/main/home/.claude/skills/review-pr
Command: npx skills add https://github.com/kotahashihama/dotfiles --skill review-pr-kotahashihama

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reviewing someone else's pull request requires reading repository conventions, verifying claims against actual code, and posting well-formatted feedback to GitHub without overstepping (e.g., approving on the user's behalf). This Skill structures that entire workflow so reviews are evidence-based, correctly formatted, and only posted after explicit user approval. ## Core Features & Use Cases - Convention-aware review: Reads the repository's own review rules, PR templates, and existing comment culture before judging the diff, using prefixes like [must], [iaio], and [nits]. - Adversarial self-verification: Verifies line numbers, builds, tests, and existing code patterns against the base branch, then attacks its own findings to eliminate false positives before posting. - One-shot GitHub posting: Submits the summary comment and all inline comments as a single review via the gh API, always as COMMENT (never APPROVE), with author mentions and AI-generation notes. - Use Case: A teammate asks you to review their PR. You run the skill with the PR number; it fetches the diff, reads the repo's conventions, verifies each finding, reports an approve/reject recommendation to you, and posts the review only after your GO. ## Quick Start Ask the AI to review PR 123 in the current repository and report the findings before posting anything to GitHub.

Frequently Asked Questions about review-pr

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

FAQPage Schema
How do I review someone else's pull request with GitHub CLI?

Use gh pr view and gh pr diff to inspect the change, then post a single review containing a summary body and inline comments via gh api repos/OWNER/REPO/pulls/PR/reviews with event set to COMMENT. This skill automates that flow with convention checks and verification steps.

How to post inline comments on a GitHub PR review?

Inline comments are posted as part of one review API call, each with path, line, side RIGHT, and body. The line must be part of the diff, and line numbers should come from git show on the file itself, not from gh pr diff output offsets.

Can this skill approve or request changes on a PR?

No. The review event is fixed to COMMENT, and APPROVE or REQUEST_CHANGES are never submitted. The approval decision and button press belong to the user; the skill only reports an approve-or-wait recommendation in the conversation.

What happens if a review finds no issues?

No review is posted to GitHub when there are zero findings, since an empty review only sends a notification without changing anyone's behavior. The skill reports 'no findings, approve looks fine' to the user and stops unless the user explicitly asks for a comment.

How does re-review of an updated PR work?

The skill detects prior reviews via the API rather than memory, recomputes the diff from the merge-base with the base branch, re-reads rewritten files in full, verifies each previous finding against the current HEAD, and adds +1 reactions to addressed comment replies.

Why does the skill use [iaio] instead of [imo] in review comments?

Opinion-based findings are prefixed [iaio] (in AI opinion) so readers can weight the comment at a glance, distinguishing AI opinions from human reviewer opinions marked [imo]. Factual findings like [must] and [nits] keep their standard prefixes regardless of author.