coderabbit-observability

0
1
Source

Set up comprehensive observability for CodeRabbit integrations with metrics, traces, and alerts. Use when implementing monitoring for CodeRabbit operations, setting up dashboards, or configuring alerting for CodeRabbit integration health. Trigger with phrases like "coderabbit monitoring", "coderabbit metrics", "coderabbit observability", "monitor coderabbit", "coderabbit alerts", "coderabbit tracing".

Install

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

Installs to .claude/skills/coderabbit-observability

About this skill

CodeRabbit Observability

Overview

Monitor CodeRabbit AI code review effectiveness, review latency, and team adoption. Key metrics include time-to-first-review (how fast CodeRabbit posts after PR creation), comment acceptance rate (comments resolved vs dismissed), review coverage (percentage of PRs reviewed), and per-repository review volume.

Prerequisites

  • CodeRabbit installed on GitHub/GitLab organization
  • GitHub CLI (gh) authenticated with org access
  • Access to CodeRabbit dashboard at app.coderabbit.ai

Key Metrics

MetricTargetWhy It Matters
Review coverage> 90%PRs without review = blind spots
Time-to-review< 5 minFast feedback keeps developers in flow
Comment acceptance> 40%Low acceptance = noisy reviews
Comments per PR3-8Too many = fatigue, too few = not useful
Review state: APPROVED> 60%High approval = clean code culture

Instructions

Step 1: Measure Review Coverage

#!/bin/bash
# coderabbit-coverage.sh - Review coverage for a repo
set -euo pipefail

ORG="${1:?Usage: $0 <org> <repo> [days]}"
REPO="${2:?Usage: $0 <org> <repo> [days]}"
DAYS="${3:-30}"

echo "=== CodeRabbit Review Coverage ==="
echo "Repository: $ORG/$REPO"
echo "Period: Last $DAYS days"
echo ""

TOTAL=0
REVIEWED=0
APPROVED=0
CHANGES_REQUESTED=0

SINCE=$(date -d "$DAYS days ago" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -v-${DAYS}d +%Y-%m-%dT%H:%M:%SZ)

for PR_NUM in $(gh api "repos/$ORG/$REPO/pulls?state=all&per_page=50&sort=created&direction=desc" \
  --jq ".[] | select(.created_at > \"$SINCE\") | .number"); do

  TOTAL=$((TOTAL + 1))

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

  if [ "$CR_STATE" != "none" ] && [ "$CR_STATE" != "null" ]; then
    REVIEWED=$((REVIEWED + 1))
    [ "$CR_STATE" = "APPROVED" ] && APPROVED=$((APPROVED + 1))
    [ "$CR_STATE" = "CHANGES_REQUESTED" ] && CHANGES_REQUESTED=$((CHANGES_REQUESTED + 1))
  fi
done

if [ "$TOTAL" -gt 0 ]; then
  echo "Total PRs: $TOTAL"
  echo "Reviewed by CodeRabbit: $REVIEWED ($(( REVIEWED * 100 / TOTAL ))%)"
  echo "  Approved: $APPROVED"
  echo "  Changes Requested: $CHANGES_REQUESTED"
else
  echo "No PRs found in the last $DAYS days"
fi

Step 2: Track Comment Volume and Acceptance

set -euo pipefail
ORG="${1:-your-org}"
REPO="${2:-your-repo}"

echo "=== CodeRabbit Comment Analysis ==="
echo ""

TOTAL_COMMENTS=0
PR_COUNT=0

for PR_NUM in $(gh api "repos/$ORG/$REPO/pulls?state=closed&per_page=20" --jq '.[].number'); do
  COMMENTS=$(gh api "repos/$ORG/$REPO/pulls/$PR_NUM/comments" \
    --jq '[.[] | select(.user.login=="coderabbitai[bot]")] | length' 2>/dev/null || echo "0")

  if [ "$COMMENTS" -gt 0 ]; then
    TOTAL_COMMENTS=$((TOTAL_COMMENTS + COMMENTS))
    PR_COUNT=$((PR_COUNT + 1))
    echo "PR #$PR_NUM: $COMMENTS comments"
  fi
done

if [ "$PR_COUNT" -gt 0 ]; then
  echo ""
  echo "Average comments per PR: $(( TOTAL_COMMENTS / PR_COUNT ))"
  echo ""
  echo "Healthy ranges:"
  echo "  1-3 comments/PR → Profile may be too chill"
  echo "  3-8 comments/PR → Good signal-to-noise ratio"
  echo "  10+ comments/PR → Consider switching to chill profile"
fi

Step 3: Build a GitHub Actions Dashboard

# .github/workflows/coderabbit-metrics.yml
name: CodeRabbit Weekly Metrics

