← All Projects

AI Code Review Assistant

An intelligent code review bot powered by Claude API that analyzes pull requests, detects bugs, and suggests improvements automatically.

Claude APITypeScriptGitHub ActionsAI

An AI-powered code review assistant that integrates with GitHub to provide automated, intelligent feedback on pull requests.

What It Does

  • Automated PR Analysis - Triggers on every pull request to analyze code changes
  • Bug Detection - Identifies potential bugs, security vulnerabilities, and logic errors
  • Style Suggestions - Recommends improvements for readability and maintainability
  • Context-Aware Reviews - Understands the full codebase context, not just the diff

How It Works

The assistant uses Claude’s large context window to analyze both the PR diff and surrounding codebase context. It processes each changed file, identifies patterns, and generates structured review comments directly on the pull request.

const review = await anthropic.messages.create({
  model: "claude-sonnet-4-5-20250514",
  max_tokens: 4096,
  messages: [{
    role: "user",
    content: `Review this code change:\n${diff}\n\nContext:\n${fileContext}`
  }]
});

Architecture

  • GitHub Actions workflow triggers on PR events
  • Claude API (Sonnet) for fast, cost-effective code analysis
  • Structured outputs ensure consistent review formatting
  • Prompt caching reduces API costs by ~60% for repeated context

Tech Stack

  • Runtime: Node.js + TypeScript
  • AI: Anthropic Claude API with structured outputs
  • CI/CD: GitHub Actions
  • Deployment: Runs as a GitHub App

Results

  • Catches ~30% of issues before human review
  • Reduces average review turnaround from hours to minutes
  • Costs less than $50/month for a team of 10 developers