Templates / PR Code Review Agent
PR Code Review Agent
An AI code review GitHub Action that reviews every pull request, flags risky changes (security, data loss, breaking APIs), and suggests the tests you're missing, posted as a PR comment.
Who it's for
Vibe-coders and small teams shipping AI-written code without a dedicated reviewer.
What goes in
- A GitHub repository
- An LLM API key stored as a GitHub secret
What comes out
- A PR review comment with risk flags
- Suggested tests
- A merge-risk score
Setup in 4 steps
- Copy the workflow file into .github/workflows.
- Add your LLM key as a repository secret.
- Open a test PR to see the review.
- Tune the rules file (paths to ignore, severity thresholds).
Tool stack
GitHub Copilot, CodeRabbit, Claude Code, Cursor
Cost per run
Estimate, not yet measured: under $0.01 per PR on a small model; stronger models usually still cents per PR.
What's included
- GitHub Action (YAML + script)
- Python code version + AGENTS.md for local use
- README setup guide
- Offline sample data + tests
- Honest cost notes
- Changelog
FAQ
How is this different from CodeRabbit or Copilot code review?
Those are hosted products with subscriptions. This is a template you own: you pay only your LLM usage, see every prompt, and can change the rules.
Does it see my whole codebase?
It sends the PR diff plus nearby context to the LLM you configure. Nothing is sent to us.
Can it block merges?
Optionally. You can make it fail the check when the risk score passes a threshold you set.