CO

coderabbit-rate-limits

Provides strategies for handling API rate limits when building tools that interface with CodeRabbit.

Install

mkdir -p .claude/skills/coderabbit-rate-limits && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/8376" && unzip -o skill.zip -d .claude/skills/coderabbit-rate-limits && rm skill.zip

Installs to .claude/skills/coderabbit-rate-limits

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Understand and handle CodeRabbit and GitHub API rate limits for review
70 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Check GitHub API rate limit status
  • Implement exponential backoff for API requests
  • Execute bulk data retrieval using GraphQL
  • Cache review metrics to minimize API calls
  • Handle CodeRabbit command rate limits

How it works

The skill provides scripts to monitor GitHub API rate limits and implements pagination and GraphQL queries to reduce the number of API calls. It also documents best practices for handling CodeRabbit-specific command throttling.

Inputs & outputs

You give it
GitHub repository owner and name
You get back
Rate-limited API query results or cached metrics

When to use coderabbit-rate-limits

  • Implementing retry logic for API requests
  • Optimizing PR review query throughput
  • Handling rate limit errors

About this skill

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

FactorLimitNotes
Concurrent reviews per orgVaries by planFree: 1, Pro: 5, Enterprise: custom
Max PR size~3000 filesLarger PRs may timeout
Re-review cooldown~30 secondsBetween @coderabbitai full review commands
Command rate~10/minute/repoPR comment commands

GitHub API (Affects Automation Scripts)

TierRate LimitReset Window
Unauthenticated60 req/hourRolling
Personal Access Token5,000 req/hourRolling
GitHub App5,000 req/hour/installationRolling
gh CLI5,000 req/hourRolling

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
set -euo pipefail

ORG="${1:?Usage: $0 <org> <repo>}"
REPO="${2:?Usage: $0 <org> <repo>}"

# Check remaining rate limit before bulk queries
REMAINING=$(gh api rate_limit --jq '.resources.core.remaining')
echo "GitHub API calls remaining: $REMAINING"

if [ "$REMAINING" -lt 100 ]; then
  RESET=$(gh api rate_limit --jq '.resources.core.reset | todate')
  echo "WARNING: Low rate limit. Resets at $RESET"
  echo "Consider waiting or reducing query scope."
  exit 1
fi

# Safe pagination: process in small batches
PAGE=1
PER_PAGE=10
while true; do
  RESULT=$(gh api "repos/$ORG/$REPO/pulls?state=closed&per_page=$PER_PAGE&page=$PAGE" --jq 'length')
  [ "$RESULT" -eq 0 ] && break

  gh api "repos/$ORG/$REPO/pulls?state=closed&per_page=$PER_PAGE&page=$PAGE" \
    --jq '.[].number' | while read -r PR_NUM; do
    # Process each PR
    echo "Processing PR #$PR_NUM"

    # Rate-limit-safe: check remaining before each sub-query
    SUB_REMAINING=$(gh api rate_limit --jq '.resources.core.remaining')
    if [ "$SUB_REMAINING" -lt 50 ]; then
      echo "Rate limit low ($SUB_REMAINING remaining). Pausing..."
      sleep 60
    fi

    gh api "repos/$ORG/$REPO/pulls/$PR_NUM/reviews" \
      --jq '[.[] | select(.user.login=="coderabbitai[bot]")] | length' 2>/dev/null
  done

  PAGE=$((PAGE + 1))
  [ "$PAGE" -gt 5 ] && break   # Safety limit
done

Step 3: Handle CodeRabbit Command Rate Limits

# 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"
  }'

Step 5: Cache CodeRabbit Metrics

#!/bin/bash
# cache-coderabbit-metrics.sh - Cache review data to avoid repeated API calls
set -euo pipefail

ORG="${1:?Usage: $0 <org> <repo>}"
REPO="${2:?Usage: $0 <org> <repo>}"
CACHE_FILE="/tmp/coderabbit-metrics-$ORG-$REPO.json"
CACHE_TTL=3600  # 1 hour

