coderabbit
CodeRabbit AI code review. Covers CLI usage, .coderabbit.yaml configuration, supported linters/tools, PR commands, and triage workflow. Use when running AI-powered code reviews on pull requests or local changes, configuring review rules, or triaging CodeRabbit findings. Keywords: @coderabbitai, code review, CLI, .coderabbit.yaml.
What this skill does
# CodeRabbit
AI-powered code review for pull requests and local changes.
## Quick Navigation
| Task | Reference |
| ----------------------------- | ----------------------------------------------------------- |
| Install & run CLI | [cli-usage.md](references/cli-usage.md) |
| Configure .coderabbit.yaml | [configuration.md](references/configuration.md) |
| Supported tools (40+ linters) | [tools.md](references/tools.md) |
| Git platform setup | [platforms.md](references/platforms.md) |
| PR commands (@coderabbitai) | [pr-commands.md](references/pr-commands.md) |
| Claude/Cursor/Codex workflow | [agent-integration.md](references/agent-integration.md) |
| Triage findings | [triage.md](references/triage.md) |
| Fix single issue | [fix.md](references/fix.md) |
| Reporting & metrics | [end-to-end-workflow.md](references/end-to-end-workflow.md) |
| End-to-end workflow | [end-to-end-workflow.md](references/end-to-end-workflow.md) |
| Windows/WSL setup | [windows-wsl.md](references/windows-wsl.md) |
## Prerequisites Check (MUST RUN BEFORE REVIEW)
Before running CodeRabbit CLI, verify ALL of the following:
```bash
# 1. CLI installed?
which coderabbit || echo "MISSING: install with: curl -fsSL https://cli.coderabbit.ai/install.sh | sh"
# 2. Authenticated?
coderabbit auth status 2>&1 | grep -q "Logged in" || echo "MISSING: run coderabbit auth login"
# 3. Git repo has at least one commit? (CRITICAL — CLI crashes with GitError on empty repos)
git rev-parse HEAD >/dev/null 2>&1 || echo "MISSING: repo has no commits — make at least one commit first"
# 4. Base branch exists? (CLI defaults to 'main')
git rev-parse main >/dev/null 2>&1 || echo "WARNING: 'main' branch not found — use --base <branch>"
```
**If any check fails, fix it before running the review. Do NOT proceed with a broken state.**
**Authentication failure rule:** If authentication check fails (step 2), the agent MUST:
1. Stop immediately — do not attempt to run the review
2. Notify the user that CodeRabbit CLI is not authenticated
3. Show the user the exact command to authenticate: `coderabbit auth login`
4. Wait for the user to complete authentication before retrying
5. Do NOT attempt to run `coderabbit auth login` on behalf of the user — it requires interactive browser redirect
## Quick Start
### Run Review
```bash
# AI agent workflow (most common) — note: 'review' subcommand is optional
coderabbit review --prompt-only --type uncommitted --no-color
# If base branch is not 'main' (e.g., master, develop):
coderabbit review --prompt-only --type uncommitted --base master --no-color
# Plain text output (human-readable)
coderabbit review --plain --type uncommitted --no-color
```
### Local Capture Script
Persist output to a file for later analysis:
```bash
# IMPORTANT: use absolute path to the skill's script directory
python3 ~/.claude/skills/coderabbit/scripts/run_coderabbit.py --output coderabbit-report.txt
```
Options:
- `--output` to choose a different file name (saved to `.code-review/` in repo root)
- `--timeout` to adjust the timeout in seconds (default: 1800)
- `--base` to specify base branch (default: auto-detect from git)
### PR Commands
```text
@coderabbitai review # Incremental review
@coderabbitai full review # Complete review
@coderabbitai simplify # Apply targeted simplifications to changed files
@coderabbitai fix merge conflict # Attempt automatic merge-conflict resolution
@coderabbitai pause # Stop auto-reviews
@coderabbitai resume # Resume auto-reviews
@coderabbitai resolve # Mark comments resolved
```
## Severity Matrix
| Severity | Action | Examples |
| ------------ | --------------- | ------------------------------------------------- |
| **CRITICAL** | Fix immediately | Security, data loss, tenant isolation |
| **HIGH** | Should fix | Reliability, performance, architecture violations |
| **MEDIUM** | Judgment call | Maintainability, type safety (quick wins) |
| **LOW** | Skip | Style/formatting, subjective nits |
## AI Agent Workflow Pattern
```text
Implement [feature] and then run CodeRabbit CLI in a background terminal.
Wait for it to complete, then read the report. Fix CRITICAL/HIGH issues. Ignore nits.
```
Step-by-step:
1. **Run prerequisites check** (see above) — fix any issues before proceeding
2. Detect base branch: `git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null` or fall back to `main`/`master`
3. Run CLI in background: `coderabbit review --prompt-only --type uncommitted --base <branch> --no-color`
4. Reviews take **7-30+ minutes** — run in background (`run_in_background=true`)
5. Read output when process completes
6. Fix CRITICAL/HIGH findings, skip LOW
7. Limit to **2-3 review iterations** maximum
## Troubleshooting
### `[error] stopping cli` with no details
Run with `DEBUG=*` to see the actual error:
```bash
DEBUG=* coderabbit review --prompt-only --type uncommitted 2>&1 | grep -E "(ERROR|error|GitError)"
```
Check the log file:
```bash
ls -t ~/.coderabbit/logs/ | head -1 | xargs -I{} cat ~/.coderabbit/logs/{}
```
### Common errors
| Error | Cause | Fix |
| ------------------------------------------ | --------------------------- | --------------------------------------------- |
| `GitError` (no details) | No commits in repo | Make at least one commit |
| `Failed to get commit SHA for branch main` | Base branch doesn't exist | Use `--base master` or `--base <your-branch>` |
| `Raw mode is not supported` | Interactive mode in non-TTY | Always use `--prompt-only` or `--plain` |
| `[error] stopping cli` after auth | Token expired | Re-run `coderabbit auth login` |
| CLI hangs / no output | Large changeset | Use `--type uncommitted` to limit scope |
### Check auth status
```bash
coderabbit auth status
```
## Linked Repositories (2026-02-18)
CodeRabbit can analyze linked repositories during PR review to catch cross-repo breakages (API/type/dependency drift).
- Configure linked repositories in Knowledge Base settings.
- As of 2026-03-11, Pro plans can link up to **2** repositories for Multi-Repo Analysis.
- Use this when changes in one repo affect contracts in another.
- Treat cross-repo findings as HIGH/CRITICAL when they indicate runtime incompatibility.
## Dashboard and Reporting (2026-03-12)
- Dashboard metrics are now split between **Git platform reviews** and **IDE/CLI reviews**.
- Reporting surfaces now include Git-platform pages like Knowledge Base, Pre-merge Checks, and Reporting, plus IDE/CLI pages like Summary, Organization Trends, and Data Metrics.
- Team filters are available across dashboards; use them when review volume or findings need to be separated by team rather than repository alone.
## Simplify Code (Open Beta, Pro) (2026-03-13)
- `@coderabbitai simplify` runs an agentic cleanup pass over the files changed in the PR.
- It focuses on extracting reusable helpers, simplifying conditionals, and removing redundancy while preserving behavior.
- CodeRabbit validates the result with the repository's existing test suite and can either open a follow-up PR or commit directly to the branch.
- Not available for fork PR direct-commit mode.
## Chat Access Control (GitHub Orgs) (2026-03-16)
- Use `chat.allow_non_org_members: false` in `.coderabbit.yaml` when PR comment chat must stayRelated in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.