PR Watch

Reviewed at commit 5fec57e

A Claude Code mod that keeps a live pane of the GitHub pull requests a session touches

Made by
ElirazKed
What we checked

Shows a live pane of the GitHub pull requests a session touches: CI, reviews, conflicts and merge state, with toasts when they change. It asks GitHub through your own gh logins (also your other gh accounts), keeps a shared cache in ~/.cache/pr-watch, and adds buttons to merge a PR after you confirm and to put a failed CI run, with its logs, in your prompt box for Claude.

Review details

Static review of the source at the pinned commit; not run. Registers config.set (poll interval options), session.start (registers /pr-watch and a 'watch' tool, starts a 10 s tick), session.end (carries state over /clear), command.run for pr-watch, tool.check (auto-allows only its own mcp__pr-watch__watch tool), tool.call (after Bash and GitHub MCP tools run, matches github.com PR URLs, gh pr subcommands, git push and gh api writes; for commands that name no PR it runs 'gh pr view --json url' in the directory a leading 'cd dir &&' names; appends a context note asking Claude to offer, once, to watch a PR it only read), prompt.submit (picks up PR links you paste; the prompt is not changed) and ui.render. Runtime calls: $.process.run for gh only (auth status, auth token --user <login> for other logged-in accounts, api graphql with a batched read-only query of PR state, checks, reviewer logins and thread resolved/outdated flags but no comment text, pr view, and new in this version: pr merge with --squash/--rebase/--merge or --auto after a Confirm press, pr merge --disable-auto on a Cancel auto-merge press without confirmation, a checks query and 'run view --job <id> --log-failed' for up to 3 failing jobs on a Fix with Claude press) plus rm -f of its own session files older than a day; $.fs.read/write/list under $HOME/.cache/pr-watch (results.json with PR titles, branches, authors, check names and the account-to-owner login map, sessions/*.json, lease.json; no tokens written); $.env.get HOME; atoms for state; $.prompt.read/fill to draft the CI failure (trimmed log tails, about 12 KB) in the prompt box, and $.prompt.submit asUser only after Confirm where no prompt box can take a draft; $.ui.toast/status/open/close/blit; $.clock timers. Tokens of other gh accounts stay in memory and are passed only as GH_TOKEN to gh, also for merges on repos only that account can see (disclosed in the README). The fix prompt asks Claude to fix the branch, never to push or merge. The cache is shared by all sessions on the machine, so PR metadata from private repositories sits there in plain files. Not reviewed: the gh CLI itself.

What it uses
  • Reads your prompts: yes
  • Sees tool calls: yes
  • Blocks or changes tool calls: yes
  • Reads or writes files: yes
  • Runs programs on your machine: yes
  • Calls the model (uses tokens): no
  • Sends data over the network: yes
  • Stores data: yes
  • Shows something on screen: yes
Categories
Hooked events

Automatically: PRs Claude acts on: opens (gh pr create), pushes to (git push to a branch with a PR), comments on, reviews, merges or follows CI for (gh pr checks), through gh or GitHub MCP write tools. Only open PRs are picked up; a merged or closed one never gets a card, and one you stopped watching stays stopped.
When you ask: /pr-watch <url>, or paste a PR link in a prompt. These are watched in any state.
When offered: PRs Claude only reads (gh pr view/diff, a fetched link, a GitHub MCP read). Claude asks once, and only if the PR looks like your own work rather than background reading.
/pr-watch opens the pane, and /pr-watch stop <number|url|all> stops watching. Finished PRs stay until you dismiss them, d dismisses them all, and r refreshes.

Each card shows the state that matters most first: merge conflicts, then failing or running CI (naming the checks), then review, then whether GitHub will let it merge. A toast appears when the state changes, and the status line follows the focused PR.

Made this mod? Add a badge to your README

modsforClaude badge for PR Watch

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/pr-watch.svg)](https://modsforclaude.com/mods/pr-watch/)

← All mods