← ClaudeAtlas

monitor-prlisted

Watch an open pull request for new CI failures and review comments and drive it to a clean state. Uses the Monitor tool to stream PR status changes in real time so reactions are immediate instead of polled. Handles CodeRabbit nitpicks with judgment (do not blanket-skip) and treats "out of date" comments as still-relevant until proven otherwise. Replies to and resolves each thread as it's addressed. Triggers: "monitor the PR", "watch the PR for comments", "keep an eye on the PR", "address PR feedback as it lands", /monitor-pr.
sageox/ox · ★ 37 · AI & Automation · score 78
Install: claude install-skill sageox/ox
# monitor-pr Drives a pull request to green by **streaming** its state through the `Monitor` tool and reacting the moment a check fails or a new review comment lands. Designed for CodeRabbit-reviewed PRs but works for human reviewers too. ## Architecture: use the `Monitor` tool, not a sleep loop **This is load-bearing — do not substitute a Bash `sleep` loop.** A loop in a single `Bash` call blocks the agent until it exits, so the agent can't react to events concurrently and misses interleaved work. `Monitor` streams each stdout line as a notification into the conversation, so the agent keeps full agency between events. Start exactly one monitor at the top of the task with: - `persistent: true` — PR reviews can take hours; don't let a timeout kill the watch mid-review. - `description` — specific, e.g. `"PR #493 state changes"`, because it appears in every notification. - The polling script below as `command`. Stop the monitor with `TaskStop` only when the exit condition is met or the user cancels. ## The polling script Resolve PR metadata first (once, before starting the monitor): ```bash gh pr view --json number,url,headRepository,headRepositoryOwner,baseRepository ``` Then start the `Monitor` with this command (substitute `PR`, `OWNER`, `REPO`). It emits **one line only when state changes** — a quiet PR produces zero events, an eventful PR produces one event per transition. ```bash PR=<number>; OWNER=<owner>; REPO=<repo> last="" while true; do checks=$(gh pr