pr-review-handler

SKILL开发
开发 未标注权限 许可证不明确
安装这个技能

Systematically process GitHub PR review comments: triage for validity, fix code, and post replies. Use whenever the user mentions PR reviews, code review feedback, reviewer comments, or wants to respond to review threads on a pull request. Triggers include: "handle reviews", "respond to PR comments", "fix review feedback", "reply to reviewer", "看看 PR 评论", "回一下 review", "处理 review 意见", "reviewer 说的那个问题", or any mention of dealing with PR review comments. Also triggers when the user pastes a PR link with unresolved conversations, mentions a reviewer by name in the context of their PR, or describes the situation: "someone left comments on my PR", "帮我看看那些人提的意见", "CI 过了但 review 还没回".

一句话选型结论

按资料字段整理

pr-review-handler是开发类的 Agent Skill,安装方式未标注,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类开发 安装方式未标注 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

未标注
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_a99f11f7/pr-review-handler
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

开发
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_a99f11f7仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式未标注安装包 community
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 1791623982
正文体量27.1 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
写代码与改 bug

按需求补代码、定位并修掉报错。

读仓库与生成改动

让模型读懂项目结构,再给出可落地的改动。

跑测试与排查故障

按现象排查问题,补测试用例并复跑。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在开发场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
pr-review-handler当前 未标注权限 未标注 未标注 未标注 有
技能审查员 浏览器控制 ClawHub 市场 877.9 万 OpenClaw 有
Vercel React 最佳实践 浏览器控制 GitHub 仓库 849.1 万 Codex、Claude、Cursor 有
GitHub 代码协作 联网访问 ClawHub 市场 763.3 万 OpenClaw 有
网页设计指南 联网访问 GitHub 仓库 668.6 万 Codex、Claude、Cursor 有
本体论 只读 ClawHub 市场 663.7 万 OpenClaw 有

SKILL.md 全文

27.1 KB
模型实际读到的说明书原文,来自技能仓库

PR Review Handler

Orchestrate specialized agents to process PR review comments:

Phase 0: Setup → Phase 1: Triage (parallel) → Phase 1.5: Repair dependencies
         → Phase 2: Fix (dependency-aware) → Phase 3: Reply → Phase 4: Post & Push → Phase 5: Report

Checkpoints: after Phase 1 (user confirms verdicts) and after Phase 3 (user approves replies).

Agent Definitions

Roles

Role Responsibility Parallelizable
Triage Agent Verify each review claim (evidence + verdict), emit fix contract when needed ✅ Yes (read-only)
Implementation Agent Apply minimal fix against fix contract ⚠️ Parallel only after independence proof; shared cwd
Reply drafting Orchestrator drafts inline (no separate agent) N/A

Platform mapping

Agent specs live in agents/ relative to this skill (agents/triage-agent.md, agents/implementation-agent.md). Every platform uses the same specs — what differs is the dispatch mechanism.

Platform Dispatch mechanism
Pi Synced pr-review-handler.triage / pr-review-handler.implementation agents via subagent, else inline
Claude Code Task tool
Cursor background agent
Gemini CLI / OpenCode / others native subtask mechanism if available
No subtask available inline (read the spec, execute the steps yourself)

Dispatch pattern: read relevant agent spec and dispatch one triage task per thread in parallel. After triage, orchestrator builds repair dependency graph: dependent repairs serial; only proven-independent fixes parallel in the shared current working directory.

Pi dispatch: Pi uses optional subagent tool with project agents in .agents/pr-review-handler/. User runs /pi-pr-review-handler-sync before dispatch. Use pr-review-handler.triage for Phase 1 and pr-review-handler.implementation for Phase 2. If project agents or tool unavailable, fall back inline.

Inline fallback: if no subagent tool (Pi) or no subtask mechanism (other platforms), read each spec and execute its steps yourself, one thread at a time.

Phase 0: Setup

