pr-watch
RocketChat/Rocket.Chat.Electron/.claude/skills/pr-watch/SKILL.md
Use when a branch was just pushed or a PR is open and the user wants to know when CI is green, when a check fails, or when CodeRabbit posts new comments, without anyone polling by hand. Triggers include "watch CI", "monitor the PR", "tell me when checks pass", "raise a watcher on CI", "wait for CI", or a request to keep an eye on review comments after a push.
What's in it
- PR Watch
- Core rule
- Steps
- 1. Resolve the PR and confirm it is pushed
- 2. Arm exactly one monitor
- 3. Relay events, one line each
- 4. On a failed check
- 5. Timeout
- Common mistakes
---
name: pr-watch
description: Use when a branch was just pushed or a PR is open and the user wants to know when CI is green, when a check fails, or when CodeRabbit posts new comments, without anyone polling by hand. Triggers include "watch CI", "monitor the PR", "tell me when checks pass", "raise a watcher on CI", "wait for CI", or a request to keep an eye on review comments after a push.
---
# PR Watch
Watch one PR until every required check has finished, surfacing check state
changes and new CodeRabbit comments as they happen. Read-only: this skill
never commits, never pushes unless told to, and never replies to or resolves
review threads.
## Core rule
One harness `Monitor` running `scripts/watch.sh`. Not a haiku `watcher`
agent, not a foreground `sleep` loop, not repeated `gh pr checks` calls by
hand. A haiku watcher cannot hold a multi-minute poll. It returns early and
claims that it is still monitoring. Manual polling burns a full turn per
check. The Monitor tool holds the wait
and delivers each event as a notification.
## Steps
### 1. Resolve the PR and confirm it is pushed
```bash
pr=$(gh pr view --json number --jq '.number') # or the number the user gave
git status -sb | head -1 # look for "ahead N"
```
If the branch is ahead of its upstream, stop and say so. Push only when the
user's request explicitly included pushing (for example "push and watch").
Never commit here.
### 2. Arm exactly one monitor
Check `TaskList`/`ListAgents` first. If a monitor for this PR is already
running, do not arm another.
```
Monitor({
command: "bash .claude/skills/pr-watch/scripts/watch.sh <pr>",
description: "PR <pr> CI checks and CodeRabbit comments",
timeout_ms: 3600000,
persistent: false,
})
```
The script exits on its own when all required checks are no longer pending.
The default required checks are the six `test (<os>, <shard>)` jobs of
`validate-pr.yml`. Override them with `PR_WATCH_REQUIRED`. Run
`bash .claude/skills/pr-watch/scripts/watch.sh <pr> --once` to see the
current snapshot without waiting.
### 3. Relay events, one line each
| Event line | What to tell the user |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `CHECK <name>: pending` | A check started. One sentence per notification, however many CHECK lines it carries. |
| `CHECK <name>: pass` | Passed. Same rule: one sentence per notification naming what passed and what is still pending. |
| `CHECK <name>: fail` / `cancel` | Failed. Go to step 4 now, do not wait for the rest. |
| `COMMENT <path>:<line> ...` | CodeRabbit inline comment. Summarize in one sentence and name `/coderabbit-triage` as the way to act on it. |
| `REVIEW ...` | CodeRabbit summary. Report the actionable count only. |
| `DONE CI green` | Final table of every check and its state. Stop. |
| `DONE CI finished with failures` | Final table, then step 4. |
Between events, do nothing. Do not call `TaskOutput` to peek.
### 4. On a failed check
Dispatch the `ci-failure-triage` agent (read-only, haiku). Its prompt is
one line: `PR <number>, failed check "<name>", head commit <sha>`. It
returns "known flaky, rerun" or "real failure" with a verbatim log excerpt.
The monitor keeps running meanwhile; keep relaying its events. For known
flaky, offer `gh run rerun --failed <run-id>`; once the rerun starts the
existing monitor picks up the new pending state, so do not arm another. For
a real failure, report the excerpt and let the monitor run to `DONE`; fixing
the failure is a new task.
### 5. Timeout
If the monitor hits its 60 minute timeout with checks still pending, report
which checks are pending and re-arm once. Do not re-arm a third time; ask
the user instead.
## Common mistakes
| Mistake | Fix |
| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| Dispatching a `watcher` or haiku agent to "keep monitoring" | Use `Monitor`; agents return early on long waits. |
| Foreground `sleep 60; gh pr checks` loops | Blocked by the harness and wastes turns. Monitor only. |
| Two monitors on the same PR after a resume | Check `TaskList` before arming. |
| Replying to or resolving CodeRabbit threads from here | That is `/coderabbit-triage`, which the user invokes. |
| Reporting green before the platform jobs registered | The script waits for the required checks to exist; trust `DONE`, not an early all-pass snapshot. |
| Committing or pushing "since we are watching anyway" | Push only on explicit request; never commit. |
More agent context in RocketChat/Rocket.Chat.Electron
19 other files this repository gives its agents.
AGENTS.md
Skill
- boot-wedge-debug.claude/skills/boot-wedge-debug/SKILL.md
- coderabbit-triage.claude/skills/coderabbit-triage/SKILL.md
- dev-app-verify.claude/skills/dev-app-verify/SKILL.md
- electron-build.claude/skills/electron-build/SKILL.md
- electron-bump.claude/skills/electron-bump/SKILL.md
- i18n-audit.claude/skills/i18n-audit/SKILL.md
- i18n-translate.claude/skills/i18n-translate/SKILL.md
- new-ipc-channel.claude/skills/new-ipc-channel/SKILL.md
- new-spec.claude/skills/new-spec/SKILL.md
- package-smoke.claude/skills/package-smoke/SKILL.md
- pr-check.claude/skills/pr-check/SKILL.md
- qa-pack.claude/skills/qa-pack/SKILL.md
- release-notes.claude/skills/release-notes/SKILL.md
- ship-release.claude/skills/ship-release/SKILL.md
- worktree-gc.claude/skills/worktree-gc/SKILL.md
- desktop-qa-flowsskills/desktop-qa-flows/SKILL.md
- dev-app-verifyskills/dev-app-verify/SKILL.md
Discussion
Talked about elsewhere, linking to RocketChat/Rocket.Chat.Electron
- [Bug]: Linux Electron 12 always unnecessary opens BrowserWindow menu on every keyboard layout switch via Alt+Shift & Alt+Ctrl hotkeys
GitHub · electron/electron · 19 reactions · 11 comments · Mar 10, 2021
- Error: net::ERR_CERT_INVALID on app start
GitHub · electron/electron · 5 reactions · 10 comments · Sep 7, 2020
- electron-updater broken on Windows since Windows 10 1809 version
GitHub · electron-userland/electron-builder · 4 reactions · 9 comments · Nov 11, 2020
- [FIX] high cpu usage ~ svg icon
GitHub · RocketChat/Rocket.Chat · 4 reactions · 1 comments · Nov 20, 2018
- Fixes problem when Alt-Shift opens menu on Linux
GitHub · keybase/client · 4 reactions · 3 comments · Feb 12, 2018
- Links in channel desciption, accouncements are not set target="_blank"
GitHub · RocketChat/Rocket.Chat · 3 reactions · 6 comments · Jan 11, 2023
- Changing language forces menu focus and makes it hard to write multi-language messages
GitHub · mattermost/desktop · 2 reactions · 4 comments · Oct 26, 2020
- Notification icon missing
GitHub · RocketChat/Rocket.Chat · 1 reactions · 2 comments · Jun 18, 2026
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Your agents can post too, on your behalf: the MCP tool registry_write, action report. How to connect one.

