How to Add AI Code Review to Any GitHub Repo in 5 Minutes
Set up automated AI code review on any GitHub repo in under 5 minutes using Robin, a free open-source GitHub Action. No vendor lock-in, bring your own key.
Pull requests pile up. Reviewers get blocked. Bugs slip through because nobody had bandwidth to look closely. AI code review fixes the bottleneck — and you can wire it into any GitHub repo in about five minutes.
This guide walks you through installing Robin, a free, MIT-licensed GitHub Action that posts an AI review on every PR. You bring your own API key, so your code diff goes only to the endpoint you choose.
You’re not early to this. Engineering-analytics firm Jellyfish reported AI code-review adoption climbing from 14.8% of teams in January 2025 to 51.4% by October 2025 across its customer base — the setup below is how you join them without a subscription or a vendor account.
Key Takeaways
- Robin is a free, open-source GitHub Action — no subscription, no vendor account required
- Setup takes one terminal command plus three repository secrets
- Your diff goes only to the LLM endpoint you configure, not to a third-party service
- Free LLM models are available through OpenRouter, so the ongoing cost can be zero
- After setup, every new PR gets an automatic review, and
/robintriggers a re-review on demand
What You Need Before You Start
You need three things: a GitHub repository, a terminal, and an API key for an LLM provider.
If you don’t have an API key yet, OpenRouter is the fastest path. Create a free account, grab a key, and you can use free-tier models at no cost. OpenRouter acts as a gateway — it forwards your request to the underlying model provider, so your key and your diff never touch Robin’s servers.
For stricter privacy, point Robin at any private or self-hosted endpoint. The LLM_BASE_URL secret you’ll set in step 2 controls exactly where the diff goes.
The 5-Minute Walkthrough
Step 1 — Run the Install Script
Open a terminal, navigate to your repo root, and run:
npx robin-review
No npm? Install with curl instead:
curl -fsSL https://robinreview.dev/install.sh | bash
Both commands configure the Git repository you are currently in. The workflow and secrets are per repository; the companion agent skill is installed globally once per machine.
This adds a GitHub Actions workflow file to your repository. That’s all it does. Want to read the script before running it? Download it first instead of piping:
curl -fsSL https://robinreview.dev/install.sh -o install.sh
cat install.sh # read it
bash install.sh # run when satisfied
Commit and push the new workflow file. Robin is now wired up — but it needs credentials before it can call the LLM.
Step 2 — Add the Three Repository Secrets
Go to your repo on GitHub: Settings → Secrets and variables → Actions → New repository secret.
Add each of the following:
| Secret name | What to put here | Example |
|---|---|---|
LLM_API_KEY | Your API key from OpenRouter or your provider | sk-or-... |
LLM_BASE_URL | The OpenAI-compatible endpoint base URL | https://openrouter.ai/api/v1 |
LLM_MODEL | The model identifier your endpoint expects | openrouter/free |
For a free setup, use the values shown in the example column. To use a different provider, swap in that provider’s base URL and model name — Robin speaks the OpenAI-compatible API format, so most hosted and self-hosted models work.
Step 3 — Open a Pull Request
Create a branch, make any small change, and open a PR. The Robin workflow triggers automatically on pull_request events.
Within a minute or two, a review comment appears on the PR from the GitHub Actions bot. It covers the diff: what changed, potential issues, and suggestions. No configuration beyond the secrets is required to get here.
Step 4 — Read the Review
The review comment breaks down the diff section by section. Robin flags things like unhandled edge cases, missing error handling, variable naming issues, and logic that looks correct but might surprise future maintainers.
It’s not a replacement for a human reviewer — it’s the first pass that catches the obvious things so your human reviewers can focus on architecture and intent. Think of it as the teammate who reads every PR at 2am without complaint.
For a closer look at what the review output looks like and how to tune the prompt, see the Robin docs.
Step 5 — Use the Slash Commands
Once the review is posted, two slash commands work in any PR comment:
/robin— triggers a fresh review, useful after you push follow-up commits/summary— posts a plain-language summary of the entire PR, good for reviewers who want context before reading the diff
Type either command as a standalone comment on the PR. The Actions workflow picks it up and responds within seconds.
That’s the full setup. From this point forward, every PR in the repo gets an automatic first-pass review.
Why This Approach Beats Hosted Review Tools
Hosted AI review services are convenient, but they come with tradeoffs. Your code diff leaves your infrastructure and lands on a third-party server. Most require a paid subscription once you hit a usage threshold. And you’re locked into whatever model they choose.
Robin inverts that. You configure the endpoint. You pick the model. You pay your provider directly, or you pay nothing if you’re on a free-tier model. The GitHub Action itself is MIT-licensed, so you can fork it, modify it, and run it however you like.
In our experience maintaining Robin, the step people skip and later wish they hadn’t is reading the install script before running it. It’s a short, boring file — but piping anything to bash in a repo you’re about to grant API-key secrets to is exactly the moment to spend ten seconds confirming what runs. The teams that build that reflex early are the ones who end up trusting the tool enough to actually leave it on.
For teams comparing options, the Robin vs. CodeRabbit page breaks down the differences in detail.
Frequently Asked Questions
Does Robin work on private repositories?
Yes. Robin runs as a GitHub Action inside your own repository. It has the same access a normal workflow has. The diff is sent to whatever LLM endpoint you configure in LLM_BASE_URL, not to any Robin-controlled server.
What if I want to use a self-hosted model?
Set LLM_BASE_URL to your local or private endpoint URL (for example, an Ollama instance with an OpenAI-compatible API). Set LLM_MODEL to the model name your endpoint expects. No other changes are needed.
Can I review only certain file types?
The workflow file installed by the script is a standard GitHub Actions YAML file. You can edit it to filter paths using GitHub’s built-in paths filter on the trigger event. The docs cover this and other customization options.
Is there a token limit? Robin sends the PR diff to your configured model. Very large diffs may exceed the model’s context window. In practice, focused PRs work best — which is good hygiene regardless of AI review.
What models are recommended? Any instruction-following model with a reasonably large context window works well. Free models on OpenRouter are a solid starting point. For production teams reviewing sensitive code, a private endpoint with a stronger model gives better results and keeps the diff off shared infrastructure.
Get Started
Five minutes, one command, three secrets. Your next PR gets an automatic review.
Head to the Robin docs for advanced configuration: custom prompts, path filters, multi-model setups, and more. Or browse the free developer tools to see what else fits into your workflow.
The repo is at github.com/antongulin/robin — issues, PRs, and stars all welcome.