Can I code this? An AI Code Review Assistant

Sending a code diff to an existing LLM API and posting its comments back to a pull request is a genuinely achievable integration — the same shape as this register's GitHub Copilot case, just triggered on review instead of while typing.

Borderline
Effort: a weekendRunning cost: $0/mo to start

Why CanICodeThis says Borderline

  • A webhook that fires on a new pull request, sends the diff to an LLM API, and posts the response as a comment is a bounded, well-documented integration
  • Basic checks (missing tests, obvious style issues) can be prompted for directly without extra infrastructure
  • For your own repos, this is genuinely a weekend project

The parts that'll cause problems

  • Reliably understanding a large diff in the context of the whole codebase (not just the changed lines) needs real retrieval work beyond a raw diff in the prompt
  • Avoiding noisy, low-value comments that annoy a team takes real prompt-tuning and iteration
  • Supporting many different languages and frameworks well needs broad testing, not a single prompt

How I'd build this

frontendNext.js
hostingVercel

MVP scope

  • A webhook on pull-request creation
  • Send the diff to an LLM API with a review-focused prompt
  • Post the response as a PR comment

Postpone to v2

  • Whole-codebase context retrieval, not just the diff
  • Configurable review focus (security, style, tests)
  • Learning from accepted/rejected past comments

What it actually costs to build

AI agent — with a subscription (Claude Pro/Max, Cursor, etc.)$0 marginal
AI agent — pay-per-use API, no subscription$43–$86 one-time
Hosting, once it's running$0/mo (free tier)
Domain name, if you want your own~$12/yr

Existing tools solving a similar problem typically run $10–$20/mo — see how they compare below.

The build prompt

Build me a code review bot, genuinely achievable with an existing model: 1. A webhook that fires when a pull request is opened, using your git host's own webhook API. 2. Send the diff to an existing, established coding-capable LLM API with a prompt asking for a focused review. 3. Post the response back as a PR comment via the same git host's API. That's a real, working review bot based on the diff alone. Out of scope: whole-codebase context retrieval (understanding your entire repo, not just the changed lines), a genuinely deep retrieval problem, and learning from which past comments were accepted or rejected, which needs a real feedback loop most single-repo bots don't have enough data to train on.

← try another idea · browse the full register