review-pr
БесплатноЗапускает вложенные скриптыНе проверенReviews a pull request: runs its own baseline review of the PR diff, then a persistent Monitor watches CI and incoming reviewer comments, triages each comment…
от FradSer★ 598 звёзд на GitHubОб этом скилле
Review a Pull Request
Run the baseline review of the PR diff, then keep a persistent watch over CI and new reviewer comments until the PR settles.
Context
- PR argument:
$ARGUMENTS - PR metadata: !
gh pr view "$ARGUMENTS" --json number,title,headRepository,headRepositoryOwner,additions,deletions,headRefName 2>/dev/null || printf 'set %s to a PR number or URL\n' "$ARGUMENTS" - Remote: !
git remote -v 2>/dev/null | head -2 - Auth: !
gh auth status 2>&1 | head -3
Phase 1: Baseline Review and Sizing
Goal: Run the initial review, resolve the repo, and pick a poll interval sized to the PR.
Actions:
- Parse the PR number or URL from
$ARGUMENTS. If absent, list open PRs withgh pr listand ask the user which to review. NormalizePRto the bare number before anygh apiREST call:gh pr *commands accept a URL, butgh api repos/$REPO/issues/$PR/...interpolates$PRinto the URL path and breaks on a full URL — runPR=$(gh pr view "$ARGUMENTS" --json number -q .number)(the Context block already fetches--json number) and use$PRas the number everywhere downstream. Parse--auto-mergefrom$ARGUMENTSand strip it before resolving the PR number — it is a closeout opt-in (see Phase 5), not part of the PR identifier; treat its absence as the default (explicitAskUserQuestionmerge). - Run the baseline review — spawn an independent review agent via
Taskwith clean context (it did not author the code) to review the PR diff. Pull the diff withgh pr diff <PR>; pass the agent the PR title/body and the diff, and ask for findings aspath:line: issuelines (full prompt inreferences/review-loop.md, Baseline review agent). Treat its findings as the first[comment]batch — feed them straight into the Phase 3 triage flow before launching the Monitor. Do not act on them inline; the main context is biased (it likely authored the PR) and the same skeptical gatekeeping must apply to the baseline as to live comments. - Resolve
REPO=<owner>/<repo>from the PR metadata above (fallback:git remote get-url originparsed intoowner/repo). - Read PR size from
additions+deletionsand pickINTERVAL(seconds) from the size table inreferences/review-loop.md: 180 / 300 / 480 for small / medium / large; floor 60s, cap 7200s (~2h).
Phase 2: Launch the Persistent Monitor
Goal: One background watch streaming CI + comment events across turns.
Action: Launch a single Monitor with persistent: true running ${CLAUDE_PLUGIN_ROOT}/skills/review-pr/scripts/review-loop.sh. The bare path scripts/review-loop.sh does NOT resolve — the skill runs in the PR's repository cwd, not the plugin dir, so the script must be addressed by its absolute plugin path. Pass PR, REPO, and INTERVAL as env vars (the script also accepts --pr/--repo/--interval). Use a specific description like "CI + new comments on PR #<n> (<m> poll)". Do NOT run a foreground while loop. The script is documented in references/review-loop.md.
CRITICAL: Do NOT skip the watch based on a launch-time snapshot. "This repo has no CI workflow, so the watch would spin idly" is a false inference and not a valid reason to skip: CI is only one of the two things watched. Third-party auto-review services (GitHub Copilot code review, CodeRabbit, Greptile, Codex, Sourcery, and similar), org-level bots, and human reviewers post comments on no fixed schedule and are invisible in a launch-time snapshot — a repo with zero workflows can still accumulate a full review thread minutes after the PR opens. An empty .github/workflows/ proves nothing about who will comment.
The only valid skip is an explicit user opt-out ("just baseline review, don't watch"). If CI and reviewers both appear absent AND the user still wants coverage, launch the watch anyway; it costs nothing and emits nothing until something changes.
Phase 3: React to Each Monitor Event
Goal: Fix what is actionable, reject the noise, escalate the ambiguous. Full rules, prompt template, verdict format, and reply/hide/resolve lifecycle in references/review-loop.md.
[ci] <name>: fail|cancel→ fetch logs (gh run view <run-id> --log-failed), apply the fix, commit+push via inline git commands (git add <file> && git commit -m "<type>(<scope>): <summary>" && git push). The push triggers a fresh CI run the same Monitor re-emits. CRITICAL: stop and report (do NOT auto-fix) for auth/permission, missing-secret, flaky, or infrastructure failures.[comment]batch → CRITICAL: spawn an independent review-triage Task agent with clean context. Apply ONLY thefixverdicts; reject/escalate the rest. CRITICAL: reply by comment type — inline review comment →gh api repos/$REPO/pulls/$PR/comments/<id>/replies; issue-level comment →gh pr comment(no reply endpoint); review summary → skip reply. Use theid=<n>/node=<id>tokens from each emitted line. Commit+push allfixchanges in one round; t
Установить review-pr в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
TaskBash(gh:*)Bash(git:*)ExitWorktreeMonitorPushNotificationTaskStopSkillAskUserQuestionReadEditWriteВложенные файлы
FAQ
Что делает скилл review-pr?
Reviews a pull request: runs its own baseline review of the PR diff, then a persistent Monitor watches CI and incoming reviewer comments, triages each comment through an independent skeptical agent, applies only verified fixes, and commits+pushes via inline git commands until CI passes and no comments remain to adopt — then asks whether to merge. Use this skill when the user asks to "review a PR", "monitor PR review comments", "address reviewer feedback on #123", or "watch CI on a pull request".
Как установить скилл review-pr?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл review-pr запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub