From rr
Automatically fixes CodeRabbit review comments on the current branch's PR. For each actionable comment, applies the fix, replies to the comment with what was done, then commits and pushes all changes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rr:fix-coderabbit-commentsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- Called automatically by the PostToolUse hook after a `git push`
git pushFix CodeRabbit Comments:
- [ ] Step 1: PR identified for current branch
- [ ] Step 2: CodeRabbit comments fetched and triaged
- [ ] Step 3: Fixes applied per comment
- [ ] Step 4: Replies posted to each comment
- [ ] Step 5: Changes committed and pushed
gh pr list --head <branch> --json number,url,headRefName --jq '.[0]'
If no PR exists for this branch, stop silently with no output.
gh api repos/apolloio/leadgenie/pulls/<pr_number>/comments \
--jq '[.[] | select(.user.login == "coderabbitai[bot]") | {id: .id, path: .path, line: .original_line, body: .body, in_reply_to_id: .in_reply_to_id}]'
Only process top-level comments (those without in_reply_to_id).
Skip comments where:
gh api repos/apolloio/leadgenie/pulls/<pr_number>/comments --jq '[.[] | select(.in_reply_to_id == <id>)]')For each actionable comment, record: id, path, line, and the requested change.
For each actionable comment:
pathfixed — change applied successfullyalready_resolved — code already matches the requestcannot_apply — change is ambiguous, risky, or requires context not available (state reason)Keep a log: [{comment_id, path, outcome, reason}]
For every processed comment (fixed, already resolved, or cannot apply), post a reply:
gh api repos/apolloio/leadgenie/pulls/comments/<comment_id>/replies \
-X POST \
-f body="<reply>"
Reply templates:
"Fixed — <one sentence describing the change made>.""Already resolved — <one sentence explaining why the code already satisfies this>.""Skipped — <reason: ambiguous/out of scope/requires broader refactor>."If any fixes were applied:
git add -p # stage only changed files, not everything
git commit -m "Address CodeRabbit review comments"
git push
If nothing was fixed (all already_resolved or cannot_apply), do not create an empty commit.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub rrjoson/claude-skills --plugin rr