skills/reviews/SKILL.md
Pull down GitHub PR reviews and inline comments for the current branch (or a given PR number / URL / branch name), address them with code changes, reply where clarification helps other reviewers, resolve handled threads, and post a summary comment. Use when the user invokes /reviews or asks to address PR feedback.
npx skillsauth add dupe-com/skills 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.
Triage and address PR review feedback end-to-end: fetch every comment, fix what's actionable, ask the user about anything ambiguous, reply on threads where it helps other reviewers, resolve handled threads, and post a summary of what was addressed.
User typed /reviews, or asked something like "address review comments", "go through PR feedback", "handle the review on #3239", "respond to the inline comments".
Argument forms (/reviews <arg> or no arg):
gh pr view --json number,url,headRefName,baseRefName,state
If no PR exists for the current branch, stop and tell the user.3239) → gh pr view 3239 --json ...https://github.com/owner/repo/pull/3239) → extract the number, same as abovefeature/foo) → gh pr view feature/foo --json ...Resolve OWNER/REPO from gh repo view --json owner,name.
Stop and ask if:
MERGED or CLOSED (addressing review on a merged PR is almost always wrong).DRAFT and has no reviews yet.main/master and no arg was given.Before editing anything:
git status --porcelain=v1 -b
git rev-parse --abbrev-ref HEAD
headRefName → ask before checking it out. The user may be intentionally addressing reviews from a different worktree..git/rebase-merge, .git/MERGE_HEAD exists) → stop. Finish that first.Run these in parallel — they're independent reads:
# Top-level reviews (the "Approve / Request changes / Comment" submissions, plus their summary body)
gh api "repos/$OWNER/$REPO/pulls/$NUM/reviews?per_page=100"
# Inline review comments (line-by-line — these are the ones with path + line + diff_hunk)
gh api "repos/$OWNER/$REPO/pulls/$NUM/comments?per_page=100"
# Issue/conversation-tab comments (top-level chat on the PR)
gh api "repos/$OWNER/$REPO/issues/$NUM/comments?per_page=100"
# Review threads with resolved state — GraphQL is the only way to get this
gh api graphql -f query='
query($owner:String!, $repo:String!, $num:Int!) {
repository(owner:$owner, name:$repo) {
pullRequest(number:$num) {
reviewThreads(first:100) {
nodes {
id
isResolved
isOutdated
comments(first:50) {
nodes { id databaseId author { login } body path line originalLine diffHunk url }
}
}
}
}
}
}' -F owner="$OWNER" -F repo="$REPO" -F num=$NUM
The GraphQL reviewThreads.nodes[].id is the thread ID needed for resolveReviewThread. The comments.nodes[].databaseId matches the REST id on inline comments — use this to bridge the two APIs.
If pagination hits the cap (>100 of any kind), page through with --paginate or follow Link headers.
Build a working list. For each comment:
Skip:
isResolved == true.isOutdated == true) where the line no longer exists — note for the summary as "no longer applicable" but don't try to fix.state: APPROVED with empty body and no inline asks).Categorize the rest:
Promise.all", "missing null check"). Make the change.For each one:
path, line, and diffHunk from the inline comment payload to locate exactly what they're pointing at).suggestion blocks) when they're correct.Edit.{ commentId, threadId, file, line, what_changed }.Don't batch-edit blindly. Each comment is a separate decision. If two comments contradict, ask the user.
After all changes, run a quick sanity pass:
tsc --noEmit, bun typecheck, npx tsc)Commit the changes locally with a clear message:
git add <changed files>
git commit -m "$(cat <<'EOF'
review: address feedback from PR #<NUM>
<bullet list of what changed, one line per comment>
Co-Authored-By: Claude <[email protected]>
EOF
)"
Do not push. The user reviews and pushes.
Reply when it adds value for other reviewers — not just for the original commenter:
Post a reply to a specific inline comment:
gh api -X POST "repos/$OWNER/$REPO/pulls/$NUM/comments/$COMMENT_ID/replies" \
-f body="<your reply>"
For a thread-level reply via GraphQL:
gh api graphql -f query='
mutation($threadId:ID!, $body:String!) {
addPullRequestReviewThreadReply(input:{pullRequestReviewThreadId:$threadId, body:$body}) {
comment { id url }
}
}' -F threadId="$THREAD_ID" -f body="$BODY"
Keep replies short. One or two sentences. Reference the commit SHA when useful (fixed in abc1234).
Resolve a thread once it's handled (code changed + optional reply posted), or once the user has explicitly said "won't fix" with a reply explaining why.
gh api graphql -f query='
mutation($threadId:ID!) {
resolveReviewThread(input:{threadId:$threadId}) {
thread { id isResolved }
}
}' -F threadId="$THREAD_ID"
Do not resolve threads:
Before posting the summary, surface anything that needs the user:
Wait for user response. Do not guess on these.
After all decisions are made and changes committed, post one summary comment to the PR. Format:
## Review feedback addressed
Thanks for the review! Here's what was addressed in <commit-range>:
### Fixed
- **`path/to/file.ts:42`** — <one-line description> ([comment](url))
- **`path/to/other.ts:88`** — <one-line description> ([comment](url))
### Won't fix (with rationale)
- **`path/to/x.ts:10`** — <reason> ([comment](url))
### Follow-up
- Opened #<issue> for <thing> ([comment](url))
Post it with:
gh pr comment $NUM --body "$(cat <<'EOF'
<rendered summary>
EOF
)"
Skip the summary if there were ≤2 small items handled — individual replies suffice.
gh returns 403 / 404, the user likely needs to re-auth (gh auth refresh -s repo,read:org) or doesn't have write access. Stop and tell them.End-of-skill summary:
Addressed N comments on PR #<num> in <commit-sha>: K fixed, L replied-only, M won't-fix, P escalated to user. Summary posted. Run tests, then push.
data-ai
Rebase the current branch onto origin/main and intelligently resolve any conflicts that arise. Use when the user invokes /rebased or asks to rebase the current branch on main and resolve conflicts.
data-ai
Pin a short personal reminder to the agent's status line. Use when the user types "/note", or says "remind me", "note to self", "pin a note", "set a reminder", or "clear my note". The note is synthesized into a terse line and shown on its own status-line row with a bold sticky-note background, scoped to the current session, until cleared.
development
Error prevention and best practices enforcement for agent-assisted coding. Use when writing code to catch common mistakes, enforce patterns, prevent bugs, validate inputs, handle errors, follow coding standards, avoid anti-patterns, and ensure code quality through proactive checks and guardrails.
development
Uses dupe.com APIs in order to find similar products for the product found in the input URL given by the user.