coderabbit-rate-limits

0
0
Source

Implement CodeRabbit rate limiting, backoff, and idempotency patterns. Use when handling rate limit errors, implementing retry logic, or optimizing API request throughput for CodeRabbit. Trigger with phrases like "coderabbit rate limit", "coderabbit throttling", "coderabbit 429", "coderabbit retry", "coderabbit backoff".

Install

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

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

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.

svg-icon-generator

jeremylongshore

Svg Icon Generator - Auto-activating skill for Visual Content. Triggers on: svg icon generator, svg icon generator Part of the Visual Content skill category.

7824

automating-mobile-app-testing

jeremylongshore

This skill enables automated testing of mobile applications on iOS and Android platforms using frameworks like Appium, Detox, XCUITest, and Espresso. It generates end-to-end tests, sets up page object models, and handles platform-specific elements. Use this skill when the user requests mobile app testing, test automation for iOS or Android, or needs assistance with setting up device farms and simulators. The skill is triggered by terms like "mobile testing", "appium", "detox", "xcuitest", "espresso", "android test", "ios test".

13615

d2-diagram-creator

jeremylongshore

D2 Diagram Creator - Auto-activating skill for Visual Content. Triggers on: d2 diagram creator, d2 diagram creator Part of the Visual Content skill category.

3114

performing-penetration-testing

jeremylongshore

This skill enables automated penetration testing of web applications. It uses the penetration-tester plugin to identify vulnerabilities, including OWASP Top 10 threats, and suggests exploitation techniques. Use this skill when the user requests a "penetration test", "pentest", "vulnerability assessment", or asks to "exploit" a web application. It provides comprehensive reporting on identified security flaws.

4311

performing-security-audits

jeremylongshore

This skill allows Claude to conduct comprehensive security audits of code, infrastructure, and configurations. It leverages various tools within the security-pro-pack plugin, including vulnerability scanning, compliance checking, cryptography review, and infrastructure security analysis. Use this skill when a user requests a "security audit," "vulnerability assessment," "compliance review," or any task involving identifying and mitigating security risks. It helps to ensure code and systems adhere to security best practices and compliance standards.

109

designing-database-schemas

jeremylongshore

Design and visualize efficient database schemas, normalize data, map relationships, and generate ERD diagrams and SQL statements.

1128

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

9521,094

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

846846

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

571699

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

548492

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

673466

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

514280

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.