| name | rabbit-feedback-resolver |
| description | Process and resolve CodeRabbit automated PR review comments. Use when the user says "check rabbit review", "handle coderabbit comments", "resolve rabbit feedback", or mentions CodeRabbit PR comments. Also use after PR creation when CodeRabbit has left automated review comments. |
CodeRabbit Feedback Resolver
Process and resolve CodeRabbit's automated PR review comments systematically.
PR Comments Prohibition (CRITICAL)
NEVER leave new comments directly on GitHub PRs. This is strictly forbidden:
gh pr review --comment- FORBIDDENgh pr comment- FORBIDDEN- Any GraphQL mutation that creates new reviews or PR-level comments - FORBIDDEN
Permitted operations:
- Reply to EXISTING CodeRabbit threads using
addPullRequestReviewThreadReply - Resolve CodeRabbit threads using
resolveReviewThread
WHEN TO USE THIS SKILL
USE THIS SKILL PROACTIVELY when ANY of the following occur:
- User says "check rabbit review" / "handle coderabbit comments" / "resolve rabbit feedback"
- User mentions "coderabbit" or "rabbit" and "PR" or "comments" in the same context
- After PR creation when CodeRabbit has reviewed the PR
- As part of the PR workflow after
pr-revieweragent completes - When PR checks show CodeRabbit has left review comments
CodeRabbit Comment Structure
CodeRabbit comments follow a structured markdown format:
_๐งน Nitpick_ | _๐ต Trivial_ <- Severity indicator (optional)
[Main feedback text]
<details>
<summary>๐ก Optional suggestion</summary>
[Expanded suggestion content]
</details>
<details>
<summary>๐ Committable suggestion</summary>
[Code block with suggested changes]
</details>
<details>
<summary>๐ค Prompt for AI Agents</summary>
[Explicit instructions for AI to follow]
</details>
Key elements to extract:
- Severity:
_๐งน Nitpick_or_๐ต Trivial_= auto-resolvable - Prompt for AI Agents: Explicit instructions - USE THESE DIRECTLY
- Committable suggestion: Ready-to-apply code changes
Prerequisites
CRITICAL: Load the fx-dev:github skill FIRST before running any GitHub API operations. This skill provides essential patterns and error handling for gh CLI commands.
Core Workflow
0. Verify CodeRabbit Configuration (First Run Only)
Before processing feedback, ensure CodeRabbit is configured to read .github/copilot-instructions.md.
CodeRabbit's knowledge_base.code_guidelines feature reads instruction files to understand project conventions. By default, it includes .github/copilot-instructions.md, but this may be disabled or overridden.
Check Configuration
# Check if .coderabbit.yaml exists
if [ -f ".coderabbit.yaml" ]; then
cat .coderabbit.yaml
else
echo "No .coderabbit.yaml found - using defaults"
fi
Configuration States
| State | Action |
|---|---|
No .coderabbit.yaml exists |
Defaults apply - .github/copilot-instructions.md IS read automatically |
Config exists with knowledge_base.code_guidelines.enabled: false |
Update to enabled: true |
Config exists with custom filePatterns missing copilot-instructions.md |
Add .github/copilot-instructions.md to filePatterns |
| Config exists with defaults or explicit copilot-instructions.md | No action needed |
Create/Update Configuration
If configuration needs updating, create or modify .coderabbit.yaml:
# .coderabbit.yaml
# Ensures CodeRabbit reads project conventions from copilot-instructions.md
knowledge_base:
code_guidelines:
enabled: true
# Default patterns include .github/copilot-instructions.md
# Add explicit pattern if using custom filePatterns:
# filePatterns:
# - .github/copilot-instructions.md
# - CLAUDE.md
Minimal config to ensure copilot-instructions.md is read:
knowledge_base:
code_guidelines:
enabled: true
This enables the default file patterns which include .github/copilot-instructions.md.
When to Update copilot-instructions.md
If CodeRabbit feedback conflicts with project conventions (INCORRECT category), update .github/copilot-instructions.md with the correct pattern. Since CodeRabbit reads this file, future reviews will respect the documented conventions.
1. Fetch Unresolved CodeRabbit Threads
Query review threads using GraphQL.
IMPORTANT: Use inline values, NOT $variable syntax. The $ character causes shell escaping issues (Expected VAR_SIGN, actual: UNKNOWN_CHAR).
# Replace OWNER, REPO, PR_NUMBER with actual values
gh api graphql -f query='
query {
repository(owner: "OWNER", name: "REPO") {
pullRequest(number: PR_NUMBER) {
reviewThreads(first: 100) {
nodes {
id
isResolved
path
line
comments(first: 10) {
nodes {
author { login }
body
}
}
}
}
}
}
}'
Filter for: isResolved: false AND author login contains coderabbitai
2. Categorize Each Comment
For each unresolved CodeRabbit comment:
| Category | Indicator | Action |
|---|---|---|
| Nitpick/Trivial | Contains _๐งน Nitpick_ or _๐ต Trivial_ |
Auto-resolve immediately |
| Actionable with AI Prompt | Has ๐ค Prompt for AI Agents section |
Extract prompt, delegate to coder |
| Actionable with Committable | Has ๐ Committable suggestion |
Apply suggestion directly |
| General Feedback | No special sections | Analyze and delegate to coder |
3. Process Each Category
Nitpicks/Trivial
- Resolve immediately without changes
- These are suggestions, not requirements
Actionable with AI Prompt (PREFERRED)
When a comment contains ๐ค Prompt for AI Agents, extract and use it directly:
- Parse the comment body to extract content between
<summary>๐ค Prompt for AI Agents</summary>and the closing</details> - The extracted text contains explicit instructions - pass these to the coder agent verbatim
- After fix is implemented, resolve the thread
Example extraction:
In src/lib/view-config.ts around lines 115 to 118, expand the JSDoc above
NUMERIC_OPERATORS to explicitly state that operators in this set expect numeric
values...
Actionable with Committable Suggestion
- Extract the code block from
๐ Committable suggestionsection - Apply the suggested changes directly using Edit tool
- Commit with message referencing the CodeRabbit suggestion
- Resolve the thread
General Feedback
- Read the feedback carefully
- Determine if it's valid or conflicts with project conventions
- If valid: Delegate to coder agent with context
- If conflicts with project conventions (INCORRECT):
- Reply with explanation and resolve
- Update
.github/copilot-instructions.mdto document the correct pattern - This prevents both Copilot AND CodeRabbit from flagging it again (CodeRabbit reads this file via
knowledge_base.code_guidelines)
4. Resolve Threads
Use GraphQL mutation to resolve each processed thread.
IMPORTANT: Use inline values, NOT $variable syntax.
# Replace THREAD_ID with actual thread ID (e.g., PRRT_kwDONZ...)
gh api graphql -f query='
mutation {
resolveReviewThread(input: {threadId: "THREAD_ID"}) {
thread { isResolved }
}
}'
5. Reply to Threads (When Needed)
For feedback that conflicts with conventions or is being declined.
IMPORTANT: Use inline values, NOT $variable syntax.
# Replace THREAD_ID and message with actual values
gh api graphql -f query='
mutation {
addPullRequestReviewThreadReply(input: {
pullRequestReviewThreadId: "PRRT_xxx",
body: "Your explanation here"
}) {
comment { id }
}
}'
Parsing Helper
To extract the AI prompt from a CodeRabbit comment:
# Extract content between ๐ค Prompt for AI Agents and </details>
echo "$COMMENT_BODY" | sed -n '/๐ค Prompt for AI Agents/,/<\/details>/p' | sed '1d;$d' | sed 's/^```$//'
Success Criteria
Task is INCOMPLETE until ALL of these are done:
- CodeRabbit config verified/updated to read
.github/copilot-instructions.md - All code changes pushed to the PR branch
- EVERY addressed thread resolved via GraphQL mutation
- For INCORRECT feedback:
.github/copilot-instructions.mdupdated to prevent recurrence - Re-query confirms
isResolved: truefor all processed threads - Output summary table
Required Output: Thread Summary Table
| Thread ID | File:Line | Category | Action Taken | Status |
|-----------|-----------|----------|--------------|--------|
| PRRT_xxx | src/foo.ts:42 | Nitpick | Auto-resolved | Resolved |
| PRRT_yyy | src/bar.ts:15 | AI Prompt | Applied JSDoc fix | Resolved |
| PRRT_zzz | lib/util.js:8 | Committable | Applied suggestion | Resolved |
Error Handling
- API failures: Retry with proper auth
- Thread ID issues: Use alternative queries
- Parse failures for AI prompt: Fall back to manual analysis
- Partial resolution is better than none