Identify the PR

gh pr list --state open --json number,title,url,headRefName

Match against current branch (git branch --show-current). Use user-supplied PR if specified. Checkout PR branch if needed.

git fetch origin

Fetch unresolved review threads

Preferred: GraphQL (filters resolved threads):

gh api graphql -f query='
  query($owner: String!, $repo: String!, $pr: Int!) {
    repository(owner: $owner, name: $repo) {
      pullRequest(number: $pr) {
        reviewThreads(first: 100) {
          nodes {
            isResolved
            comments(first: 10) {
              nodes {
                databaseId
                body
                path
                line
                author { login }
              }
            }
          }
        }
      }
    }
  }
' -f owner={owner} -f repo={repo} -F pr={pr_number}

Filter isResolved: false. Include full thread (not just top-level) — follow-up replies often contain the real concern.

Deduplicate threads before triage. Automated reviewers (React Doctor, claude[bot], etc.) often post the same concern multiple times across different reviews, and human reviewers may re-comment after a push. Before dispatching Triage Agents, cluster threads by (path, line) and collapse those whose top-level comment bodies share the same core concern (match on the first sentence or the rule identifier like react-doctor/prefer-useReducer). Third rule: any comment body containing a discussion_r<id> link is the same concern as the thread that link points to — review bots re-raise findings on new lines after code moves, so (path, line) clustering alone would split them into fake new threads. Keep one representative thread per cluster, but record all databaseIds — Phase 4 posts the reply to every original thread in the cluster so no reviewer comment is left unanswered. Report the dedup result to the user (e.g. "8 threads → 3 unique concerns") so the Checkpoint 1 table stays readable.

Fallback: REST (when GraphQL unavailable):

gh api repos/{owner}/{repo}/pulls/{pr_number}/comments \
  --jq 'group_by([.path, (.original_commit_id // "HEAD")]) | map({
    thread_id: .[0].id, path: .[0].path,
    comments: [.[] | {id, body, user: .user.login, line, in_reply_to_id}]
  })'

REST cannot detect resolved threads — ask user to confirm which threads need attention.

Fetch review-level feedback

Review-level feedback (summary comments without line references) is separate from thread comments. Always fetch:

gh api repos/{owner}/{repo}/pulls/{pr_number}/reviews \
  --jq 'sort_by(.submitted_at) | reverse | .[:5] | .[] | {id, state, user: .user.login, body}'

Present any non-empty review bodies in Checkpoint 1 (Phase 1) as a
separate Review-level feedback section. These are summary comments
without line references, so they do not go through the Triage Agent
automatically — the user decides how to handle each one (ignore / reply
only / needs code change). If the user marks one as needing a code change,
convert it into an Implementation task with path: <overall PR> and no
specific line; the Implementation Agent then works from the review body
text and the PR diff.

Fetch PR diff

Triage needs to see what the PR actually changed — without it, the agent cannot
distinguish a problem the PR introduced from one that already existed in the
base branch.

gh pr diff {pr_number} > /tmp/pr-{pr_number}.diff

Cache the diff to a temp file. When dispatching each Triage Agent in Phase 1,
pass only the hunks relevant to that thread's path as pr_diff_context. If
the total diff is small (< 500 lines), pass the full diff to every agent for
broader context.

Ensure project agents (Pi only)

If you have a subagent tool (Pi with pi-subagents installed), ensure project agents are registered before Phase 1 dispatch.

Check that both project agent files exist:

test -f .agents/pr-review-handler/triage.md &amp;&amp; test -f .agents/pr-review-handler/implementation.md
  • Both exist → continue to Phase 1 (subagent dispatch)
  • Either missing → notify user: "Project agents not found at .agents/pr-review-handler/. Run /pi-pr-review-handler-sync to sync them. Continuing inline for this run." → fall back to inline execution (read agents/triage-agent.md spec and execute inline)

