pr-code-review
БесплатноБез исполняемых скриптовНе проверенWrapper around the built-in code-review skill that always reviews from a clean worktree checked out from origin, so the diff base is never a stale or dirty…
от KyleAMathews★ 16 звёзд на GitHubОб этом скилле
pr-code-review
This skill wraps the built-in code-review skill and forces one behavior the
built-in leaves optional: the review always runs in a clean git worktree
checked out from origin. This exists because reviewing against a stale or
dirty local checkout has produced scope artifacts — changes already merged to
origin/main showing up as in-scope, or local edits contaminating the diff.
What to do
Take the arguments the user passed to this skill verbatim (effort level such as
low/medium/high/max, a PR number / branch / path target, and any focus instructions like "focus on code size").If the target is a PR number, this is the critical case this wrapper exists for. A bare "in a clean worktree from origin" is NOT enough: when the review runs while the shell sits in some other branch's checkout, the built-in has been observed to diff the ambient
HEADinstead of the PR's branch, silently reviewing the wrong code. Delegating the worktree setup to the forkedcode-reviewskill has failed repeatedly, so you — the main agent — must create and verify the worktree yourself before invokingcode-review. Do not hand this step to the forked skill. Concretely:a. Determine
<repo>from the PR URL if one was given, else the current repo'sorigin.b. Create a fresh git worktree branched from
origin's default branch, then rungh pr checkout <N>inside that worktree (or fetch and check out the PR's head ref) so itsHEADis the PR's head branch. Never reuse the directory you were launched from.c. Verify the worktree yourself before going further: confirm
git branch --show-current(run in the worktree) equals the PR's head branch, and thatgit diff <the PR's base ref>...HEAD --name-onlymatches the PR's actual changed files (gh pr diff <N> --name-only). If either check does not match, stop and report the mismatch to the user — do not invokecode-reviewand do not review anything.d. Only once the worktree is confirmed correct, invoke the built-in
code-reviewskill pointed at that worktree, passing the original effort/focus args unchanged and telling it the review directory is the worktree you prepared (an absolute path). Instruct it to review the diff there and not to create its own worktree or re-checkout anything.If the target is a branch, path, or the current diff (no PR number), append
in a clean worktree from originunless the arguments already say so. Do not drop or reword any argument the user gave.Invoke the built-in
code-reviewskill with the original arguments plus the worktree path (step 2) or appended instruction (step 3). Let the built-in do the review itself: gathering the diff in the prepared worktree, running its finder angles at the requested effort, deduping, and reporting findings. Do not re-implement its review recipe here — your added responsibility is only the worktree setup and verification.If the user passed no effort level, pass none through — the built-in reuses the last level typed, and this wrapper must not change that.
What not to do
- Do not review in the current working directory or against local
HEAD/localmain; the whole point of this wrapper is the clean-from-origin base. - For a PR-number target, do not trust a review that did not check out the PR's head branch. If the diffed files do not match the PR's changed files, the review is invalid — surface that, do not relay its findings.
- Do not add, remove, or reinterpret findings — relaying and follow-up are the built-in skill's job and the caller's.
- For a PR-number target, do not delegate worktree creation or verification to
the forked
code-reviewskill. That has failed repeatedly; the main agent sets up the worktree and confirms the branch and changed files match before invoking the review.
Установить pr-code-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл pr-code-review?
Wrapper around the built-in code-review skill that always reviews from a clean worktree checked out from origin, so the diff base is never a stale or dirty local checkout. Use for reviewing a PR number, branch, or the current changes when you want the review isolated from local working state.
Как установить скилл pr-code-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pr-code-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic