AI & ML
AI Code Review Bot
Jun 2024 – Sep 2024GitHub
On this page
Overview
A GitHub App that automatically reviews pull requests using Claude, posting inline comments on potential bugs, complexity issues, and security risks.
Integrated directly into the GitHub PR workflow via a GitHub App and webhooks. Diffs are chunked and sent to Claude with structured prompts; the model returns JSON annotations that are posted as inline review comments. A configurable severity threshold suppresses noise.
- Node.js
- TypeScript
- Claude (Anthropic)
- GitHub REST API
- Zod
- Fastify
Case Study
Situation
Our team was spending 30–40% of review time on surface-level issues — naming, obvious bugs, missing null checks — that a tool could catch automatically.
Task
Build a GitHub App that runs a first-pass review on every PR and posts structured inline comments so human reviewers can focus on architecture.
Action
Wrote a webhook handler that fetches the diff, chunks it by file, and sends each chunk to Claude with a structured prompt requesting JSON-formatted annotations. Applied a configurable severity filter to avoid comment spam.
Result
Reduced average human review time by ~25%. The bot consistently caught unhandled promise rejections, missing input validation, and complex nested conditionals flagged for simplification.