pr-relay

Reviewed at commit 85c5f98 New version, not yet reviewed

Watches the session's pull request and wakes the session when it is merged or Codex reviews it

Made by
HolyGrail
What we checked

Watches the pull request of your session through the gh CLI once a minute and sends Claude a prompt when it is merged, when the Codex bot reviews it or gives it a thumbs-up, so Claude does not have to poll. A review prompt carries Codex's comments and asks Claude to fix or answer them; a cleanup button asks Claude to tidy up after a merge. It stores what it already relayed.

Review details

Static review of the source at the pinned commit; not run. Full re-review of version 0.10.3 (single file hooks/register.js, 102 KB, read in the relevant parts: every $.process, $.env, $.store, $.tool and $.prompt use plus the registration code). Registers session.start, session.end, classic.SessionStart (resume, clear, fork), tool.call for its own watch tool and for Bash, prompt.submit, and ui.render for AbovePrompt. Runtime calls: $.process.run for gh api graphql (query of the PR state, head, reviews, comments and thumbs-up reactions, one query per minute; later the review comments), gh pr view --json url,state, git remote get-url origin and git merge-base --is-ancestor, all with argument arrays (no shell) and in the directory a git push in the Bash call named; $.tool.register for a watch tool taking a GitHub PR URL; $.tool.call for the desktop app's mcp__ccd_pr__get_status cache when present; $.prompt.submit to queue prompts; $.store for relay marks, per-session poll notes and take-back records, shared between sessions and pruned after 14 to 90 days; $.env.get/set for its own PR_RELAY_INSTANCE value and HOME (to resolve ~ in a git -C path); $.ui.toast, status and an AbovePrompt cleanup offer. The Bash hook only inspects commands for gh pr create and git push to track pushes, never blocks them, and adds a context line telling Claude to rebase when the base branch has advanced. Only comments and reviews by the chatgpt-codex-connector login are relayed, but their text is put into the prompt for Claude to act on, so a review of untrusted code carries that text into the session. The cleanup prompt (sent only when the user presses the button) asks Claude to read gh pr view, follow the project's cleanup rules, and remove the merged branch's worktree and local branch after checking for uncommitted work, asking before deleting remote branches. It makes no HTTP calls itself; all GitHub traffic goes through the user's gh login. Prompt texts are partly in Japanese. No eval, no obfuscation, no npm dependencies. Not reviewed: the gh and git CLIs and the tests/README.

What it uses
  • Reads your prompts: no
  • Sees tool calls: yes
  • Blocks or changes tool calls: no
  • Reads or writes files: no
  • 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
Hooked events
Made this mod? Add a badge to your README

modsforClaude badge for pr-relay

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-relay.svg)](https://modsforclaude.com/mods/pr-relay/)

← All mods