Rabbit Round
Process automated PR review comments systematically. Run this for CodeRabbit, Google
Code Assist (Gemini), GitHub Copilot, Devin, and similar review bots.
This skill is single-pass. It does one round, reports the current
state, and stops. Do not schedule future runs from inside this skill.
Instructions
Get context - PR number and current GitHub user:
# Get PR number for this branch
gh pr view --json number -q '.number'
# Get current GitHub username (for CC attribution)
gh api user --jq '.login'
Fetch all bot comments - Prefer GraphQL for review threads to only process unresolved ones:
# Fetch all review threads and filter for unresolved ones only
gh api graphql --paginate -f query='
query($endCursor: String) {
repository(owner: "{owner}", name: "{repo}") {
pullRequest(number: {pr_number}) {
reviewThreads(first: 50, after: $endCursor) {
nodes {
id
isResolved
path
comments(first: 10) {
nodes {
databaseId
body
author { login }
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
}
}' | jq '.data.repository.pullRequest.reviewThreads.nodes | map(select(.isResolved == false))'
# Issue comments (top-level PR comments, used by some bots)
gh api repos/{owner}/{repo}/issues/{pr_number}/comments --paginate
Filter for comments from coderabbitai[bot], gemini-code-assist[bot],
github-copilot[bot], devin-ai-integration[bot],
and similar bots.
Human comments: Never resolve or minimize human comments. You may reply
to push back if incorrect, or ask for clarification - but leave the thread
open for the human to resolve.
For each bot comment (review or issue), analyze the suggestion and decide:
- Accept: If the suggestion improves code quality, correctness, or follows
our patterns
- Push back: If the suggestion doesn't apply, is incorrect, or conflicts
with our conventions (documented in CLAUDE.md files)
Reply to each comment:
For review comments, use in_reply_to to thread the reply:
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments \
-X POST \
-f body="[response]
CC on behalf of @{username}" \
-f commit_id="{commit_sha}" \
-f path="{file_path}" \
-F in_reply_to={comment_id}
For issue comments (top-level PR comments), reply on the issue thread:
gh api repos/{owner}/{repo}/issues/{pr_number}/comments \
-X POST \
-f body="[response]
CC on behalf of @{username}"
Resolve addressed bot review threads using GraphQL (never resolve human
comments):
# First, get thread IDs for the PR
gh api graphql -f query='
query {
repository(owner: "{owner}", name: "{repo}") {
pullRequest(number: {pr_number}) {
reviewThreads(first: 50) {
nodes {
id
isResolved
comments(first: 1) {
nodes { databaseId }
}
}
}
}
}
}'
# Then resolve each thread by its GraphQL ID
gh api graphql -f query='
mutation {
resolveReviewThread(input: {threadId: "{thread_id}"}) {
thread { isResolved }
}
}'
Minimize (hide) other addressed bot issue comments using GraphQL.
Some bots post as issue comments instead of review comments. These
cannot be "resolved" like review threads; instead, minimize them:
# Use the node_id from the issue comment JSON response
gh api graphql -f query='
mutation {
minimizeComment(input: {
subjectId: "{comment_node_id}",
classifier: RESOLVED
}) {
minimizedComment { isMinimized }
}
}'
Only minimize bot comments you have already addressed (accepted or
pushed back on). Never minimize human comments.
Check nitpick suggestions (marked with [nitpick] or similar) -
these should also be addressed, not ignored.
Implement accepted suggestions:
- Make the code changes for suggestions you agreed with
- Group related changes logically
Check review bot status:
Before considering this round clean, verify that all review
bot checks have completed:
gh pr checks $(gh pr view --json number -q '.number') \
--json name,state \
| jq '[.[] | select(
(.name | test("coderabbit|copilot|gemini|devin"; "i"))
and (.state | IN("PENDING","QUEUED","REQUESTED",
"WAITING","IN_PROGRESS"))
)]'
If any review bot checks are still in a non-terminal state,
this round is not clean even if there are zero unresolved
comments. Report pending_bots and stop.
Check and fix failing CI:
# Find the latest CI run for this PR's branch
gh run list --branch $(git branch --show-current) --limit 5 \
--json status,conclusion,name,databaseId
# View failed run logs
gh run view {run_id} --log-failed
- If CI is failing, read the logs and fix the root cause
- Common failures: formatting (run
bun run format with --write),
lint errors, type errors, test failures
- Fix the issues in code, don't just suppress them
Run quality checks:
Run the quality checks for the project (using ruff format,
ruff check, ty for Python, bun run lint, bun run format,
bun run typecheck for TypeScript).
Commit and push:
- Create a commit with a message like
fix: address review comments
- Push to the current branch
- If you pushed new commits in this step, return
pending_bots
in the final status because CI and review bots need to run on
the new commit
Report one round status and stop:
Return exactly one of:
clean: no actionable bot comments remain, review bot checks are
complete, and CI is green
pending_bots: review bots have not finished yet, or new
commits were just pushed and checks are re-running
needs_changes: actionable bot comments remain
failing_ci: CI is failing and still needs fixes
If the round is clean and the PR is currently a draft, mark it as
ready for review:
gh pr ready
If the round is not clean, summarize what remains and stop. A
caller may invoke /rabbit-round again later.
Decision Guidelines
Accept suggestions when they:
- Fix actual bugs or potential issues
- Improve type safety
- Follow established patterns in CLAUDE.md
- Enhance readability without over-engineering
- Address security concerns
Push back when suggestions:
- Conflict with documented conventions
- Would over-engineer a simple solution
- Are based on incorrect assumptions about the codebase
- Would break existing patterns for marginal benefit
- Are purely stylistic and conflict with our style
Response Templates
Reply format: Put the response first, then sign with CC on behalf of @{username}.
Accepting:
Accepted and implemented. [Brief description of change].
CC on behalf of @username
Accepting with modification:
Agreed with the principle. Implementing with a slight modification: [explain].
CC on behalf of @username
Pushing back:
Pushing back on this. [Reason]. Our convention is [explain pattern/reference
CLAUDE.md].
CC on behalf of @username
Already addressed:
Already addressed in commit [hash]. [Brief description].
CC on behalf of @username
Source: stella/stella — distributed by TomeVault.
1---2name: rabbit-round3description: Process automated PR review comments systematically in one pass for CodeRabbit, Google Code Assist (Gemini), GitHub Copilot, Devin, and similar review bots. Use when this capability is needed.4---56# Rabbit Round78Process automated PR review comments systematically. Run this for CodeRabbit, Google9Code Assist (Gemini), GitHub Copilot, Devin, and similar review bots.1011This skill is single-pass. It does one round, reports the current12state, and stops. Do not schedule future runs from inside this skill.1314## Instructions15161. **Get context** - PR number and current GitHub user:1718 ```bash19 # Get PR number for this branch20 gh pr view --json number -q '.number'2122 # Get current GitHub username (for CC attribution)23 gh api user --jq '.login'24 ```25262. **Fetch all bot comments** - Prefer GraphQL for review threads to only process unresolved ones:2728 ```bash29 # Fetch all review threads and filter for unresolved ones only30 gh api graphql --paginate -f query='31 query($endCursor: String) {32 repository(owner: "{owner}", name: "{repo}") {33 pullRequest(number: {pr_number}) {34 reviewThreads(first: 50, after: $endCursor) {35 nodes {36 id37 isResolved38 path39 comments(first: 10) {40 nodes {41 databaseId42 body43 author { login }44 }45 }46 }47 pageInfo {48 hasNextPage49 endCursor50 }51 }52 }53 }54 }' | jq '.data.repository.pullRequest.reviewThreads.nodes | map(select(.isResolved == false))'5556 # Issue comments (top-level PR comments, used by some bots)57 gh api repos/{owner}/{repo}/issues/{pr_number}/comments --paginate58 ```5960 Filter for comments from `coderabbitai[bot]`, `gemini-code-assist[bot]`,61 `github-copilot[bot]`, `devin-ai-integration[bot]`,62 and similar bots.6364 **Human comments:** Never resolve or minimize human comments. You may reply65 to push back if incorrect, or ask for clarification - but leave the thread66 open for the human to resolve.67683. **For each bot comment** (review or issue), analyze the suggestion and decide:69 - **Accept**: If the suggestion improves code quality, correctness, or follows70 our patterns71 - **Push back**: If the suggestion doesn't apply, is incorrect, or conflicts72 with our conventions (documented in CLAUDE.md files)73744. **Reply to each comment**:7576 For **review comments**, use `in_reply_to` to thread the reply:7778 ```bash79 gh api repos/{owner}/{repo}/pulls/{pr_number}/comments \80 -X POST \81 -f body="[response]8283 CC on behalf of @{username}" \84 -f commit_id="{commit_sha}" \85 -f path="{file_path}" \86 -F in_reply_to={comment_id}87 ```8889 For **issue comments** (top-level PR comments), reply on the issue thread:9091 ```bash92 gh api repos/{owner}/{repo}/issues/{pr_number}/comments \93 -X POST \94 -f body="[response]9596 CC on behalf of @{username}"97 ```98995. **Resolve addressed bot review threads** using GraphQL (never resolve human100 comments):101102 ```bash103 # First, get thread IDs for the PR104 gh api graphql -f query='105 query {106 repository(owner: "{owner}", name: "{repo}") {107 pullRequest(number: {pr_number}) {108 reviewThreads(first: 50) {109 nodes {110 id111 isResolved112 comments(first: 1) {113 nodes { databaseId }114 }115 }116 }117 }118 }119 }'120121 # Then resolve each thread by its GraphQL ID122 gh api graphql -f query='123 mutation {124 resolveReviewThread(input: {threadId: "{thread_id}"}) {125 thread { isResolved }126 }127 }'128 ```1291306. **Minimize (hide) other addressed bot issue comments** using GraphQL.131 Some bots post as issue comments instead of review comments. These132 cannot be "resolved" like review threads; instead, minimize them:133134 ```bash135 # Use the node_id from the issue comment JSON response136 gh api graphql -f query='137 mutation {138 minimizeComment(input: {139 subjectId: "{comment_node_id}",140 classifier: RESOLVED141 }) {142 minimizedComment { isMinimized }143 }144 }'145 ```146147 Only minimize bot comments you have already addressed (accepted or148 pushed back on). Never minimize human comments.1491507. **Check nitpick suggestions** (marked with `[nitpick]` or similar) -151 these should also be addressed, not ignored.1521538. **Implement accepted suggestions**:154 - Make the code changes for suggestions you agreed with155 - Group related changes logically1561579. **Check review bot status**:158159 Before considering this round clean, verify that all review160 bot checks have completed:161162 ```bash163 gh pr checks $(gh pr view --json number -q '.number') \164 --json name,state \165 | jq '[.[] | select(166 (.name | test("coderabbit|copilot|gemini|devin"; "i"))167 and (.state | IN("PENDING","QUEUED","REQUESTED",168 "WAITING","IN_PROGRESS"))169 )]'170 ```171172 If any review bot checks are still in a non-terminal state,173 this round is **not clean** even if there are zero unresolved174 comments. Report `pending_bots` and stop.17517610. **Check and fix failing CI**:177178 ```bash179 # Find the latest CI run for this PR's branch180 gh run list --branch $(git branch --show-current) --limit 5 \181 --json status,conclusion,name,databaseId182183 # View failed run logs184 gh run view {run_id} --log-failed185 ```186187 - If CI is failing, read the logs and fix the root cause188 - Common failures: formatting (run `bun run format` with `--write`),189 lint errors, type errors, test failures190 - Fix the issues in code, don't just suppress them19119211. **Run quality checks**:193194 Run the quality checks for the project (using `ruff format`,195 `ruff check`, `ty` for Python, `bun run lint`, `bun run format`,196 `bun run typecheck` for TypeScript).19719812. **Commit and push**:199 - Create a commit with a message like200 `fix: address review comments`201 - Push to the current branch202 - If you pushed new commits in this step, return `pending_bots`203 in the final status because CI and review bots need to run on204 the new commit20520613. **Report one round status and stop**:207208 Return exactly one of:209 - `clean`: no actionable bot comments remain, review bot checks are210 complete, and CI is green211 - `pending_bots`: review bots have not finished yet, or new212 commits were just pushed and checks are re-running213 - `needs_changes`: actionable bot comments remain214 - `failing_ci`: CI is failing and still needs fixes215216 If the round is `clean` and the PR is currently a draft, mark it as217 ready for review:218219 ```bash220 gh pr ready221 ```222223 If the round is not `clean`, summarize what remains and stop. A224 caller may invoke `/rabbit-round` again later.225226## Decision Guidelines227228**Accept suggestions when they:**229230- Fix actual bugs or potential issues231- Improve type safety232- Follow established patterns in CLAUDE.md233- Enhance readability without over-engineering234- Address security concerns235236**Push back when suggestions:**237238- Conflict with documented conventions239- Would over-engineer a simple solution240- Are based on incorrect assumptions about the codebase241- Would break existing patterns for marginal benefit242- Are purely stylistic and conflict with our style243244## Response Templates245246Reply format: Put the response first, then sign with `CC on behalf of @{username}`.247248**Accepting:**249250```text251Accepted and implemented. [Brief description of change].252253CC on behalf of @username254```255256**Accepting with modification:**257258```text259Agreed with the principle. Implementing with a slight modification: [explain].260261CC on behalf of @username262```263264**Pushing back:**265266```text267Pushing back on this. [Reason]. Our convention is [explain pattern/reference268CLAUDE.md].269270CC on behalf of @username271```272273**Already addressed:**274275```text276Already addressed in commit [hash]. [Brief description].277278CC on behalf of @username279```280281---282> Source: [stella/stella](https://github.com/stella/stella) — distributed by [TomeVault](https://tomevault.io).283<!-- tomevault:4.0:skill_md:2026-05-23 -->