review-pr
Review a GitHub pull request in this repo and post the findings as one batched COMMENT review with inline comments and suggestion blocks, after the user…
от Urigo★ 30 звёзд на GitHub
Установить review-pr в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Review PR $ARGUMENTS and post the result as a single COMMENT review. If no PR was given, use the
current branch's PR (gh pr view --json number). If given a URL, use its number for <n> below;
gh api and git fetch origin resolve against this checkout's repo, not the URL's.
The review is public and pings the author, so the bar is: every finding is real, points at the right line, and nothing is posted until the user has seen the exact draft and said yes. The repo is public too: never quote production data in it (real amounts, client or vendor names, email addresses, tenant aliases) or anything from local logs. Describe the case instead.
1. Read the PR
gh pr view "$ARGUMENTS" --json number,title,body,author,baseRefName,headRefName,headRefOid,files,url
gh pr diff "$ARGUMENTS" > "$SCRATCH/pr.diff" # $SCRATCH = your scratchpad directory
Keep headRefOid — it becomes commit_id, so the comments attach to the commit you actually
reviewed even if the author pushes meanwhile. Right before posting, check it's still the head
(gh pr view <n> --json headRefOid): branches here are often rebased and force-pushed, which can
drop the reviewed commit from the PR. If it moved, tell the user before posting.
Read the PR description for intent: a finding that contradicts a stated, deliberate decision is
usually a question, not a bug. Read the existing review threads too
(gh api --paginate "repos/{owner}/{repo}/pulls/<n>/comments"): don't repeat what another reviewer
already raised, and don't reopen a point the author already answered unless you have something new.
To read full files at the PR head, don't check the branch out over the user's working tree. Fetch it read-only instead:
git fetch origin "+pull/<n>/head:refs/review/<n>" # then: git show refs/review/<n>:<path>
A named ref, not FETCH_HEAD: step 2 fetches more (a stacked PR's base branch, a follow-up PR's
head), and each fetch overwrites FETCH_HEAD. The + lets a re-review pick up a force-push. Remove
the ref when done: git update-ref -d refs/review/<n>.
2. Look beyond the diff
A diff only shows what changed; most real bugs live at the seams. Before writing findings:
- Callers and implementers of anything whose signature, return shape, nullability or semantics
changed — grep the repo at the PR head (
git grep <pattern> refs/review/<n>). A renamed GraphQL field or a provider method that now returnsnullmatters at every call site, including the client. - Follow-up PRs that consume new APIs. If the PR adds a function, field, or tool that something
else will use, find those PRs:
gh pr list --base <headRefName>(stacked PRs) andgh pr list --search "<new symbol>" --state open. A new API that its first consumer can't use as written is a finding on this PR. - Repo conventions that apply to the touched area: root
CLAUDE.md,packages/<name>/CLAUDE.md,.claude/rules/*.md, and the checklist in.claude/agents/code-reviewer.md(DI viacontext.injector.get, DB only in providers,@Injectable({ scope: Scope.Operation, global: true }),.jsimport suffixes, DataLoader for N+1, schema change ⇒yarn generate+ migration, etc.). - Where past reviews here found real bugs:
- Tenant scope: the RLS read scope can span several businesses, so a row a loader returns is visible but not necessarily owned. Lookups need an explicit owner filter.
- Ledger amounts: a rate taken from a different date than the counterpart entry used; fallbacks
such as
?? 1that book a wrong amount instead of failing; a new required tax category that stops booking for tenants that haven't set it; float residue. - Error paths: GraphQL error codes lost on the way up, raw DB errors reaching the client.
- External APIs: paging that skips or repeats rows, silent truncation at a page cap.
- Transactions: network calls inside an open transaction,
FOR UPDATEthat can't lock rows not inserted yet, triggers such asupdated_atchanging columns behind the code's back.
- Tests: does the change have them, and do they actually exercise the new branch? CI's
Server Testsalready runs the server typecheck and the unit, client and integration tests for PRs that touchpackages/**, so checkgh pr checks <n>before running anything yourself. To run tests locally, the working tree must be at the PR head andyarn generatemust run first (generated types are git-ignored, so they may be another branch's). DB-backed tests need the local DB'sPOSTGRES_*passed inline, since the root.envmay point at a deployed database. Without them the global setup only warns (its stack trace showsassertTestDatabaseIsLocal) and tests that need no database still run, so read the summary, not the trace. If you didn't run them, say so in the body.
For a large PR, a first bug-hunt pass with the code-review skill (/code-review <n>, in a
background agent) is a good start. Treat it
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- scripts/check-review.mjs
FAQ
Что делает скилл review-pr?
Review a GitHub pull request in this repo and post the findings as one batched COMMENT review with inline comments and suggestion blocks, after the user approves the draft. Use whenever the user asks to review, look over, or leave comments on a PR (by number, URL, or "this branch's PR"), even if they don't say "inline" or "post" (e.g. "review 4810", "go over the balances PR and leave comments", "/review-pr 4810").
Как установить скилл review-pr?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл review-pr запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…