Skip to main content

AI Code Review

Type: ExplanationCreated: Team: Engineering
draft

Overview​

No off-the-shelf Claude review option fits our setup. This document explains why, and what we should build instead.

Scope note: we do not review PRs from outside contributors. Everything below covers our own team's PRs only.


1. The standard ways to review code with Claude​

OptionTriggerCostProsCons
/code-review in Claude CodeDeveloper runs itPlan usageNo setup, any git host, can auto-fix, cost spread across each dev's seatManual; single-repo; ignores REVIEW.md
/code-review ultraDeveloper runs it$5–25/run in creditsDeepest review availablePaid per run; Team gets no free runs
Managed Code Review (Claude GitHub App)Automatic per repo$15–25/review in creditsZero maintenance, highest quality, tunable via REVIEW.mdPaid; GitHub only; single-repo; no external context
claude-code-action (DIY GitHub Actions)Automatic on PR eventsFree on subscription OAuth tokenFull control; can integrate external systemsA toolkit, not a solution — see §2
@claude mentionsDeveloper comments on a PRPlan usageGreat for follow-up questions; can implement fixesNot a gate; human-initiated

2. Why the simple options don't work for us​

Our requirements:

  1. Automatic on every PR
  2. Funded by existing Team Premium seat usage — no new spend
  3. Composite context: a feature spans the main repo plus multiple submodules
  4. Cross-org: public main repo in one GitHub org, private submodules in another
  5. Reviews against the Skapp PM module task's acceptance criteria
  6. Reviews UI work against the Figma design
Option1. Auto2. Free3. Submodules4. Cross-org5/6. External
Local /code-review✗✓✗✓✗
ultra✗✗✗✓✗
Managed Code Review✓✗✗partial✗
@claude mentions✗✓✗✓✗
DIY GitHub Actions✓✓only if we build itonly if we build itonly if we build it

The blockers:

  • Cost rules out the two best options. Managed Code Review and ultra bill usage credits separately from plan usage. Neither can be funded from a Team seat.
  • Nothing understands our submodule layout. Every packaged option scopes to one repository's diff. Our parent PR is usually just a pointer bump, and a review of one submodule can't see the interface it breaks in another.
  • The cross-org split is a security problem. Reviewing private submodules from the public repo means putting a private-org credential in a public repository's secrets and emitting private code into world-readable logs and public comments. Not acceptable.
  • No packaged option sees our PM module or Figma. Managed Code Review reads the repo, CLAUDE.md, and REVIEW.md — nothing external.

On DIY GitHub Actions​

It looks like it passes, but only because three of its cells say "if we build it." claude-code-action is a toolkit for running Claude in CI, not a review product. Out of the box it reviews one repository's diff and knows nothing about our submodules, our PM module, or Figma — exactly the same ceiling as every other option in the table.

Specifically, adopting it as-is fails us three ways:

  • The obvious placement is the insecure one. The natural instinct is to put the workflow in the main repo, where the parent PR lives. That is the one place it must not go, because it would need a private-org credential stored in a public repository. Making it safe means inverting the design so reviews run from the private side — a deliberate architecture decision, not a config flag.
  • Everything of value to us is custom work. Submodule checkout across two orgs, branch discovery, splitting the review so cross-repo findings land somewhere useful, fetching PM tasks, fetching Figma nodes. None of this ships in the box.
  • It concentrates cost on one person. The OAuth token that makes it free is tied to whoever generated it, so the whole team's reviews draw against one seat's usage limits. That is both a capacity ceiling and an unresolved licensing question.

So DIY Actions is not a fifth option alongside the others. It is the foundation of the custom solution in §3, and the work in §3 is what turns it from a toolkit into something that meets our requirements.


3. What will work​

The three viable builds​

A. Actions, hosted runnersB. Actions, self-hosted on EC2 (recommended)C. Local desktop poller
HowWorkflows in the private submodule repos only, authenticated with a subscription OAuth tokenSame workflows, our own always-on runner registered to the private orgScript or scheduled task on a dev machine
Cost$0–25/mo$30–40/mo ($15 with a nightly stop)$0
Effort~1 day~2–3 days~1 day to prototype
Gets us1, 2, 5, 6; partial 3All of A, plus safe cross-org credentials and cheap composite checkoutsA fast way to test whether the reviews are any good
Doesn'tCross-org credential still has to reach the private reposMust be registered to the private org only, never the public repoOne laptop becomes team infrastructure; fails silently

Option C is a prototyping step, not a production process.

Two reviews - not one​

Inline comments must attach to lines in that PR's diff, so a single job can't give both cross-repo context and correctly-placed comments. We run:

  1. Per-repo review — each submodule PR reviewed normally, comments inline where the author is working.
  2. Composite integration review — one run with all repos checked out, looking only at cross-repo risk (changed signatures with callers elsewhere, contract drift, migration ordering, dependency skew). Posts one summary comment.

External context​

  • Skapp PM module — we own it, so fetching a task is an internal integration with no third-party auth constraint. Low risk.
  • Figma — the official Figma MCP is OAuth-only, rejects personal access tokens, and can't run headless. Use the Figma REST API instead. Realistic scope is token drift, missing variants and states, and text mismatches. True visual fidelity needs rendering and image diffing — a separate project.

Build Option B, phased:

  1. Per-repo review on one submodule, hosted runners — two weeks measuring seat usage
  2. Add the composite integration review
  3. Add PM task acceptance-criteria checking
  4. Add Figma token and variant checking
  5. Move to the EC2 self-hosted runner once the workflow is stable

Open items​

  • Seat licensing — whether one Team Premium seat may fund automation reviewing other people's code, and whether a seat can be provisioned for a service account. Needs written confirmation from Anthropic. This gates the recommendation.
  • Programmatic billing risk — a change moving Actions and SDK usage onto separate credits was announced for June 2026 and paused, with advance notice promised. Fallback on API-key billing is roughly $1–3 per review.
  • Usage headroom — unknown until measured; that's what phase 1 is for.
  • Zero Data Retention — if enabled on our account, several options are unavailable. To confirm.