Do NOT auto-cp or auto-sync. Syncing is the user's responsibility via the /pi-pr-review-handler-sync command (a Pi extension bundled with the @trashcodermaker/pi-pr-review-handler package).

Phase 1: Triage (parallel dispatch)

Dispatch strategy

Triage is read-only — safe to parallelize.

  • Pi with subagent tool: Use pr-review-handler.triage project agent. Spawn one per thread in PARALLEL mode. Pass acceptance: { level: &quot;none&quot;, reason: &quot;triage is read-only verdict classification — no files changed, no tests, no commands; pr-review-handler manages its own output format&quot; }. Task prompt = input data ONLY (agent carries its own system prompt).
  • Why level: &quot;none&quot;: pi-subagents infers checked for any task whose text contains words like "fix" (reviewer comments often do), and checked requires non-empty tests-added + commands-run evidence that a read-only triage agent cannot produce. A bare acceptance: &quot;attested&quot; is silently ignored — an explicit level can only raise above the inferred level, never lower it. Only { level: &quot;none&quot;, reason } disables the gate.
  • Other platforms with subtask tool (Task tool / background agent): embed agents/triage-agent.md spec into the task prompt + input data. Spawn one subtask per thread in parallel.
  • No subtask mechanism: run inline, one thread at a time.

Thread-count rules:

  • ≥3 threads + subtask available → parallel, one agent per thread
  • ≤2 threads → inline regardless (overhead not worth it)
  • >15 threads → batch by file path, 8–10 threads per batch, dispatch one batch at a time (serial batches, parallel within each batch). Collect verdicts across batches before Checkpoint 1.

Dispatch

For each unresolved thread, dispatch the Triage Agent with this task data:

thread_id: &lt;comment ID&gt;
path: &lt;file:line&gt;
reviewer: &lt;reviewer username&gt;
comments:
  - &lt;top-level comment text&gt;
  - &lt;reply 1, if any&gt;
  - &lt;reply 2, if any&gt;
pr_diff_context: &lt;diff hunks for {path} from /tmp/pr-{pr_number}.diff, or full diff if PR is small&gt;

Embed the Triage Agent spec (agents/triage-agent.md) into the task prompt so the subtask has the full role instructions and output format, then append the thread-specific data above. Collect structured verdicts from all agents.

Collect-verdict gates (orchestrator enforces before Checkpoint 1):

  • If a verdict omits claim_check / evidence, treat as insufficient — do not promote to valid-fix.
  • Reject or flag any verdict: valid-fix where claim_check is not confirmed or evidence.code_path is empty — force human decision.
  • claim_check: insufficient rows must surface Need from user (evidence.missing) in the table below.
  • valid-fix without acceptance (2–4 items): ask user to supply AC at Checkpoint 1 before Phase 2, or skip the thread.

Checkpoint 1: User confirmation

Present thread verdicts as a summary table:

# File:Line Reviewer Summary Claim In PR? Axis Verdict Affected
1 src/auth/login.ts:42 alice Missing null check confirmed true spec valid-fix login.ts, types.ts
2 src/ui/Button.tsx:18 bob Rename for clarity confirmed false standards valid-nofix —
3 src/api/handler.ts:99 alice Add rate limiting failed true spec invalid —
4 src/legacy/foo.ts:10 bot Unclear overflow note insufficient unknown n/a invalid —

For insufficient rows, add a Need from user line under the table (from evidence.missing), e.g. 4: which commit / expected behavior?.

When showing valid-fix rows, optionally expand the fix contract (acceptance + out_of_scope) so the user can edit before Phase 2.

Then present the Review-level feedback section (summary comments
without line references, fetched in Phase 0):

# Reviewer State Body (excerpt)
R1 alice CHANGES_REQUESTED "Overall solid, but the auth module needs a refactor — see thread #1"
R2 bob COMMENTED "Please add tests for the token expiry edge case"

