CodeRabbit Intake
Minimal pipeline for CodeRabbit-created GitHub issues. These issues are already well-structured with clear context, file locations, and actionable tasks — no heavy research needed.
When to Use
- User says "do coderabbit issues", "pick up a coderabbit ticket", "work on coderabbit issues"
- During issue-triage when
author.login === "app/coderabbitai" - Direct invocation with a coderabbit issue URL
Configuration
# Target repository (checked in order):
# 1. $CR_TARGET_REPO env var (e.g., "Comfy-Org/ComfyUI_frontend")
# 2. Git remote origin if in a repo
# 3. Prompt user
Workflow
Step 1: Determine Target Repository
# Check env var first
if [ -n "$CR_TARGET_REPO" ]; then
REPO="$CR_TARGET_REPO"
# Try git remote
elif git remote get-url origin 2>/dev/null; then
REPO=$(git remote get-url origin | sed 's/.*github.com[:/]\(.*\)\.git/\1/' | sed 's/.*github.com[:/]\(.*\)/\1/')
else
# Prompt user
fi
Step 2: Find Newest Unclaimed Issue
# Find newest open coderabbit issue without "in progress" label
# Note: --author flag doesn't work reliably for bot accounts, so filter with jq
gh issue list --repo "$REPO" \
--state open \
--json number,title,url,labels,createdAt,author \
--limit 30 | jq '[.[] | select(.author.login == "app/coderabbitai") | select(.labels | map(.name) | index("in progress") | not)] | sort_by(.createdAt) | reverse | .[0]'
If no issues found:
✅ No unclaimed CodeRabbit issues in $REPO.
Step 3: Fetch Issue Details
gh issue view $NUMBER --repo "$REPO" --json title,body,labels,url,createdAt
Step 4: Assess Complexity
Parse the issue body and determine complexity:
Complex indicators (suggest full pipeline):
- 5+ files mentioned across different directories
- Keywords: "centralize", "audit", "throughout codebase", "refactor all", "create new system", "implement store", "add rollback"
- Vague scope without specific file references
- Multiple acceptance criteria
- New architecture/patterns required
Simple indicators (terminal branch OK):
- 1-3 specific files listed
- Keywords: "fix type", "rename", "update", "align with", "follow pattern", "localize", "replace"
- Clear single transformation (e.g., "replace X with Y")
- Single PR/comment reference with clear instruction
Score: Count complex vs simple signals.
Step 5: Present Choice
## CodeRabbit Issue Found
**Issue:** #$NUMBER - $TITLE
**Created:** $DATE
**URL:** $URL
### Complexity Assessment
$ASSESSMENT_REASONING
---
**Choose approach:**
**(a) Full Pipeline** — Use `ticket-intake` for research, planning, and structured implementation
→ Load: `ticket-intake` with issue URL
**(b) Terminal Branch** — Implement directly, quality-checks, PR
→ Continue below
Wait for user input.
Step 6: Claim Issue (Terminal Branch)
If user chooses (b):
# Get current GitHub username
USERNAME=$(gh api user --jq '.login')
# Add "in progress" label
gh issue edit $NUMBER --repo "$REPO" --add-label "in progress"
# Assign to self
gh issue edit $NUMBER --repo "$REPO" --add-assignee "$USERNAME"
Step 7: Output Implementation Context
Parse and structure the issue body:
## Implementation Context
**Issue:** #$NUMBER - $TITLE
**Claimed by:** @$USERNAME
**Status:** in progress
### Task
$EXTRACTED_TASK_DESCRIPTION
### Affected Files
- `$FILE1` — $WHAT_TO_DO
- `$FILE2` — $WHAT_TO_DO
### References
- **Originating PR:** $PR_LINK
- **Discussion:** $COMMENT_LINK
- **Requested by:** @$REQUESTER
### Code Context
$ANY_CODE_SNIPPETS_FROM_ISSUE
---
## Next Steps
1. **Implement** the changes described above
2. **Run quality checks:**
Load the quality-checks skill
3. **Create PR:**
```bash
gh pr create --repo $REPO --fill --body "Fixes #$NUMBER
## Summary
[Brief description]
## Changes
- [Change 1]
- [Change 2]"
### Step 8: Hand Off to Full Pipeline (if chosen)
If user chooses (a):
```markdown
Handing off to full pipeline...
Load the `ticket-intake` skill with:
$ISSUE_URL
Parsing CodeRabbit Issue Body
CodeRabbit issues follow a consistent structure:
## Context
[Link to PR and comment]
## Issue / Problem / Goal
[Description]
## Affected Files / File Location / Locations
- `path/to/file.ts`
## References / Related
- PR: #1234
- Discussion: [link]
- Requested by: @user
Extract:
- Task: From "Issue", "Problem", "Goal", "Task", "Requested Action" sections
- Files: From "Affected Files", "File Location", "Locations" sections
- PR Reference: URLs matching
github.com/.*/pull/\d+ - Comment Reference: URLs matching
#discussion_r\d+ - Requester:
@usernameafter "Requested by"
Error Handling
No "in progress" Label
If the label doesn't exist in the repo:
⚠️ Label "in progress" not found in $REPO.
Creating it now...
gh label create "in progress" --repo "$REPO" --color "FFA500" --description "Issue is being worked on"
Issue Already Claimed
If the issue already has "in progress" label or assignee, skip and find next:
Issue #$NUMBER already claimed. Finding next...
Auth Issues
❌ GitHub CLI not authenticated or lacks permissions.
Run: gh auth login
Notes
- This is a terminal branch — no runs/ directory or persistent state
- Reuses existing
quality-checksskill for verification - PR creation uses standard
gh pr createwith issue link - Complexity assessment is heuristic — human makes final call
Integration with Issue Triage
During issue-triage sessions, CodeRabbit issues should be skipped (not individually triaged):
- Author is
coderabbitai[bot]orapp/coderabbitai - These are auto-generated refactoring suggestions
- Handle them in batches using this skill, not during triage
Batch Handling Suggestions
When many CodeRabbit issues accumulate (20+), suggest to maintainers:
- Batch-close low-priority: Close refactoring issues that aren't urgent
- Tech debt document: Convert to a tracking document instead of individual issues
- Good first issue: Tag actionable ones with
good first issuefor contributors - Triage session: Run dedicated CodeRabbit intake session to clear backlog
Finding All CodeRabbit Issues
# List all open CodeRabbit issues
gh issue list --repo "$REPO" --state open --limit 100 \
--json number,title,createdAt,labels \
| jq '[.[] | select(.author.login == "coderabbitai" or .author.login == "app/coderabbitai")]'
