skills/triage-pr-reviews/SKILL.md
Triages unresolved PR review comments using gh-pr-reviews. Analyzes code context and classifies each comment as Agree / Partially Agree / Disagree. Walks through each comment one-by-one, asking the user what action to take. Use when the user wants to triage, review, or analyze unresolved PR comments.
npx skillsauth add k1low/gh-pr-reviews triage-pr-reviewsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
gh pr-reviews [arg] --json to get unresolved review comments as JSON. If no argument is given, use the current branch's PR. Note: this command uses Copilot for classification and may take a while depending on the number of comments — use a longer timeout. Each JSON object contains:
comment_id (int): REST API comment ID — usable for replying via gh apithread_id (string, only for type: "thread"): inline review thread IDtype: "thread" (inline review) or "comment" (PR-level)author, body, url: comment metadatacommit_id, path, line, diff_hunk (only for type: "thread"): file location and diff contextcategory: one of suggestion, nitpick, issue, question, approval, informationalresolved (bool), reason (string): resolution status and rationalereplies (array, optional, only for type: "thread" with multiple comments): follow-up comments in the thread, each with author, body, created_at, urlgh pr view [arg] --json number,title,url to get it.type: "thread" comments, use path, line, and diff_hunk from the JSON response to identify the exact file location. For type: "comment" (PR-level), there is no file location.gh pr diff or file reads when necessary.replies, read the full conversation to understand whether the concern has already been discussed or partially addressed. Classify as Agree, Partially Agree, or Disagree with a rationale and suggested action.Show a brief summary of all comments before starting the interactive walkthrough:
## Unresolved Review Comments — PR #<number> (<title>)
| # | Category | Author | Assessment | File |
|---|----------|--------|------------|------|
| 1 | <category> | @<author> | Agree/Partially Agree/Disagree | `<path>:<line>` |
| 2 | <category> | @<author> | Agree/Partially Agree/Disagree | `PR-level` |
Total: <count> comments — Agree: n, Partially Agree: n, Disagree: n
Walking through each comment below...
For each comment, in order:
---
### [<current>/<total>] [<category>] by @<author>
> <comment body>
**File**: `<path>` (line <line>) ← omit for PR-level comments
**Assessment**: <Agree | Partially Agree | Disagree>
**Rationale**: <1-3 sentences>
**Suggested action**: <recommended action>
Ask the user what to do. Present the following action choices and wait for the user's response before proceeding. The user may pick one of the predefined actions or provide free-text instructions:
type: "thread" (inline review thread), offer:
type: "comment" (PR-level comment), offer:
Execute the chosen action — code fixes and commits are applied immediately during the walkthrough. GitHub API actions (reply, comment, resolve) are deferred to Phase 4 (ideally after pushing). During this phase, confirm the reply/comment content with the user and queue it for later execution. When an action includes a code fix, record the commit hash so it can be referenced in the queued reply/comment.
git log for style), confirm it with the user, and commit.type: "thread" only): Make the code change, draft a commit message following the repository's commit message conventions (check git log for style), confirm it with the user, and commit. Ask the user what to reply (or suggest a draft reply) and confirm the content. Queue the reply and resolve for Phase 4.type: "thread"): Make the code change, draft a commit message following the repository's commit message conventions (check git log for style), confirm it with the user, and commit. Ask the user what to reply (or suggest a draft reply) and confirm the content. Queue the reply for Phase 4.type: "comment"): Make the code change, draft a commit message following the repository's commit message conventions (check git log for style), confirm it with the user, and commit. Ask the user what to comment (or suggest a draft) and confirm the content. Queue the comment for Phase 4.type: "thread" only): Ask the user what to reply (or suggest a draft reply) and confirm the content. Queue the reply and resolve for Phase 4.type: "thread"): Ask the user what to reply (or suggest a draft reply) and confirm the content. Queue the reply for Phase 4.type: "comment"): Ask the user what to comment (or suggest a draft) and confirm the content. Queue the comment for Phase 4.After completing the action (or skipping), move to the next comment and repeat.
After all comments have been walked through:
## Triage Summary
| # | Category | Author | Assessment | Action |
|---|----------|--------|------------|--------|
| 1 | <category> | @<author> | <assessment> | Fixed (committed) & reply & resolve (queued) / Fixed (committed) / Skipped / ... |
| 2 | ... | ... | ... | ... |
Pending GitHub actions: <n> replies, <n> comments, <n> resolves
Ask: "Push?" — If the user agrees, push to the remote. If the user declines, skip this step.
Execute queued replies/comments/resolves — Show the list of pending GitHub API actions. For actions that include a code fix, include the commit hash in the reply/comment (e.g., "Fixed in abc1234.").
gh api to POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/repliesgh api to POST /repos/{owner}/{repo}/issues/{pull_number}/commentsgh api graphql using thread_id (not comment_id)Show the final result:
## Triage Complete
| # | Category | Author | Assessment | Action Taken |
|---|----------|--------|------------|--------------|
| 1 | <category> | @<author> | <assessment> | Fixed & replied & resolved / Fixed / Skipped / ... |
| 2 | ... | ... | ... | ... |
- Fixed: n
- Replied/Commented: n
- Resolved: n
- Skipped: n
gh api repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies -f body="<reply>"gh api repos/{owner}/{repo}/issues/{pull_number}/comments -f body="<reply>"gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "<thread_id>"}) { thread { id } } }'type: "comment", always include a link to the original comment (url from JSON) at the beginning of the reply body (e.g., > Re: <url>\n\n<reply body>). PR-level comments have no threading, so without a link readers cannot tell which comment the reply addresses.gh commands for GitHub data.development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.