Add claude_review.yml: @claude review on PRs - #4
Merged
Conversation
Runs a Claude code review on a PR when someone comments '@claude review' on it. Same reviewer as the /code-review command in the Claude Code CLI. Deliberately unconfigurable: no comment arguments, model fixed to opus and review depth to medium effort. Reviews are never automatic, so a PR only costs something when a developer explicitly asks for a review, and each run posts back what Claude Code recorded for it (cost, tokens, duration) so the requester sees the price. Review-only by construction: the job token gets contents: read and Claude is given no Edit/Write/Bash tools, so a review cannot touch the code.
claude_code_oauth_token (from 'claude setup-token', valid one year) lets reviews draw on a Pro/Max/Team/Enterprise plan allowance instead of being billed per token. Both secrets are optional and passed through; the empty one is ignored. Also note in the README that the cost figure the run-details block reports is computed locally at list rates, so under subscription auth it's what the review would have cost on the API rather than an actual charge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a second consumer-facing reusable workflow. Commenting
@claude reviewon any open PRin a repo that opts in runs a Claude code review of it, posting findings as inline comments
plus a summary.
It's the same reviewer as the
/code-reviewcommand in the Claude Code CLI, so findings arecalibrated like the ones developers already see locally.
Deliberately minimal
opus, review depth tomediumeffort.mediumreports only findings the reviewer is confident in, so we startlow-noise. Raising it later is a one-line change.
contents: read, and--allowedToolsomits
Edit/Write/Bash. There is no path from a review to changed code, even if a PRdescription tries to talk Claude into one.
Cost visibility
Each run posts a collapsed Claude review run details comment containing whatever Claude
Code recorded for the run — cost, tokens, duration, turns — so the requester sees the price.
Also written to the job summary. Runs on
if: always(), since a failed review still burnedtokens.
Runner behaviour
runnerdefaults toself-hosted, matching how product repos callci_orchestrator.yml.The trigger check sits in the job's
if:, so ordinary PR comments never occupy one of the4 ARC slots. A second
@claude reviewon a PR cancels an in-flight review of it.Merge order
v1.4.0via the Release workflow so@v1picks it up.@v1and won't resolvebefore step 2.
pre-commit run(incl.actionlint) passes on the new workflow and the README.Unverified until the first real run
ghcr.io/actions/actions-runner:latestegress toapi.anthropic.comis open andgitis present in the image. The workflow avoidsghentirely for this reason.there and degrades quietly if the file is missing or unparseable.