wasswaenockmale

PR Reviewer — Testing skill for Claude Code

Testing community

An AI code-review agent for GitHub pull requests.

How to install PR Reviewer

This entry records only its repository, not the path inside it, so there is no exact command to give. Open wasswaenockmale/pr-reviewer and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What PR Reviewer does

An AI code-review agent for GitHub pull requests. Built on the Claude Agent SDK, the GitHub REST API, and pytest. The core idea: the model proposes, the harness verifies. A finding is only posted if its evidence checks out against the real checkout.

Alternatives in Testing

  • Test Runner — Run Python tests with pytest, unittest, or other testing frameworks 23.4k ★
  • Pua — Use when the user invokes /pua or asks for PUA mode, try-harder/retry help, change-approach coaching, completi 19.5k ★
  • Testing Strategy — This project is small, runs in a terminal, and is mostly deterministic 10.9k ★

README

pr-reviewer

An AI code-review agent for GitHub pull requests. Built on the Claude Agent SDK, the GitHub REST API, and pytest.

The core idea: **the model proposes, the harness verifies.** A finding is only posted if its evidence checks out against the real checkout.

How it works

CLI ──► GitHub API: PR metadata + per-file patches
    ──► git: fetch pull/N/head into a temp dir (token never written to .git/config)
    ──► Claude Agent SDK agent (cwd = checkout)
          built-in, read-only : Read, Grep, Glob   (jailed to the checkout by a PreToolUse hook)
          custom MCP tools    : get_pr_overview, get_diff (line-numbered), run_pytest, report_finding
    ──► report_finding validates every finding, then
    ──► GitHub API: one review with inline comments (or print with no --post)

What "evidence" means here (`findings.py`):

Check Why
File exists inside the checkout no path traversal / invented files
Quoted code appears verbatim within ±5 lines of the cited line catches hallucinated or misnumbered citations
If repro_id given, that pytest run must have failed (exit 1) an erroring or passing test is not proof; broken repros are rejected
Line is part of the diff? yes → inline comment; no → listed in the review summary (GitHub rejects off-diff inline comments)

Rejected findings return the reason to the agent so it can fix or drop them.

Run

pip install -e '.[dev]'
export ANTHROPIC_API_KEY=...  GITHUB_TOKEN=...   # token: pull_requests:write, contents:read

pr-reviewer owner/repo#123 --python /path/to/target-venv/bin/python        # dry run
pr-reviewer owner/repo#123 --python /path/to/target-venv/bin/python --post # post review
pytest                                                                      # tests for this project

`--python` should be an interpreter that already has the target repo's dependencies installed (the reviewer does not install them). Model defaults to `claude-sonnet-5