Skip to main content

pr-review template

GitHub pull_request webhook → Claude reviews the diff → inline review comments. References @declaragent/plugin-github for the review-posting tools.

Scaffold

declaragent init --template pr-review --provider anthropic

Canonical starter: templates/pr-review/.

Configure

  1. Install the @declaragent/plugin-github plugin (see the note below).
  2. Create a GitHub App with pull_request + contents:read + pull_requests:write scopes.
  3. Point the app's webhook at https://<your-host>/webhook/github (local default port: 7777).
  4. Copy the webhook secret + app private key into .env.

Key points

  • The plugin exposes a ReviewPR tool that posts inline review comments via the GitHub API.
  • The template's skill prompt constrains the agent: one pass, no style-only nits, no demands the contributor opt out of via label.
  • Rate limiting is the plugin's concern — inbound GitHub webhook storms are shed at the ingress.
Plugin not yet published

The @declaragent/plugin-github package this template references is not on npm yet (pr-review is the driver for its first release) — declaragent up on this template fails plugin load until it ships. The webhook + skill wiring works; the GitHub review tools are stubbed.