con un clic
fix-pr-review
Fix unresolved PR review comments, reply, and resolve threads
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Fix unresolved PR review comments, reply, and resolve threads
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Create a GitHub issue (bug report or feature request) following project templates
Create a pull request with conventional commit title, auto-detected base branch, and filled-in PR template
Code review current changes using project review standards before creating a PR
Run lint, typecheck, and svelte-check to validate the codebase
| name | fix-pr-review |
| description | Fix unresolved PR review comments, reply, and resolve threads |
Address all unresolved review threads on a pull request: fix code, reply to each comment, resolve threads, commit.
PR number (optional): $ARGUMENTS
Get repo owner and name:
gh repo view --json owner,name -q '"\(.owner.login)/\(.name)"'
Split into OWNER and REPO variables for GraphQL queries.
If $ARGUMENTS is empty — use the PR associated with the current branch:
gh pr view --json number,url -q '.number'
If $ARGUMENTS contains a PR number — fetch that PR's head branch and switch to it if not already on it:
PR_BRANCH=$(gh pr view $ARGUMENTS --json headRefName -q '.headRefName')
CURRENT_BRANCH=$(git branch --show-current)
If PR_BRANCH != CURRENT_BRANCH, checkout the PR branch:
git checkout "$PR_BRANCH"
If the branch doesn't exist locally yet:
gh pr checkout $ARGUMENTS
Single GraphQL query (substitute OWNER, REPO, PR_NUMBER):
gh api graphql -f query='
query {
repository(owner: "OWNER", name: "REPO") {
pullRequest(number: PR_NUMBER) {
reviewThreads(last: 100) {
nodes {
id
isResolved
isOutdated
path
line
startLine
comments(first: 10) {
nodes {
id
databaseId
body
author { login }
path
line
startLine
originalLine
diffHunk
}
}
}
}
}
}
}'
Filter: keep only threads where isResolved == false. Skip isOutdated == true threads (code moved, comment no longer applies). If zero unresolved threads remain, report "No unresolved review threads" and stop.
For each unresolved, non-outdated thread:
body to understand what the reviewer wants.path and line (and startLine if multi-line).setMouseIgnore." Do NOT write generic replies like "Fixed as suggested."For each fixed thread, run both mutations. Use the PR number and databaseId of the first comment in the thread for REST reply, or use GraphQL:
Reply via GraphQL:
gh api graphql -f query='
mutation {
addPullRequestReviewThreadReply(input: {
pullRequestReviewThreadId: "THREAD_ID",
body: "REPLY_TEXT"
}) {
comment { id }
}
}'
Resolve the thread:
gh api graphql -f query='
mutation {
resolveReviewThread(input: {
threadId: "THREAD_ID"
}) {
thread { isResolved }
}
}'
For praise/acknowledgment comments (no code change needed), reply with a brief "Thanks!" and resolve.
Batch optimization: if multiple threads can be resolved at once, combine mutations:
gh api graphql -f query='
mutation {
a: resolveReviewThread(input: {threadId: "ID1"}) { thread { isResolved } }
b: resolveReviewThread(input: {threadId: "ID2"}) { thread { isResolved } }
}'
Stage only the files modified during this process. Create a single commit:
fix: address PR review feedback
Include a body listing each file and what was changed.
Print summary:
git push to update the PRrg instead of grep and fd instead of find.