For each review-level item, ask the user to choose:

  • Ignore — no action needed (e.g. summary of already-addressed threads)
  • Reply only — draft a clarification in Phase 3, no code change
  • Needs code change — convert to an Implementation task: path: &lt;overall PR&gt;, no line, summary: &lt;review body&gt;, affected_files: &lt;user-specified or all PR files&gt;, suggested_fix: &lt;user describes&gt;, plus user-supplied acceptance (2–4) and out_of_scope. Dispatch in Phase 2.

User can adjust thread verdicts or skip threads. Proceed with confirmed plan.

Quick exits

  • All invalid: skip Phase 2, go to Phase 3 for reply drafting
  • All valid-nofix: skip Phase 2, go to Phase 3
  • User rejects all: end workflow

Phase 1.5: Repair dependency analysis

Run only after user confirms valid-fix verdicts and before implementation writes code. Build a directed repair graph with one node per confirmed fix. This step is orchestrator-owned.

For every pair, compare affected_files, modified_symbols, referenced_symbols, change_kinds, and dependency_risks. Add A → B when A must integrate before B. Orient relations by: user order; type/export/config producer before consumer; callee/provider before caller/consumer; then PR order.

Treat repairs as dependent when files or modified symbols overlap; one changes a symbol another references; type/export/config/generated artifacts are consumed; reference search/CodeGraph finds a call, import, inheritance, helper, or configuration edge; or uncertainty exists. Cannot prove independent means serial.

Topologically sort graph. Each fix starts as its own group; only cycles or undirected relations become multi-fix serial groups. Groups with all predecessors integrated form a wave. Show the resulting wave/group/mode/reason plan with Checkpoint 1.

  • Dependent repairs run serially in graph order.
  • A wave with independent fixes may run in parallel only when every fix has no unresolved risk and its complete file and symbol sets are disjoint from every other fix in that wave.
  • Parallel fixes share current cwd. They may edit only their own affected_files; no agent may run Git write/integration commands while wave is active.
  • A dirty starting tree, overlap, incomplete evidence, or newly discovered dependency disables parallelism for affected work and falls back to serial execution.

Phase 2: Implementation (dependency-aware dispatch)

For every fix, dispatch the Implementation Agent with its triage fix contract plus:

thread_id: &lt;comment ID&gt;
path: &lt;file:line&gt;
reviewer: &lt;name&gt;
summary: &lt;what the reviewer wants&gt;
verdict: valid-fix
claim_check: confirmed
evidence:
  code_path: &lt;from triage&gt;
  in_pr_diff: true | false | unknown
affected_files: [&lt;file&gt;]
modified_symbols: [&lt;symbol&gt;]
referenced_symbols: [&lt;symbol&gt;]
change_kinds: [implementation | type | export | caller | test | config | unknown]
dependency_risks: [&lt;risk or empty&gt;]
suggested_fix: &lt;behavioral what-to-change&gt;
acceptance: [&lt;checkable criterion&gt;]
out_of_scope: [&lt;explicit non-goal&gt;]
execution_mode: serial | shared-parallel
predecessor_changes:
  - &lt;completed prerequisite thread ID, files, symbols, and summary&gt;
parallel_wave: &lt;wave ID, only for shared-parallel&gt;
candidate_repairs:
  - thread_id: &lt;other approved, incomplete repair&gt;
    affected_files: [&lt;path&gt;]
    modified_symbols: [&lt;symbol&gt;]
    referenced_symbols: [&lt;symbol&gt;]

candidate_repairs contains other incomplete approved repairs; omit completed predecessors already in predecessor_changes. On Pi, task prompt contains input only; other platforms embed implementation spec.

Serial and shared-parallel execution

For serial fixes, use current cwd and run one task at a time. Append completed reports as predecessor_changes. If agent reports dependency_findings, recompute remaining graph before next dispatch.

