ワンクリックで
pr-feedback
Fetch unresolved PR review comments, validate them, plan fixes, implement, push, and resolve threads
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Fetch unresolved PR review comments, validate them, plan fixes, implement, push, and resolve threads
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Validate tests and docs, then create a GitHub PR with conventional commit formatting
Review code changes for performance, tree-shaking, bundle size, API ergonomics, and TypeScript best practices
| name | pr-feedback |
| description | Fetch unresolved PR review comments, validate them, plan fixes, implement, push, and resolve threads |
| disable-model-invocation | true |
| argument-hint | ["PR number"] |
Fetch all unresolved review comments from the GitHub PR associated with the current branch, evaluate their validity, plan fixes, and implement them after user approval.
Current branch:
!git branch --show-current
Repository:
!git remote get-url origin 2>&1
PR info:
!gh pr view --json number,title,url,headRefName,baseRefName 2>&1 || echo "NO_PR_FOUND"
$ARGUMENTS
Follow these steps in order. Do NOT skip steps or proceed without completing the previous step.
$ARGUMENTS contains a PR number, use that.Use the GitHub GraphQL API to fetch all unresolved review threads.
Important: The $ character in GraphQL variable declarations is consumed by the shell even inside single quotes when run through the Bash tool. Always write GraphQL queries to a temp file and use -F query=@file to avoid this.
# /tmp/pr-threads.graphql
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviewThreads(first: 100) {
nodes {
id
isResolved
isOutdated
path
line
startLine
diffSide
comments(first: 20) {
nodes {
id
body
author { login }
createdAt
}
}
}
}
}
}
}
-F query=@file:gh api graphql -F query=@/tmp/pr-threads.graphql -f owner='OWNER' -f repo='REPO' -F pr=NUMBER
Replace OWNER, REPO, and NUMBER with the actual values.
Filter the results to only include threads where isResolved is false. Exclude threads where isOutdated is true (the code they reference has already been changed) unless the comment raises a concern that is still relevant.
If there are no unresolved threads, tell the user and stop.
For each unresolved thread:
Present a summary table to the user:
| # | File:Line | Category | Reviewer | Summary | Proposed Action |
|---|-----------|----------|----------|---------|-----------------|
| 1 | src/foo.ts:42 | Valid concern | @user | Missing null check | Fix: add guard clause |
| 2 | src/bar.ts:10 | Disagreement | @user | Suggests interface over type | Reply: project uses type keyword |
Enter plan mode to design the implementation:
npm run build -w libs/<workspace>)npm test -w libs/<workspace>)Present the plan to the user and wait for approval. The user may:
Do NOT proceed to implementation until the user explicitly approves.
After approval:
npm run build -w libs/<workspace>npm test -w libs/<workspace>npm run typecheckgit add -A).git commit -s).git pushAsk the user for confirmation before pushing.
For each addressed thread, reply and then immediately resolve it. Both actions are required per thread.
Important: Write GraphQL mutations to temp files and use -F query=@file to avoid $ being consumed by the shell.
First, write both mutation files (do this once, before the loop):
# /tmp/reply-thread.graphql
mutation($threadId: ID!, $body: String!) {
addPullRequestReviewThreadReply(input: {pullRequestReviewThreadId: $threadId, body: $body}) {
comment { id }
}
}
# /tmp/resolve-thread.graphql
mutation($threadId: ID!) {
resolveReviewThread(input: {threadId: $threadId}) {
thread { isResolved }
}
}
Then, for each thread that should be resolved, run both commands sequentially:
# Step A: Reply
gh api graphql -F query=@/tmp/reply-thread.graphql -f threadId='THREAD_ID' -f body='MESSAGE'
# Step B: Resolve (must run after reply succeeds)
gh api graphql -F query=@/tmp/resolve-thread.graphql -f threadId='THREAD_ID'
Which threads to resolve vs. leave open:
Present a final summary:
code-reviewer agent's criteria (tree-shaking, performance, API design, TypeScript, docs) apply to all code changes made here too.