Understand and handle CodeRabbit and GitHub API rate limits for review automation.
Use when hitting rate limits on @coderabbitai commands, automating review queries,
or building scripts that interact with CodeRabbit via the GitHub API.
Trigger with phrases like "coderabbit rate limit", "coderabbit throttling",
"coderabbit too many requests", "github api rate limit coderabbit".
Understand and handle CodeRabbit and GitHub API rate limits for review automation.
Use when hitting rate limits on @coderabbitai commands, automating review queries,
or building scripts that interact with CodeRabbit via the GitHub API.
Trigger with phrases like "coderabbit rate limit", "coderabbit throttling",
"coderabbit too many requests", "github api rate limit coderabbit".
allowed-tools
Read, Write, Edit, Bash(gh:*), Bash(curl:*)
version
1.11.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
["saas","coderabbit","rate-limits","github-api"]
compatibility
Designed for Claude Code, also compatible with Codex and OpenClaw
CodeRabbit Rate Limits
Overview
CodeRabbit rate limits apply at two levels: (1) CodeRabbit's own processing limits on how many reviews it can run concurrently, and (2) GitHub API rate limits when you build automation that queries CodeRabbit review data. This skill covers both and provides patterns for handling limits gracefully.
Prerequisites
CodeRabbit installed on repository
GitHub CLI (gh) or API access for automation
Understanding of GitHub rate limit headers
Rate Limit Tiers
CodeRabbit Review Processing
Factor
Limit
Notes
Concurrent reviews per org
Varies by plan
Free: 1, Pro: 5, Enterprise: custom
Max PR size
~3000 files
Larger PRs may timeout
Re-review cooldown
~30 seconds
Between @coderabbitai full review commands
Command rate
~10/minute/repo
PR comment commands
GitHub API (Affects Automation Scripts)
Tier
Rate Limit
Reset Window
Unauthenticated
60 req/hour
Rolling
Personal Access Token
5,000 req/hour
Rolling
GitHub App
5,000 req/hour/installation
Rolling
gh CLI
5,000 req/hour
Rolling
Instructions
Step 1: Check Current GitHub API Rate Limit
set -euo pipefail
# Check your current rate limit status
gh api rate_limit --jq '{
core: {
limit: .resources.core.limit,
remaining: .resources.core.remaining,
reset: (.resources.core.reset | todate)
},
search: {
limit: .resources.search.limit,
remaining: .resources.search.remaining,
reset: (.resources.search.reset | todate)
}
}'
Step 2: Handle Rate Limits in Automation Scripts
#!/bin/bash# rate-safe-query.sh - GitHub API queries with rate limit awareness
-euo pipefail
ORG=
REPO=
REMAINING=$(gh api rate_limit --jq )
[ -lt 100 ];
RESET=$(gh api rate_limit --jq )
1
PAGE=1
PER_PAGE=10
;
RESULT=$(gh api --jq )
[ -eq 0 ] &&
gh api \
--jq | -r PR_NUM;
SUB_REMAINING=$(gh api rate_limit --jq )
[ -lt 50 ];
60
gh api \
--jq 2>/dev/null
PAGE=$((PAGE + ))
[ -gt 5 ] &&
# If you send too many @coderabbitai commands in quick succession,# CodeRabbit may not respond to all of them.# Best practices:1. Wait for CodeRabbit to finish one command before sending another
2. Don't spam "full review" -- one is enough, it processes the latest
3. Use "summary" instead of "full review" if you just want the walkthrough
4. Wait 2-5 minutes after PR push for the initial review before using commands
# Rate limit symptoms:# - CodeRabbit doesn't respond to a command# - Review appears incomplete# - Multiple partial reviews on the same PR# Fix: Wait 1-2 minutes and resend the command once.
Step 4: Efficient Bulk Queries with GraphQL
set -euo pipefail
ORG="${1:-your-org}"
REPO="${2:-your-repo}"# GraphQL uses far fewer API calls than REST for bulk data# One GraphQL call = data that would take 20+ REST calls
gh api graphql -f query='
query($owner: String!, $repo: String!) {
repository(owner: $owner, name: $repo) {
pullRequests(last: 20, states: [MERGED, CLOSED]) {
nodes {
number
title
reviews(first: 5) {
nodes {
author { login }
state
submittedAt
}
}
}
}
}
}' -f owner="$ORG" -f repo="$REPO" --jq '
.data.repository.pullRequests.nodes[] |
{
pr: .number,
title: .title,
coderabbit_reviews: [.reviews.nodes[] | select(.author.login == "coderabbitai")] | length,
coderabbit_state: ([.reviews.nodes[] | select(.author.login == "coderabbitai")] | last | .state) // "none"
}'