At Phase 2 start require empty git status --porcelain and record REPAIR_BASE=$(git rev-parse HEAD). For a shared-parallel wave, launch one implementation task per proven-independent fix in PARALLEL mode with the same cwd. Each task may edit only its declared affected_files; it must not run git add, git commit, git reset, git checkout, git clean, git rebase, git merge, git cherry-pick, or git push. Orchestrator alone performs Git operations after all writers finish.

Use acceptance: { level: &quot;none&quot;, reason: &quot;implementation agents do not run verification and review fixes may add no tests; orchestrator owns shared-cwd wave coordination and final validation&quot; } for Pi agents. No subtask mechanism: execute serially in current cwd.

Wave checkpoints and fallback

Before every wave record WAVE_BASE=$(git rev-parse HEAD). After every successful wave that changed files, inspect combined git diff and agent reports, then stage and checkpoint it:

git add -A
git commit -m &quot;chore(review): temporary repair checkpoint&quot;

If a shared-parallel wave reports a new dependency, shows any file/symbol overlap, or has an unexpected combined diff, restore the clean pre-wave state with git reset --hard &quot;$WAVE_BASE&quot; &amp;&amp; git clean -fd, recompute graph, then rerun every fix from that wave serially. Never continue from mixed concurrent edits. Empty wave creates no checkpoint.

  • Why level: &quot;none&quot;: implementation task text includes “fix”; pi-subagents otherwise infers checked, requiring evidence intentionally absent from implementation agents.

After all fixes

Once all Implementation Agents have completed, squash orchestrator-owned temporary checkpoints back to Phase 2 start, then create one final commit:

git reset --soft &quot;$REPAIR_BASE&quot;
git add -A
git commit -m &quot;fix(review): address {N} review threads&quot;

If no changes were made (all agents skipped), skip to Phase 3.

Then run the project's type checker or equivalent verification. Detect the
project type and run the matching command — do not assume TypeScript:

Project marker Command
tsconfig.json npx tsc --noEmit
package.json (no tsconfig) npm run lint --if-present and npm test --if-present
pyproject.toml / setup.py ruff check . then mypy . (if configured)
go.mod go build ./...
Cargo.toml cargo check
none recognized skip; tell user to run the project's check manually

If the check fails:

  • git reset --soft HEAD~1 to unstage the commit (keep changes in working tree)
  • Identify the failing fix (check error file paths against affected_files from triage verdicts)
  • Fix the error
  • Re-commit
  • Re-run the check until clean

Also check:

  • Orphan references to removed/renamed symbols (grep -r)
  • Translation keys in all message files if t() calls were added

Never push during this phase

The commit stays local. Push happens once in Phase 4.

Phase 3: Reply (orchestrator drafts inline)

The orchestrator drafts replies directly — no separate agent needed. This phase has full access to all pipeline context.

Gather:

  • Original thread data: all comments from Phase 0
  • Triage verdicts: all structured verdicts from Phase 1
  • Actual changes: git diff origin/{branch}...HEAD
  • Failure records: which fixes failed and why (from Phase 2)

Draft one reply per thread, using git diff origin/{branch}...HEAD as ground truth (not planned changes):

valid-fix (succeeded): describe what was changed, referencing the reviewer's concern. If the fix differs from what the reviewer suggested, explain why.

Examples:

> Good (EN): "Added the null check at line 42 as you suggested — user can indeed be undefined when the session expires."
>
> Good (中文): "已在 42 行加了空值判断,session 过期时 user 确实可能为 undefined。"
>
> Good (EN, diverged from suggestion): "Your point about rate limiting is valid. Instead of a fixed window I used a token bucket in rateLimit.ts — it handles burst traffic better and the existing tests cover it."

valid-fix (failed): acknowledge the concern was valid. Explain why the fix couldn't be applied (type conflict, dependency issue). Suggest next steps if possible ("will address in a follow-up PR"). Don't be apologetic — just factual.

