AI-powered pull request reviewer built with Gemini
that analyzes code against issue context and company standards.
- AI-powered PR analysis
- Bug detection and suggestions
- Code quality scoring
- Web UI plus CLI support
- Company guideline enforcement
- GitHub PR fetch and auto-review
- Optional PR comment posting back to GitHub
- Saved review history per user
Code reviews are time-consuming and inconsistent.
This project uses AI to standardize and accelerate PR reviews
while ensuring alignment with company guidelines.
The agent evaluates PRs by:
- ⭐ Rating the PR out of 10
- 📝 Summarizing changes
- 🐞 Detecting bugs
⚠️ Checking edge cases- 🔧 Suggesting fixes
- 🔒 Flagging security issues
- 🧭 Comparing the PR against issue scope
- 🏢 Enforcing company review standards
- Review using issue URLs, issue text, PR URLs, PR descriptions, and code blocks
- Compare previous code and current code side by side
- Fetch live PR title, body, and file patches from GitHub
- Post generated feedback back to GitHub as a PR comment
- Support email login, Google login, and per-user review history
pr-review-agent/
├── agent.yaml
├── SOUL.md
├── RULES.md
├── README.md
├── assets/
│ └── ui.png
├── skills/
│ └── pr-review/
│ └── SKILL.md
├── public/
├── data/
│ └── store.json
├── gemini.js
├── server.js
├── run-agent.js
├── .env
└── package.json
You can provide:
- issue URL
- issue text
- PR URL
- PR title or PR description
- previous code and current code
- optional company rules
If a GitHub PR URL is provided, the app can:
- fetch PR title and body
- fetch changed files and patches
- use real GitHub data for review generation
The backend sends the combined context to Gemini, which returns a structured review.
The UI displays the review in a scannable format and can optionally post it back to GitHub.
## Rating
8/10
## Summary
Fixes multiplication bug
## Issues
- Incorrect operator used earlier
## Corrections
- Replace + with *
## Verdict
APPROVE- Node.js 18 or newer
- npm
- git
- a valid Gemini API key
npm installCreate or update .env like this:
GEMINI_API_KEY=your_gemini_api_key
GOOGLE_API_KEY=your_gemini_api_key
GEMINI_MODEL=gemini-2.5-flash
SESSION_SECRET=change_me
AUTH0_DOMAIN=your_auth0_domain
AUTH0_CLIENT_ID=your_auth0_client_id
AUTH0_CLIENT_SECRET=your_auth0_client_secret
AUTH0_CALLBACK_URL=http://localhost:3000/auth/auth0/callback
GITHUB_TOKEN=your_github_tokenGEMINI_API_KEY: Gemini review generationGOOGLE_API_KEY:gitclawcompatibilitySESSION_SECRET: signed login sessionsAUTH0_*: Google login via Auth0GITHUB_TOKEN: GitHub PR fetch and comment posting
npm startOpen:
http://localhost:3000
npm run clinode run-agent.js --sampleThe app can:
- fetch PRs using the GitHub API
- auto-review fetched PRs
- post generated comments back to GitHub
To use it:
- Paste a GitHub PR URL
- Click
Fetch PR - Keep
Auto-fetch PR details from GitHub before reviewenabled - Optionally enable posting review comments back to GitHub
- Run the review
The app supports:
- email sign-up and login
- Google login through Auth0
- per-user saved review history
agent.yamldefines the agent metadataSOUL.mddefines the agent identityRULES.mddefines review rules and constraintsgemini.jsbuilds and sends the review promptserver.jsserves the app and APIspublic/contains the UIdata/store.jsonstores users and reviewsrun-agent.jsprovides CLI support
- inline GitHub review comments on changed lines
- richer scoring breakdown
- downloadable markdown and JSON reports
- team dashboards for shared review history
- better diff visualizations inside the UI
