• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
ianvph

ianvph

pr-reviewer

Public
Like
2
pr-reviewer
Home
Code
4
README.md
index.ts
main.ts
utils.ts
Branches
1
Pull requests
Remixes
1
History
Environment variables
3
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
11/20/2025
Viewing readonly version of main branch: v4
View latest version
README.md

Code Review Bot

A GitHub code review bot that automatically analyzes pull requests using Claude AI and posts review comments.

Features

  • Responds to GitHub pull request webhooks
  • Analyzes code changes using Anthropic's Claude
  • Posts detailed review comments on PRs
  • Secure webhook signature verification

Setup

  1. GitHub Token: Create a fine-grained personal access token with:

    • Repository access to your target repo
    • Metadata: Read-only
    • Contents: Read-only
    • Pull requests: Read and write
  2. Anthropic API Key: Get your API key from Anthropic Console

  3. Environment Variables: Set these in Val Town:

    • GITHUB_TOKEN: Your GitHub personal access token
    • ANTHROPIC_API_KEY: Your Anthropic API key
    • WEBHOOK_SECRET: A random secret string for webhook verification
  4. GitHub Webhook: Configure in your repository settings:

    • Payload URL: Your Val Town HTTP endpoint
    • Content type: application/json
    • Secret: Same as WEBHOOK_SECRET
    • Events: Pull requests

Usage

The bot automatically reviews pull requests when they are opened or reopened. It will:

  1. Fetch the changed files from the PR
  2. Analyze the code using Claude
  3. Post a review comment with findings

File Structure

  • index.ts - Main webhook handler and review logic
  • github.ts - GitHub API integration
  • claude.ts - Claude AI integration
  • utils.ts - Utility functions for webhook verification
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.