# Check cache freshness
if [ -f "$CACHE_FILE" ]; then
  CACHE_AGE=$(( $(date +%s) - $(stat -c %Y "$CACHE_FILE" 2>/dev/null || stat -f %m "$CACHE_FILE") ))
  if [ "$CACHE_AGE" -lt "$CACHE_TTL" ]; then
    echo "Using cached data (age: ${CACHE_AGE}s)"
    cat "$CACHE_FILE"
    exit 0
  fi
fi

echo "Fetching fresh data..."
METRICS=$(gh api graphql -f query='
query($owner: String!, $repo: String!) {
  repository(owner: $owner, name: $repo) {
    pullRequests(last: 50, states: [MERGED, CLOSED]) {
      totalCount
      nodes {
        number
        reviews(first: 5) {
          nodes {
            author { login }
            state
          }
        }
      }
    }
  }
}' -f owner="$ORG" -f repo="$REPO" --jq '
  .data.repository.pullRequests | {
    total: .totalCount,
    reviewed: [.nodes[] | select([.reviews.nodes[] | select(.author.login == "coderabbitai")] | length > 0)] | length,
    approved: [.nodes[] | select([.reviews.nodes[] | select(.author.login == "coderabbitai" and .state == "APPROVED")] | length > 0)] | length
  }')

echo "$METRICS" | tee "$CACHE_FILE"

Output

  • GitHub API rate limit status checked
  • Automation scripts with rate limit awareness
  • CodeRabbit command rate limits documented
  • Efficient GraphQL queries for bulk data
  • Caching strategy to reduce API calls

Error Handling

IssueCauseSolution
gh api returns 403Rate limit exceededWait for reset or use GraphQL
CodeRabbit ignores commandToo many commandsWait 1-2 min, resend once
Bulk script fails mid-runRate limit hit during iterationAdd rate limit check in loop
GraphQL query failsMalformed queryValidate query in GitHub GraphQL Explorer
Stale cached dataCache TTL too longReduce TTL or force refresh

Resources

Next Steps

For security configuration, see coderabbit-security-basics.

When not to use it

  • When performing single, non-automated requests
  • When ignoring GitHub API rate limit headers

Prerequisites

CodeRabbit installed on repositoryGitHub CLI (gh) or API accessUnderstanding of GitHub rate limit headers

Limitations

  • Concurrent reviews per organization vary by plan
  • Max PR size is approximately 3000 files
  • CodeRabbit command rate is limited to approximately 10 per minute per repository

How it compares

Unlike manual API polling, this approach uses GraphQL and local caching to stay within GitHub's rate limit tiers.

Compared to similar skills

coderabbit-rate-limits side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
coderabbit-rate-limits (this skill)027dReviewIntermediate
n8n-expression-syntax64moNo flagsBeginner
claude-in-chrome-troubleshooting22moReviewIntermediate
openrouter-common-errors327dCautionIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

n8n-expression-syntax

czlonkowski

Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, or working with webhook data in workflows.

6111

claude-in-chrome-troubleshooting

trailofbits

Diagnose and fix Claude in Chrome MCP extension connectivity issues. Use when mcp__claude-in-chrome__* tools fail, return "Browser extension is not connected", or behave erratically.

211

openrouter-common-errors

jeremylongshore

Execute diagnose and fix common OpenRouter API errors. Use when troubleshooting failed requests. Trigger with phrases like 'openrouter error', 'openrouter not working', 'openrouter 401', 'openrouter 429', 'fix openrouter'.

39

linear-common-errors

jeremylongshore

Diagnose and fix common Linear API errors. Use when encountering Linear API errors, debugging integration issues, or troubleshooting authentication problems. Trigger with phrases like "linear error", "linear API error", "debug linear", "linear not working", "linear authentication error".

16

gamma-common-errors

jeremylongshore

Debug and resolve common Gamma API errors. Use when encountering authentication failures, rate limits, generation errors, or unexpected API responses. Trigger with phrases like "gamma error", "gamma not working", "gamma API error", "gamma debug", "gamma troubleshoot".

12

groq-common-errors

jeremylongshore

Diagnose and fix Groq common errors and exceptions. Use when encountering Groq errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "groq error", "fix groq", "groq not working", "debug groq".

12

Search skills

Search the agent skills registry