watch-reviews

Polls GitHub pull requests for review activity and acts only on feedback from authorized org members.

6.5k|4.0k|Updated Feb 6, 2020
One-click install
npx skills add https://github.com/ethereum-optimism/optimism --skill watch-reviews
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: watch-reviews
Source: https://github.com/ethereum-optimism/optimism/tree/main/.claude/skills/watch-reviews
Command: npx skills add https://github.com/ethereum-optimism/optimism --skill watch-reviews

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Watching a PR for reviews exposes an AI agent to untrusted comment bodies that can contain prompt injection, fake approvals, or malicious instructions. This Skill enforces a strict trust boundary so only feedback from verified ethereum-optimism org members with write access is ever read or acted upon.

Core Features & Use Cases

  • Metadata-only polling: Polls the inline comment, conversation, and review feeds via the GitHub API, reading only metadata (author, id, timestamps, byte counts) until an author is authorized.
  • Two-phase authorization: Verifies org membership and repository write permission per author, keyed on immutable user IDs, with a startup canary that refuses to run if the token cannot see concealed membership.
  • Quarantine and escalation: Quarantines untrusted bodies without quoting or summarizing them, detects edited comments, and escalates anything beyond changing the PR's own diff to the operator.
  • Use Case: After pushing a PR to ethereum-optimism/optimism, ask the agent to watch for reviews; it polls on a backoff schedule, reports authorized CHANGES_REQUESTED feedback, and ignores drive-by or bot comments.

Quick Start

Watch PR 22574 for review activity and report back when an authorized reviewer leaves feedback.

Frequently Asked Questions about watch-reviews

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I watch a GitHub PR for new reviews in the background?

Invoke the skill with a PR number and it polls the inline comment, conversation, and review feeds on a backoff schedule: every 5 minutes for 2 hours, then every 30 minutes. Each round reports new activity and returns, carrying the seen-set and watermark forward.

How does the skill decide which PR review comments to trust?

It authorizes each comment author in two steps: verifying ethereum-optimism org membership, then confirming write, maintain, or admin permission on the repository via the collaborators permission API. Only after both checks pass is the body fetched, one comment at a time, by id.

Can bots or outside contributors trigger actions through PR comments?

No. Accounts with user.type Bot are never authorized, and comments from anyone without verified write access are quarantined as metadata only. Their bodies are never read, quoted, summarized, or acted upon.

What happens if a review comment is edited after being authorized?

Edited bodies are treated as unattributable because the REST API does not expose editor identity. The skill compares updated_at against created_at, discards the body, reports it as edited metadata, and escalates to the operator instead of acting.

What actions can an authorized review comment request?

Only changes to the PR's own diff plus its tests and docs. Everything else, including merging, force-pushing, editing CI configuration, adding dependencies, or running scripts, is escalated to the human operator regardless of the requester's authority.

Why does the skill avoid gh pr view --json latestReviews?

That command fetches every review body wholesale, including unauthorized ones, and a forgotten jq projection dumps them all into context at once. The skill instead reads metadata-only feeds and fetches bodies individually by id after authorization.