triage-pr-reviews
Installation
SKILL.md
Triage PR Review Comments
Phase 1: Fetch and Analyze
- Run
gh pr-reviews [arg] --jsonto 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 viagh apithread_id(string, only fortype: "thread"): inline review thread IDtype:"thread"(inline review) or"comment"(PR-level)author,body,url: comment metadatacommit_id,path,line,diff_hunk(only fortype: "thread"): file location and diff contextcategory: one ofsuggestion,nitpick,issue,question,approval,informationalresolved(bool),reason(string): resolution status and rationalereplies(array, optional, only fortype: "thread"with multiple comments): follow-up comments in the thread, each withauthor,body,created_at,url
- Check if PR metadata (number, title, url) is already available from conversation context. If not (e.g., when a PR number/URL is explicitly passed as argument), run
gh pr view [arg] --json number,title,urlto get it. - For
type: "thread"comments, usepath,line, anddiff_hunkfrom the JSON response to identify the exact file location. Fortype: "comment"(PR-level), there is no file location. - Check code context for each comment. Leverage any existing conversation context first. Only fetch additional context via
gh pr diffor file reads when necessary. - Evaluate each comment against the code context. When a thread has
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.