一键导入
process-review-comments
Process PR review comments iteratively, one by one. Use whenever asked to address incoming review feedback on a pull request.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Process PR review comments iteratively, one by one. Use whenever asked to address incoming review feedback on a pull request.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Reviews a full branch for correctness, idioms, comments, optimization balance, and testing — via parallel subagents per focus area. Use before requesting external review or merging.
Python guidelines. Use when writing, reviewing or specifying python code
| name | process-review-comments |
| description | Process PR review comments iteratively, one by one. Use whenever asked to address incoming review feedback on a pull request. |
A companion script at ${SKILL_DIR}/review-comments.sh handles GitHub operations in one shot — never chain multiple gh commands yourself.
${SKILL_DIR}/review-comments.sh listFetch all unresolved inline review comments on the current PR. Outputs a JSON array sorted by creation time.
Empty array ([]) = no comments or no open PR. Output fits in one short context turn.
${SKILL_DIR}/review-comments.sh solve <comment-id> [flags]Handle one comment. All flags are independent — use any subset:
| Flag | Action | Details |
|---|---|---|
-m "msg" | Commit | git commit -m "msg" (stage changes explicitly with git add before calling solve) |
-p | Push | git push (requires -m) |
-r "text" | Reply | Post reply to comment inline |
-R | Resolve | Mark the review thread as resolved |
Examples:
# Just reply + resolve (no code change needed)
${SKILL_DIR}/review-comments.sh solve PRR_kwD... -r "Good catch, fixed." -R
# Commit, push, reply, resolve (full close-out)
${SKILL_DIR}/review-comments.sh solve PRR_kwD... \
-m "fix: address naming conflict in profile" -p -r "Done" -R
The script runs steps in order: commit → push → reply → resolve. Errors early if a step fails.
For each review comment:
PRESENT → ANALYZE → USER → ADDRESS → REVIEW → SUBMIT → CONFIRM → CONTINUE
Show the comment verbatim — quote body, note the path and line from the list output.
Assess honestly. Agree or disagree with technical reasoning. If multiple viable approaches exist, list trade-offs. Challenge when the reviewer is wrong or missing context.
"The reviewer is right about the shadowing, but res conflicts with the HTTP-response convention here. Options: A) result (preferred) — clear intent; B) parsed — more specific; C) res as suggested — against local convention."
"The reviewer suggests error handling here, but this function is intentionally fallible — the caller handles errors. Swallowing would hide failures."
State your recommendation and wait. "I'd go with option A. Which approach?"
Implement the fix based on the user's choice. Draft the commit message and/or reply text.
Explicitly stage the changes you want committed:
git add <files>
Show the user what will be submitted before running anything:
fix: ...solve will useAsk for approval: "Here's what I'll submit. Review the commit message and reply?"
Wait for the user to confirm or suggest edits before proceeding.
Once the user has approved, run solve with all flags in one shot:
${SKILL_DIR}/review-comments.sh solve <commentId> -m "fix: ..." -p -r "Done" -R
Or for reply-only (no code change):
${SKILL_DIR}/review-comments.sh solve <commentId> -r "Explanation here." -R
The script runs steps in order: commit → push → reply → resolve.
Confirm the action was taken and show progress: "Comment 2/5 handled. 3 remaining."
Move to the next comment using the cached list output — the script fetches all comments at once, so there is no need to re-list between iterations. When all are done: "All 6 addressed. Summary: 3 resolved, 2 replied, 1 replied without change. What's next?"
-r "Fixed" -R or just -R depending on whether a reply adds value.Post replies inline, not as top-level PR comments. The solve command handles this correctly — replies go to the comment thread via the API. Never use gh pr comment for review follow-ups.