Examples:

> Good (EN): "You're right that this should be typed more strictly, but the User interface is shared with the legacy auth module which expects any. I'll extract a StrictUser type in a follow-up PR to avoid breaking that module here."
>
> Good (中文): "这里确实该用更严格的类型,但 User 接口被旧 auth 模块共用且依赖 any。我会在后续 PR 里拆出 StrictUser 类型,避免这里改动波及该模块。"

valid-nofix: acknowledge the concern is valid. Explain why no code change is needed. Provide clarification if the reviewer misunderstood the code.

Examples:

> Good (EN): "Fair point on the naming — handleX is a bit vague. It's part of the public API documented in docs/api.md, so renaming would be a breaking change. I'll add a deprecation alias in the next major."
>
> Good (中文): "命名确实不够清晰,不过 handleX 是 docs/api.md 里记录的公开 API,重命名属于破坏性变更,下个大版本会加弃用别名。"

invalid: explain clearly why the premise doesn't apply. Reference specific code that already handles the concern. Acknowledge the reviewer's intent ("I see why you'd think X, but..."). Be respectful but direct — don't hedge if the concern is genuinely wrong.

Examples:

> Good (EN): "I see why you'd think the count could overflow here, but items is already capped at MAX_ITEMS (line 15) before this loop runs, so i stays well within Number.MAX_SAFE_INTEGER."
>
> Good (中文): "能理解你担心这里 count 溢出,但进入循环前 items 已在 15 行被 MAX_ITEMS 截断,i 始终远小于 Number.MAX_SAFE_INTEGER。"

Out-of-PR stock phrases

When triage has evidence.in_pr_diff: false and verdict is valid-nofix (or invalid out-of-scope for this PR), prefer a short scope-boundary reply:

> Good (EN): "Agreed this is worth tracking, but it's outside this PR's diff — happy to take it in a follow-up."
>
> Good (中文): 「同意值得跟进,但不在本 PR diff 内;建议单独开 issue / 后续 PR。」

Reply guidelines

  • Match the reviewer's language (Chinese reviewer → Chinese reply)
  • Match tone (casual → casual, formal → formal)
  • Be concise: 1-3 sentences ideal
  • Don't over-explain — reviewer is a peer, trust they understand code
  • Never be defensive — state facts, acknowledge intent
  • Ground-truth diff: describe what git diff origin/{branch}...HEAD actually changed, not the planned fix

AI-assisted footer (default on)

Unless the user disables it for this run, append the following footer to every reply body that will be posted (after the human-facing sentences):

&gt; _(AI-assisted reply — approved in pr-review-handler checkpoint)_

Checkpoint 2 may strip the footer per reply or for all replies. Do not present the footer as if a human typed it without the marker.

Checkpoint 2: User review

Present all reply drafts (with footer visible if enabled). User can:

  • Approve all
  • Edit individual replies
  • Reject specific replies
  • Add context to replies
  • Strip or keep the AI-assisted footer

Phase 4: Post & Push

Post approved replies. The reply endpoint requires -X POST and the PR number in the path:

gh api -X POST repos/{owner}/{repo}/pulls/{pr_number}/comments/{comment_id}/replies \
  -f body=&#x27;The response text&#x27;

Reply to the top-level comment of each thread (the one with databaseId, not a reply). The {pr_number} is the PR number (e.g. 561), and {comment_id} is the databaseId from Phase 0. Note: the path is pulls/{pr_number}/comments/..., not pulls/comments/... — the latter returns 404.

Resolve conversations

After posting replies, automatically resolve every thread that received a reply (regardless of verdict — the reviewer can reopen if needed). This simulates clicking the "Resolve conversation" button on the PR page.

GitHub's REST API cannot resolve threads; use the GraphQL API.

  1. Fetch all review thread node IDs (the thread id is NOT the same as a comment databaseId):
