<< All versions
Skill v1.0.1
currentAutomated scan100/100domengabrovsek/agent-config/pr-comments
+4 new
──Details
PublishedSeptember 27, 2026 at 05:01 AM
Content Hashsha256:acc0305648012dd9...
Git SHAdc512f7912ca
Bump Typepatch
──Files
Files (1 file, 4.2 KB)
SKILL.md4.2 KBactive
SKILL.md · 57 lines · 4.2 KB
version: "1.0.1" name: pr-comments description: "Watches an open PR for reviewer comments and addresses them: fixes the code, replies inline to bots, and drafts replies to humans for the user to post. Use after opening a PR, when the user says 'address the comments' or 'check the PR comments', or when a reviewer comments."
Address PR Review Comments
Watch and address comments on: $ARGUMENTS (default: the current branch's PR)
Workflow
why-no-hook: skill workflow guidance; each step requires understanding the surrounding context (repo, task shape, prior state).
- Start a Monitor with
bash scripts/gh-comments-monitor.sh [pr-number], resolved inside this skill's own directory. Usetimeout_ms: 1800000and the description "PR comments on <branch-name>"(review-time: see section note) - React to each line:
(review-time: see section note)
comment|<kind>|<id>|<author>|<bot|human>|<url>: handle the comment as below- Monitor expiry: re-arm the same script. Seen IDs persist, so nothing repeats
(review-time: see section note) pr-closed|<state>orno-pr|<branch>: report and stop(review-time: see section note)error|persistent-failure: report and stop(review-time: see section note)
- Read the comment and its thread:
gh api repos/{owner}/{repo}/pulls/comments/<id>for inline,.../pulls/<n>/reviews/<id>for a review,.../issues/comments/<id>for conversation(review-time: see section note) - Judge it against the code: valid, partly valid, or not applicable. Check the claim in the source before agreeing or disagreeing
(review-time: see section note) - Fix valid points, bot or human: make the change, run
npm run verify:fastonce per batch when package.json declares it, otherwise/verify-done. Commit, push. Batch comments that arrive together into one commit when they touch the same code(review-time: see section note) - Reply by author type:
(review-time: see section note)
- Bot: post the reply yourself. Inline comments get a thread reply:
gh api repos/{owner}/{repo}/pulls/<n>/comments/<id>/replies -f body=.... A review body or conversation comment gets a conversation comment that quotes the line it answers(review-time: see section note) - Human: never post. Add the draft to
.claude/state/runs/<branch-slug>/reply-drafts.mdwith the comment URL, and show the user the URL and the draft.hooks/pre-pr-reply-gate.shblocks inline replies to humans(hook)
- Update the PR body with
gh pr editwhen a fix changes what the PR does(review-time: see section note)
Reply voice
Write as the engineer who owns the PR.
- One to three sentences. Name the change and its commit, or the reason for leaving the code as it is
(review-time: see section note) - No thanks-openers, no "Great catch", no "You're right", no apologies, no emoji
(review-time: see section note) - End every reply you post with a blank line, then
<sub>Posted by <agent> on behalf of @<login></sub>on its own line. Name your host (Claude Code, Codex, pi), and take the login fromgh api user --jq .login. Mention the agent nowhere else, and leave the footer off drafts the user posts.hooks/pre-pr-reply-gate.shblocks a posted comment without it(hook) - Disagree with evidence: the file and line, or the test that covers the case
(review-time: see section note) - Run
write-plainon each reply before posting or drafting(review-time: see section note)
Examples:
- A fix, with the footer on its own line:
```markdown Fixed in a1b2c3d. The retry now stops after the third attempt.
<sub>Posted by Claude Code on behalf of @octocat</sub> ```
- "Leaving this as is.
parseDatealready rejects empty input, seesrc/date.ts:42and the test indate.test.ts."
Rules
- Never resolve a human reviewer's thread. The reviewer resolves it
(review-time: see section note) - Never dismiss a review or re-request review without the user asking
(review-time: see section note) - A comment asking for a change outside the PR's scope gets a reply naming the follow-up, not a fix
(review-time: see section note) - The same bot comment failing the same fix twice escalates to the user
(review-time: see section note)