address-pr-comments
Address unresolved inline PR review comments on a GitHub pull request. Fetches unresolved comments, assesses validity (with extra scrutiny for AI/bot reviewers), implements fixes, leaves a reply on every comment thread, and commits changes. Use when the user asks to address PR comments, resolve review feedback, implement requested changes, or handle PR review threads.
sesori-ai · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add sesori-ai/sesori_apps_monorepo --skill address-pr-comments技能说明
name: address-pr-comments description: Address unresolved inline PR review comments on a GitHub pull request. Fetches unresolved comments, assesses validity (with extra scrutiny for AI/bot reviewers), implements fixes, leaves a reply on every comment thread, and commits changes. Use when the user asks to address PR comments, resolve review feedback, implement requested changes, or handle PR review threads.
address-pr-comments
Addresses unresolved inline PR review comments by assessing their validity, implementing fixes, and leaving a reply on each comment thread. Every thread gets a response — either confirming the fix or explaining why the comment was not addressed. Only addressed threads left exclusively by other AI agents or bots may be resolved by the agent. A thread containing any human-authored review comment always stays unresolved for a human to close, even when its fix was implemented and pushed.
Core Rules
- Unresolved comments only: Unless explicitly told otherwise, only fetch and address comments where
is_resolved == false. Use the--unresolvedflag. - Every thread gets a reply: After assessing and acting on a comment, you MUST post a reply to that comment thread. No thread should be left without a response.
- Do not reply twice: Before posting a reply, inspect the comments after the most recent
[Sesori reply]. If the last comment is already a[Sesori reply]and there are no later reviewer comments, skip the thread. If the only later comments are acknowledgment-only bot comments (for example "Acknowledged", "Thanks", "Looks good", or "Accepted") with no new request, objection, question, or requested change, skip the thread. Do not skip if a later comment raises a follow-up, pushback, asks for clarification, or requests additional changes; handle that as a new actionable comment. - Reply prefix: Every reply must start with
[Sesori reply]so it is clear the response comes from the agent, not the human user. - Never resolve human comments: After replying, RESOLVE an
Addressedthread only when authoritative GitHub actor metadata identifies every non-[Sesori reply]review author asBot. Username and writing-style heuristics never authorize resolution. If actor metadata is unavailable, ambiguous, or identifies any reviewer asUser, NEVER resolve the thread. Also leave everyNot addressed,Partially addressed, orQuestionthread unresolved regardless of author. - All comments are assessed: Every comment must be evaluated for validity. Do not automatically assume any comment is correct.
- Extra scrutiny for AI/bot comments: Comments from AI reviewers or bots require more careful assessment. They are more likely to be incorrect, irrelevant, or based on stale context.
- Human comments are trusted by default: Comments from actual humans should be assumed valid unless you have a strong reason to believe they are wrong, detrimental, or cause likely unintended side effects.
- Single commit: All fixes can be committed together in a single commit. The user squash-merges at the end.
- Never amend: Always create new commits when addressing feedback. Do not use
git commit --amend,git rebaseto rewrite published history, or any other history-rewriting operation. If you make a mistake in a commit, fix it with a follow-up commit rather than rewriting. - Never force push: Do not use force push under any circumstances. If the remote branch has moved ahead of your local branch, pull/merge and continue with normal commits. History rewriting on a shared branch is forbidden.
- Outdated comments: If
is_outdated == true, assess whether the comment is still relevant. If the issue still exists in the current code, address it. If not, reply explaining why it is no longer applicable.
Workflow
Step 1: Fetch Unresolved Comments
Use the pr-inline-comments skill to fetch ONLY unresolved comments:
../pr-inline-comments/scripts/fetch.sh <pr-number> --unresolved [--repo OWNER/REPO]
If the user specifies a time window (e.g., "since yesterday"), also pass --since <ISO_8601>.
Important: The JSON output can be large and may get truncated in the terminal. Always save it to a file first:
../pr-inline-comments/scripts/fetch.sh <pr-number> --unresolved > /tmp/pr_comments.json
Then parse the file with jq or similar tools. You will receive an array of thread objects. Each thread contains:
thread_id: The root comment ID (use this for posting replies)path: File pathline: Line numberis_resolved,is_outdated: Resolution statuscomments[]: Array of comments in the thread, each withuser,body,created_at
Step 2: Assess Each Comment
For each comment thread, read the relevant code and assess the comment's validity.
Validity Assessment
A comment is valid if:
- It correctly identifies a real issue (bug, style violation, architecture problem, missing test, etc.)
- The suggested change is appropriate and correct
- It is actionable and clear
A comment is invalid if:
- It is based on a misunderstanding of the code
- The suggestion would introduce a bug or worsen the code
- It is stylistically opinionated without project convention backing
- It suggests that the syntax is invalid but the analyzer accepts it
- It is outdated and no longer applies
- It is from an AI/bot and contains obvious hallucinations or generic advice
AI/Bot Identification
Apply extra scrutiny when the comment author (user field) matches any of these patterns:
- Username indicates author is a bot — commonly name contains:
bot,[bot],github-actions,codex,gemini,copilot,claude,gpt,ai- - The comment uses very formal, mechanical, or templated language
- The suggestion is generic and lacks specific context about this codebase
These are assessment heuristics only. They do not establish actor identity for thread resolution; a hum
阅读完整来源 ↗