gh api graphql -f query=&#x27;query($owner:String!,$name:String!,$pr:Int!){
  repository(owner:$owner,name:$name){
    pullRequest(number:$pr){
      reviewThreads(first:100){
        nodes{
          id
          isResolved
          comments(first:100){nodes{databaseId}}
        }
      }
    }
  }
}&#x27; -F owner=$OWNER -F name=$REPO -F pr=$PR_NUMBER
  1. For each thread that received a reply, match by the original comment's databaseId (recorded in Phase 0). If isResolved == false, resolve it:
gh api graphql -f query=&#x27;mutation($id:ID!){
  resolveReviewThread(input:{threadId:$id}){
    thread{isResolved}
  }
}&#x27; -F id=$THREAD_ID

Skip threads already resolved. Record each resolve outcome (thread id + success/skip) for the Phase 5 report.

Push the commit:

git push origin HEAD

Ask user if they want to:

  • Request re-review: gh api repos/{owner}/{repo}/pulls/{pr_number}/requested_reviewers -f reviewers=&#x27;[&quot;username&quot;]&#x27;
  • Dismiss resolved reviews: gh api repos/{owner}/{repo}/pulls/{pr_number}/reviews/{review_id}/dismissals -f message=&#x27;Addressed&#x27;

Phase 5: Report

Output final summary:

✅ Triage: N/N threads processed
✅ Fixes: M/K valid-fix threads applied (committed locally, pushed)
   ❌ Failed: {thread} — {reason}
   ⚠️ regression-gap: {thread} — behavior change noted, no test in concerns (if any)
✅ Replies: P/P threads drafted and posted
✅ Resolved: Q/P conversations resolved (R skipped — already resolved)

If an Implementation Agent listed regression-gap in concerns, surface it here. Do not force adding tests mid-pipeline unless the user asks.

Pipeline Failure Rules

Scenario Action
Triage: all agents fail Stop pipeline. Report to user. Cannot proceed without verdicts.
Triage: some agents fail Skip failed threads. Continue with successful verdicts. Note in final report.
Implementation: all agents fail Skip Phase 2. Phase 3 only drafts replies for invalid/nofix threads.
Implementation: some agents fail Skip failed fixes. Mark in failure records for Phase 3.
Reply drafting fails Should not happen — orchestrator drafts inline.

Error Handling

Error Action
gh not installed / not authenticated Tell user to install GitHub CLI and gh auth login
API rate limit Wait for X-RateLimit-Reset, retry
PR closed/merged Warn user — replies have no effect
GraphQL unsupported Fall back to REST with resolved-thread caveat
Type check fails after all fixes Fix before posting replies

Key Principles

These apply across all agents and phases:

  • Claim must be confirmed with code_path. valid-fix requires claim_check: confirmed and a non-empty evidence.code_path. No evidence, no fix.
  • Fix contract bounds the change. Implementation satisfies acceptance only and never implements out_of_scope. Minimal fix, not drive-by refactor.
  • Trace all references after removals. Deleting a function, type field, or import creates orphans in callers, tests, and type usages. Search the entire codebase for the symbol. This is the #1 cause of "fixed the review but broke the build."
  • Don't guess on ambiguous threads. If a concern is partially valid or unclear, set claim_check: insufficient and mark for user decision in Checkpoint 1. A wrong reply is worse than no reply.
  • AI reply transparency. Posted replies are human-approved at Checkpoint 2 but should keep the AI-assisted footer unless the user strips it — do not impersonate an unassisted human author.
  • Checkpoints are gates. Never skip Checkpoint 1 or 2 to "save time." Silent promotion of verdicts or replies is a process failure.

常见问题

5 问
答案由本站依据条目字段整理
pr-review-handler怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_a99f11f7/pr-review-handler。安装方式为未标注。装完刷新技能列表或重开客户端。

pr-review-handler支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

pr-review-handler权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

pr-review-handler收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

pr-review-handler用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。