Kaiber
Generate, edit, and beat-sync AI video with leading models in one workspace.
pr-review-comments
Fetches PR review comments from GitHub, batches similar comments together using semantic analysis, and walks through each batch one at a time with user confirmation between each. Tracks progress in REVIEW_COMMENT_WORK.md for resumability. Use when the user wants to address PR review feedback, fix...
Full skill instructions
This skill helps you systematically work through PR review comments by batching similar ones together and addressing them one batch at a time with user feedback between each.
This skill is for triaging and editing PR review feedback only. It does not grant permission to mutate source control, and it must never offer to mutate source control on the user's behalf.
Never run source-control mutation commands from this skill. Never ask whether the user wants you to run them. Never suggest that you can run them. This includes, but is not limited to:
jj describe, jj commit, jj bookmark move/create/delete, jj git push, jj squash, jj rebase, jj newgit add, git commit, git push, branch creation, branch switching, rebases, amendsAllowed GitHub-only actions when explicitly prompted:
gh pr edit when the user specifically asks for that.Important interpretation rules:
REVIEW_COMMENT_WORK.md, then stop and report. It is not permission to commit, move bookmarks, push, update the PR branch, or offer to do so.REVIEW_COMMENT_WORK.md exists in the current directoryFirst, check if REVIEW_COMMENT_WORK.md exists in the current working directory:
ls -la REVIEW_COMMENT_WORK.md 2>/dev/null
Run the script to fetch unresolved PR review thread comments plus actionable top-level PR review bodies:
~/.pi/agent/skills/pr-review-comments/get_pr_review_comments
This will create individual {comment-id}-review-feedback.md files in the current directory. Top-level review body files use PRR_... IDs and include a note that they are not resolvable review threads. Top-level review bodies that you have acknowledged with the configured reaction (EYES by default) are skipped on subsequent fetches.
List all the generated comment files:
ls -la *-review-feedback.md 2>/dev/null
Each file contains:
Use the task tool to investigate comments in parallel. Spawn a task for each comment file to analyze it independently. This significantly speeds up the triage process.
For each comment, the task should read the comment file, examine the relevant code and context, and determine:
Example task invocation:
task({
tasks: [
{ description: "Analyze PR comment PRRC_abc-review-feedback.md: Read the comment file, examine the referenced code at [file:line], determine if the feedback is valid/applicable. Return: comment ID, file:line, issue summary, verdict (INCLUDE/QUESTIONABLE/EXCLUDE), and reasoning." },
{ description: "Analyze PR comment PRRC_def-review-feedback.md: Read the comment file, examine the referenced code at [file:line], determine if the feedback is valid/applicable. Return: comment ID, file:line, issue summary, verdict (INCLUDE/QUESTIONABLE/EXCLUDE), and reasoning." },
// ... one task per comment file
]
})
Each task should classify its comment as:
Collect results from all tasks before proceeding to batching.
Group INCLUDE comments into batches based on semantic similarity. Consider:
For each batch, note:
Important: A batch can be a single comment if it's unique. Don't force unrelated comments together.
Create the work file as a scratchpad and todo list. Use whatever format feels natural, but include:
Example structure (adapt as needed):
# PR Review Comment Work
## Current State
Phase: Awaiting triage approval
## Triage Summary
### Included (5 comments → 2 batches)
| Comment | File | Issue | Verdict |
|---------|------|-------|---------|
| PRR_abc | auth.py:45 | Add try/catch | ✅ Valid |
| PRR_def | user.py:112 | Handle network errors | ✅ Valid |
| PRR_ghi | Header.tsx:23 | Typo "recieve" | ✅ Valid |
### Questionable (1 comment)
| Comment | File | Issue | Concern |
|---------|------|-------|---------|
| PRR_jkl | api.py:89 | Add rate limiting | ⚠️ Out of scope for this PR |
### Excluded (1 comment)
| Comment | File | Issue | Reason |
|---------|------|-------|--------|
| PRR_mno | utils.py:34 | Unused import | ❌ Import is actually used on line 156 |
## Batches (pending approval)
### Batch 1: Error Handling
**Files**: auth.py, user.py
**Comments**: PRR_abc, PRR_def
### Batch 2: Typos
**Files**: Header.tsx
**Comments**: PRR_ghi
## Notes
- (scratchpad space)
STOP and present a CONCISE overview to the user. Format:
PR Review Triage
Will address (N comments in M batches):
- Batch 1 - [Name]: [brief description] (N comments)
- Batch 2 - [Name]: [brief description] (N comments)
Questionable (need your input):
- [file:line] - [issue] — [your concern]
Recommending to skip:
- [file:line] - [issue] — [reason]
Let me know if you want to exclude anything, include something I flagged, or adjust the batches.
WAIT for user response. Do not proceed until they approve or provide feedback.
Process user feedback:
Update REVIEW_COMMENT_WORK.md with any changes.
If changes were made, present the updated overview and ask for approval again.
Once approved, update work file:
[PENDING]Proceed to Working on a Batch.
Read REVIEW_COMMENT_WORK.md to understand:
Before starting work, update REVIEW_COMMENT_WORK.md:
[IN PROGRESS]Use tasks for investigation, but make edits sequentially.
If the batch has multiple comments, consider using parallel tasks to investigate each comment's context before making changes:
task({
tasks: [
{ description: "Investigate comment PRRC_abc: Read [file] around line [N], understand the current implementation, and recommend the specific change needed to address: '[comment summary]'. Do NOT make edits." },
{ description: "Investigate comment PRRC_def: Read [file] around line [N], understand the current implementation, and recommend the specific change needed to address: '[comment summary]'. Do NOT make edits." },
]
})
After gathering investigation results, make the actual code changes sequentially (to avoid edit conflicts):
cd backend && make lintcd frontend && ENV=local bun run lintImportant: The comment files contain specific instructions. Follow them, especially the verification steps.
Only resolve or acknowledge comments after the corresponding fix is visible on the PR, or after the user explicitly instructs you to resolve/acknowledge now. Local unpushed edits are not enough.
After the fix is visible on the PR, resolve each threaded PRRC_... comment in the batch using the resolve-pr-comment skill. For top-level PRR_... review body files, add the acknowledgement reaction instead; GitHub does not expose those as resolvable review threads.
For a top-level review body:
~/.pi/agent/skills/pr-review-comments/ack_pr_review_comment PRR_...
# or pass the generated file:
~/.pi/agent/skills/pr-review-comments/ack_pr_review_comment PRR_...-review-feedback.md
The acknowledgement reaction defaults to EYES; set PR_REVIEW_ACK_REACTION to use another GitHub reaction enum. Acknowledged top-level review bodies are ignored by get_pr_review_comments.
Get the PR's review threads to find the thread ID for each comment:
gh api graphql -f query='
query {
repository(owner: "OWNER", name: "REPO") {
pullRequest(number: PR_NUMBER) {
reviewThreads(first: 100) {
nodes {
id
isResolved
comments(first: 1) {
nodes { id }
}
}
}
}
}
}'
Find the thread where comments.nodes[0].id matches your comment ID (e.g., PRRC_...). The parent id is the thread ID (PRRT_...).
Resolve the thread:
gh api graphql -f query='
mutation {
resolveReviewThread(input: {threadId: "PRRT_..."}) {
thread { isResolved }
}
}'
After completing the batch:
Update REVIEW_COMMENT_WORK.md:
[DONE]Delete the processed comment files for this batch:
rm {comment-id}-review-feedback.md
STOP and ask the user:
"Batch N complete. I [brief summary of changes made]. Changes are local and have not been committed, pushed, or resolved on GitHub.
Any feedback on these changes, or should I proceed to Batch N+1?"
WAIT for the user's response. Do not proceed until they respond. Do not treat "proceed" as permission to commit, move bookmarks, push, update the PR branch, offer source-control actions, or resolve GitHub comments.
When all batches are marked as done:
REVIEW_COMMENT_WORK.md to reflect completionresolve-pr-comment skillGenerate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience