Agent Skillsstella/stella › rabbit-round

rabbit-round

GitHub

用于系统化处理CodeRabbit等自动化PR审查评论的单次执行技能。通过获取上下文和未解决评论,分析建议并选择接受或反驳,最后按规范回复评论以完成代码审查交互。

.ai/local-skills/rabbit-round/SKILL.md stella/stella

Trigger Scenarios

需要处理CodeRabbit、Gemini、Copilot等Bot的PR审查评论 需要对自动化审查建议进行一次性批量响应

Install

npx skills add stella/stella --skill rabbit-round -g -y
More Options

Non-standard path

npx skills add https://github.com/stella/stella/tree/main/.ai/local-skills/rabbit-round -g -y

Use without installing

npx skills use stella/stella@rabbit-round

指定 Agent (Claude Code)

npx skills add stella/stella --skill rabbit-round -a claude-code -g -y

安装 repo 全部 skill

npx skills add stella/stella --all -g -y

预览 repo 内 skill

npx skills add stella/stella --list

SKILL.md

Frontmatter
{
    "name": "rabbit-round",
    "description": "Process automated PR review comments systematically in one pass for CodeRabbit, Google Code Assist (Gemini), GitHub Copilot, Devin, and similar review bots."
}

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

  1. 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 plain-text CC attribution)
    gh api user --jq '.login'
    

    Every published reply must end with CC on behalf of {username}. Keep the username as plain text: never prefix it with @ or turn it into a link, because that would trigger a GitHub mention notification.

  2. 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.

  3. 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)
  4. 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}"
    
  5. 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 }
      }
    }'
    
  6. 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.

  7. Check nitpick suggestions (marked with [nitpick] or similar) - these should also be addressed, not ignored.

  8. Implement accepted suggestions:

    • Make the code changes for suggestions you agreed with
    • Group related changes logically
  9. 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.

  10. 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
  11. 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).

  12. 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
  13. 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}. Substitute the current GitHub username without an @ prefix or profile link.

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

Version History

  • 85792bd Current 2026-07-24 16:12

Same Skill Collection

.agents/skills/click-around/SKILL.md
.agents/skills/conventions-ai/SKILL.md
.agents/skills/conventions-db/SKILL.md
.agents/skills/conventions-i18n/SKILL.md
.agents/skills/conventions-ingestion/SKILL.md
.agents/skills/conventions-perf/SKILL.md
.agents/skills/conventions-scale/SKILL.md
.agents/skills/conventions-security/SKILL.md
.agents/skills/conventions-use-effect/SKILL.md
.agents/skills/conventions-ux/SKILL.md
.agents/skills/dev/SKILL.md
.agents/skills/finish-pr/SKILL.md
.agents/skills/new-handler/SKILL.md
.agents/skills/open-pr/SKILL.md
.agents/skills/plan/SKILL.md
.agents/skills/product-deep-think/SKILL.md
.agents/skills/product-think/SKILL.md
.agents/skills/rabbit-round/SKILL.md
.agents/skills/regression-hunt/SKILL.md
.agents/skills/security-audit/SKILL.md
.agents/skills/update-deps/SKILL.md
.ai/local-skills/click-around/SKILL.md
.ai/local-skills/conventions-ai/SKILL.md
.ai/local-skills/conventions-db/SKILL.md
.ai/local-skills/conventions-i18n/SKILL.md
.ai/local-skills/conventions-ingestion/SKILL.md
.ai/local-skills/conventions-perf/SKILL.md
.ai/local-skills/conventions-scale/SKILL.md
.ai/local-skills/conventions-security/SKILL.md
.ai/local-skills/conventions-use-effect/SKILL.md
.ai/local-skills/conventions-ux/SKILL.md
.ai/local-skills/dev/SKILL.md
.ai/local-skills/new-handler/SKILL.md
.ai/local-skills/open-pr/SKILL.md
.ai/local-skills/plan/SKILL.md
.ai/local-skills/product-deep-think/SKILL.md
.ai/local-skills/security-audit/SKILL.md
.ai/local-skills/update-deps/SKILL.md
packages/cli/skills/stella-cli/SKILL.md
packages/skills/blueprints/answer-from-sources/SKILL.md
packages/skills/blueprints/blank/SKILL.md
packages/skills/blueprints/check-against-rules/SKILL.md
packages/skills/blueprints/intake-to-draft/SKILL.md
.agents/skills/conventions-testing/SKILL.md
.ai/local-skills/conventions-testing/SKILL.md

Metadata

Files
0
Version
85792bd
Hash
b1231438
Indexed
2026-07-24 16:12

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-16 22:33
浙ICP备14020137号-1 $mapa de visitantes$