on:
  schedule:
    - cron: '0 9 * * 1'    # Every Monday at 9 AM UTC
  workflow_dispatch:         # Manual trigger

jobs:
  metrics:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/github-script@v7
        with:
          script: |
            const { data: pulls } = await github.rest.pulls.list({
              owner: context.repo.owner,
              repo: context.repo.repo,
              state: 'closed',
              per_page: 50,
              sort: 'updated',
              direction: 'desc',
            });

            let reviewed = 0;
            let approved = 0;
            let changesRequested = 0;
            let totalComments = 0;

            for (const pr of pulls) {
              const { data: reviews } = await github.rest.pulls.listReviews({
                owner: context.repo.owner,
                repo: context.repo.repo,
                pull_number: pr.number,
              });

              const crReview = reviews.find(r => r.user.login === 'coderabbitai[bot]');
              if (crReview) {
                reviewed++;
                if (crReview.state === 'APPROVED') approved++;
                if (crReview.state === 'CHANGES_REQUESTED') changesRequested++;
              }

              const { data: comments } = await github.rest.pulls.listReviewComments({
                owner: context.repo.owner,
                repo: context.repo.repo,
                pull_number: pr.number,
              });
              totalComments += comments.filter(c => c.user.login === 'coderabbitai[bot]').length;
            }

            const summary = [
              `## CodeRabbit Weekly Metrics`,
              `- **Coverage**: ${reviewed}/${pulls.length} PRs reviewed (${Math.round(reviewed/pulls.length*100)}%)`,
              `- **Approved**: ${approved}`,
              `- **Changes Requested**: ${changesRequested}`,
              `- **Avg Comments/PR**: ${reviewed > 0 ? Math.round(totalComments/reviewed) : 0}`,
            ].join('\n');

            core.summary.addRaw(summary).write();
            core.info(summary);

Step 4: Set Up Alerts for Review Gaps

# .github/workflows/coderabbit-alert.yml
name: CodeRabbit Review Alert

on:
  pull_request:
    types: [opened]

jobs:
  check-review-expected:
    runs-on: ubuntu-latest
    steps:
      - name: Wait for CodeRabbit review
        uses: actions/github-script@v7
        with:
          script: |
            // Wait 10 minutes, then check if CodeRabbit reviewed
            await new Promise(r => setTimeout(r, 600000));

            const { data: reviews } = await github.rest.pulls.listReviews({
              owner: context.repo.owner,
              repo: context.repo.repo,
              pull_number: context.issue.number,
            });

            const crReview = reviews.find(r => r.user.login === 'coderabbitai[bot]');

            if (!crReview) {
              core.warning(
                'CodeRabbit has not reviewed this PR after 10 minutes. ' +
                'Check: App installation, .coderabbit.yaml, base_branches config.'
              );
            }

Step 5: CodeRabbit Dashboard Summary

# Build a summary dashboard with these data points:

## Weekly Dashboard Template

| Metric | This Week | Last Week | Trend |
|--------|-----------|-----------|-------|
| PRs opened | | | |
| PRs reviewed by CR | | | |
| Coverage % | | | |
| Avg comments/PR | | | |
| Approval rate | | | |
| Time to first review | | | |

## Action Items:
- Coverage < 90%: Check App installation, base_branches config
- Avg comments > 10: Switch to "chill" profile
- Avg comments < 2: Switch to "assertive" profile
- Approval rate < 50%: Review path_instructions for relevance

Output

  • Review coverage metrics calculated per repository
  • Comment volume and acceptance rate tracked
  • Weekly metrics GitHub Action workflow
  • Alert workflow for missing reviews
  • Dashboard template for team reporting

Error Handling

IssueCauseSolution
Coverage below 90%Some PRs not reviewedCheck base_branches and ignore_title_keywords
Low acceptance rateToo many false positivesTune path_instructions and switch to chill
No metrics dataNo closed PRs in periodExtend the time window
API rate limitedToo many gh api callsAdd pagination and caching

Resources

Next Steps

For incident response, see coderabbit-incident-runbook.

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.

11340

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.

9033

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".

18828

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.

5519

designing-database-schemas

jeremylongshore

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

12516

optimizing-sql-queries

jeremylongshore

This skill analyzes and optimizes SQL queries for improved performance. It identifies potential bottlenecks, suggests optimal indexes, and proposes query rewrites. Use this when the user mentions "optimize SQL query", "improve SQL performance", "SQL query optimization", "slow SQL query", or asks for help with "SQL indexing". The skill helps enhance database efficiency by analyzing query structure, recommending indexes, and reviewing execution plans.

5513

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.

1,6851,430

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."

1,2681,335

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.

1,5431,151

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.

1,357809

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.

1,264728

pdf-to-markdown

aliceisjustplaying

Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.

1,491684