Customize Code Review changedcode-review-customize
Nearest release: v2.1.319, published under an hour after upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 6 Nov 2026 00:32 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 6 Nov 2026 00:37 UTC.
Upstream edited
Recorded here
Lines+16added
Lines−3removed
From line
21
where the diff opens
First seen
15 Oct 2026
this site's first read of the page
Recorded edits7to this page, all time
### When a subdirectory REVIEW\.md doesn't apply
The whole hunk
from line 21, old and new numbered
/
from line 21
2121
2222## Use REVIEW\.md for review-only rules
2323
24`REVIEW.md` is a file at your repository root that tailors Code Review to your repository. You can also add a `REVIEW.md` in a subdirectory to add checks for changes under that path, on top of the root file.
24`REVIEW.md` is a file at your repository root that tailors Code Review to your repository. On a [protected branch](#what-a-review-reads-for-each-branch-setup), you can also add a `REVIEW.md` in [most subdirectories](#when-a-subdirectory-review-md-doesnt-apply) to add checks for changes under that subdirectory, on top of the root file.
2525
2626The agents that find issues and the agents that verify them receive its contents as your repository's review instructions, alongside Code Review's default review guidance. The step that writes the final review consults it before settling severity and writing the summary.
2727
from line 42
4242>
4343> The Code Review service and the local [`/code-review` command](https://code.claude.com/docs/en/code-review-local) are two separate tools, and they read different files. The service reads both `CLAUDE.md` and `REVIEW.md`. The `/code-review` command, which you run inside a Claude Code session on your own machine, reads your `CLAUDE.md` files and not `REVIEW.md`. Put guidance you want applied in both places in `CLAUDE.md`, and keep `REVIEW.md` for rules specific to pull request review.
4444
45### When a subdirectory REVIEW\.md doesn't apply
46
47Code Review doesn't apply a `REVIEW.md` in or below a subdirectory with one of these names, whatever the subdirectory holds. A subdirectory name matches only as a whole, in any letter case and at any depth, so `Tests` matches and `integration-tests` doesn't:
48
49* **Tests**: `test`, `tests`, `__tests__`, `testdata`, `fixtures`, `__fixtures__`, `golden`, `corpus`, `snapshots`, `__snapshots__`
50* **Examples**: `example`, `examples`, `sample`, `samples`, `demo`, `demos`
51* **Generated code**: `generated`
52* **Third-party code**: `vendor`, `third_party`, `third-party`, `thirdparty`, `node_modules`, `bower_components`, `external`, `extern`, `deps`, `godeps`, `pods`, `carthage`, `site-packages`, `contrib`
53
54Put checks for those subdirectories in the root `REVIEW.md`, or in a parent subdirectory's `REVIEW.md` when neither that parent nor anything above it is on the list.
55
56The remaining subdirectory `REVIEW.md` files on the paths a pull request changes share a limit of 150,000 bytes, not counting the root file. If the [check run](https://code.claude.com/docs/en/code-review-pull-requests.md#check-run-output) reports that some of them didn't fit, shorten the files to fit that limit.
57
4558### Example REVIEW\.md
4659
4760This `REVIEW.md` recalibrates severity for a backend service, caps nits, skips generated files, and adds repo-specific checks.
from line 226
213226
214227| Branch protection | Copy read | Files read |
215228| :- | :- | :- |
216| The default branch is protected, and the pull request targets it or targets a branch no ruleset protects | Default branch | Root file, the files it includes, and subdirectory files |
217| The pull request targets another branch that a ruleset protects | That base branch | Root file, the files it includes, and subdirectory files |
229| The default branch is protected, and the pull request targets it or targets a branch no ruleset protects | Default branch | Root file, the files it includes, and [most subdirectory files](#when-a-subdirectory-review-md-doesnt-apply) |
230| The pull request targets another branch that a ruleset protects | That base branch | Root file, the files it includes, and [most subdirectory files](#when-a-subdirectory-review-md-doesnt-apply) |
218231| The default branch isn't protected, and the base branch has no protection rule of either kind | Default branch | Root file |
219232| Code Review can't confirm the protection settings. This includes an unprotected default branch with a base branch that has only a classic rule | None | None |
220233
No line in this hunk matches that.