How to Make CodeRabbit Reviews Useful on a Busy Team
A noisy AI reviewer is worse than none. Once a team learns to scroll past the bot’s comments, the good catches disappear with the bad ones.
The fix is not switching the bot off. It’s writing rules that match how your team actually reviews code. CodeRabbit supports per-directory instructions, custom checks, and a config file that travels with the repo — enough rope to shape its behavior folder by folder.
Why does CodeRabbit comment on things your linter already covers?
Because by default it doesn’t know what CI handles. It sees a missing semicolon and a dead branch as the same category of problem.
Fix it by telling the bot what not to repeat:
- List the linters in your stack (ESLint, Ruff, golangci-lint) in the config under
tools. - Add
path_instructionsfor each directory stating what CI enforces. - Turn off
request_changes_workflowso the bot posts comments but never blocks a merge.
Example instruction for a backend folder: “Formatting is enforced by Ruff in CI. Ignore style. Focus on transaction boundaries, unhandled exceptions, and any query missing a tenant filter.”
That last clause is the value. Generic advice is cheap; domain rules are not.
How do I write path instructions that catch real bugs?
One short paragraph per folder, written as if briefing a contractor on their first day.
| Folder | What to tell the bot |
|---|---|
src/api/ |
Every handler must validate input and return typed errors. Flag any raw throw new Error. |
src/billing/ |
All amounts in integer cents. Flag any float math on money. |
infra/ |
Any IAM change must be additive. Flag policy deletions. |
web/ |
Components must not fetch directly; data goes through useQuery. |
Those four lines catch more real defects than a hundred generic style comments. Two of them (money in cents, tenant filters) map to bugs that have actually shipped in production codebases more than once.
Can CodeRabbit run custom checks before merge?
Yes, through pre_merge_checks. You define a short natural-language condition and the bot evaluates the diff against it.
Useful ones:
- “The PR must include a migration file if any model field changed.”
- “Any new endpoint must have a matching test file.”
- “Fail if a secret-like string appears in the diff.”
Under 40 words per check. Long checks get fuzzy and produce argumentative comments.
Checks are advisory unless you wire them to a required status check in branch protection. Start advisory for two weeks, look at the false-positive rate, then promote the ones your team trusts.
How do you stop the bot from reviewing generated code?
Path filters are the tool. In .coderabbit.yaml, exclude anything you didn’t write by hand:
package-lock.json,pnpm-lock.yamldist/,.next/,build/- Protobuf output and OpenAPI clients
- Prisma migrations
If you use a monorepo, also scope reviews by base branch. Reviewing main and develop only cuts the PR volume that lands in the bot’s queue — which matters on Lite plans where the monthly cap counts every PR.
When should a human override the bot?
Regularly. Some rules:
- The bot is right about the code and wrong about the context. Say so in a reply — the config’s
chatcommands let you teach it per repo. - Large refactors generate noise. Pause auto-review for that PR with a
@coderabbitai pausecomment, then resume after merge. - Never let a bot comment alone justify a merge. Reviewers who rubber-stamp because “the bot approved” is how skipped tests ship.
Cost reality check: Lite plans (around $12–15 per dev per month) cap PR count; a monorepo with 120 PRs a month burns through it fast. Know your PR volume before choosing a tier.
Quick Summary
- Silence duplicates first: tell CodeRabbit which linters CI already runs.
- Use 4–6 folder-level path instructions written like a brief, not generic style advice.
- Custom pre-merge checks work best under 40 words and should start advisory.
- Exclude lockfiles, build output and migrations to remove the bulk of false positives.
- Pause reviews during large refactors; Lite plans cap monthly PRs, so check your volume.
