watch-pr

watch-pr is a skill for Claude Code from justincampbell/gh-watch. It costs 48 tokens per session (1,136 once invoked), scanned A, original, MIT.

A command that watches a GitHub pull request for automated checks, reviews, comments, merge conflicts, and final states. A pull request is a proposed code change waiting for review and merging.

In plain words
What is it for?
Use it to wait for CI results, a submitted review, a merge, a closure, or a change in the merge queue for a pull request.
Why use it?
It removes the need to keep refreshing GitHub while waiting for tests, reviews, or a merge decision.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the gh-watch plugin — 4 skills shipped together

Good fit Use it to wait for CI results, a submitted review, a merge, a closure, or a change in the merge queue for a pull request.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/justincampbell/gh-watch/watch-pr
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add justincampbell/gh-watch --skill watch-pr
Clone the repo
git clone --depth 1 https://github.com/justincampbell/gh-watch

Made for: Claude Code.

Or install gh-watch, the plugin that ships this one along with the rest of its 4 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for watch-pr

README.md
[![agentmods](https://agentmods.dev/badge/skills/justincampbell/gh-watch/watch-pr/github.svg)](https://agentmods.dev/skills/justincampbell/gh-watch/watch-pr)
Your own site
<a href="https://agentmods.dev/skills/justincampbell/gh-watch/watch-pr"><img src="https://agentmods.dev/badge/skills/justincampbell/gh-watch/watch-pr/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for watch-pr

Your own site · 80×15
<a href="https://agentmods.dev/skills/justincampbell/gh-watch/watch-pr"><img src="https://agentmods.dev/badge/skills/justincampbell/gh-watch/watch-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,136 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.01136
Opus 5 $0.00024 $0.00568
Sonnet 5 $0.00010 $0.00227
Haiku 4.5 $0.00005 $0.00114

Measured 10d ago against content hash 8e2a16c6784f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

watch-pr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/skills/watch-pr/SKILL.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Watch a Pull Request

Monitor a pull request for state changes using the gh watch CLI extension. It polls GitHub and emits one JSON event per line to stdout, which makes it a natural fit for the Monitor tool — each event arrives in the conversation as a notification.

Prerequisites

Check if the extension is installed:

gh watch --help

If not installed:

gh extension install justincampbell/gh-watch

Usage

Run with the Monitor tool (not Bash with run_in_background). Each stdout line — starting with initial-state — is delivered as a notification, so you react to events as they land instead of polling an output file.

Wait for CI to finish, then exit — use a bounded timeout_ms and let --exit-on end the watch:

  • command: gh watch pr $ARGUMENTS --exit-on ci-passed,ci-failed,pr-merged,pr-closed
  • description: PR $ARGUMENTS CI status
  • persistent: false
  • timeout_ms: 1800000 (30 min — raise for slow CI)

Wait for a code review:

  • command: gh watch pr $ARGUMENTS --exit-on review-submitted

Wait until a queued PR resolves (merges or gets kicked out of the merge queue):

  • command: gh watch pr $ARGUMENTS --exit-on pr-merged,merge-queue-removed

Watch the PR for the rest of the session (CI + reviews + comments + merge state):

  • command: gh watch pr $ARGUMENTS
  • description: PR $ARGUMENTS state changes
  • persistent: true (no timeout — stop with TaskStop or end of session)

If no PR number is provided, the PR for the current branch is detected automatically. To watch a PR in another repo, prefix the command with GH_REPO=owner/repo (the pr subcommand takes a number, not a URL).

Flags

Flag Description Default
--interval <duration> Polling interval 60s
--exit Exit after any state change false
--exit-on <events> Exit after specific event types (comma-separated)

Event types

Event Description
initial-state Snapshot of PR state at the moment watching started (always emitted first)
ci-passed All CI checks passed
ci-failed CI failed (at least one check failed)
review-submitted A review was submitted
comment-added A new comment was posted
merge-conflict-changed Mergeable state changed
merge-queue-entered PR was added to the merge queue
merge-queue-status-changed Merge queue entry changed state (e.g. AWAITING_CHECKSUNMERGEABLE)
merge-queue-removed PR left the merge queue without merging (e.g. kicked out on failure)
pr-merged PR was merged (terminal — always exits)
pr-closed PR was closed (terminal — always exits)

Read the full file on GitHub · 101 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 101 lines · 48 tokens per session scan A 8e2a16c6784f

Subscribe to this mod's changes

watch-pr is a skill published in the GitHub repository justincampbell/gh-watch (4 stars, last pushed 22d ago), licensed MIT. It adds 48 tokens to every session and 1,136 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

bellwether

Bring the current PR to a mergeable state: CI green, all review comments resolved, no merge conflicts. Self-contained — watches CI, fixes issues, watches again until merge-ready. Use when the user wants to keep a PR green, auto-fix CI, resolve review comments, or says "get this merged".

roderik/bellwether · 68 tokens

argot-setup

Set argot up for a repository end to end — audit its history, decide what should shape its voice, fit, verify the fit actually catches things, tune the rules its own history says are noisy, and wire the places it runs (pre-write hook, pre-commit, MCP, CI). One sitting, one decision at a time, each proposed with the…

get-tmonier/argot · 129 tokens

detect-task

Internal skill for commands. Detect the active task (any tracker adapter) from the task-state file / git branch name. Do not trigger on user conversation - only when commands need task detection.

restarter/lets-workflow · 41 tokens

loop-bb-pr

A command that prepares a repeating check for a Bitbucket pull request. A pull request is a request to review and merge code changes into a project.

restarter/lets-workflow · 118 tokens

take-task

A workflow for claiming a tracker task and preparing the development branch for it. It verifies the task, marks it as in progress, checks for uncommitted changes, and handles branch setup according to the task state.

restarter/lets-workflow · 76 tokens

session-boundary

Internal skill for commands. Resolve and VALIDATE this branch's session boundary - the ref a session's commit range is measured from - and report how much it can be trusted. Do not trigger on user conversation; only when a command needs the session range.

restarter/lets-workflow · 55 tokens