Programming · Automation
monitor
/monitor
Use when the user asks to watch, monitor, or babysit a pull request.
For whom
- Author
- adelrodriguez ↗
- Repository
- skills ↗
- Licence
- MIT
- Last repository change
- 11.11.2026
Assessment and security
96/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability21 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 1
Deprecation
No signals detected. Repository changed on 11.11.2026, without references to retired models or APIs.
Licence
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when the user asks to watch, monitor, or babysit a pull request.
Original author description
Use when the user asks to watch, monitor, or babysit a pull request.
How it works
- Read the review gates
- Start the watcher
- Handle GitHub rate limits
- Address review feedback
- Work on a stacked PR
- Check the base branch and merge requirements
Original SKILL.md headings · 134 lines, 1,716 words
SKILL.md preview
---
name: monitor
description: Use when the user asks to watch, monitor, or babysit a pull request.
metadata:
reference:
- "https://github.com/t3dotgg/tstack/blob/main/skills/babysit-pr/SKILL.md"
---
# Watch a pull request
Address review agents' feedback until all required checks pass and every review agent approves the latest head.
## Read the review gates
Read the repository's `AGENTS.md` review-gate section first. Use its required review agents and approval criteria, including score thresholds.
Only when the repository has no documented review gates, infer review agents from bots that engaged with this PR or recent merged PRs.
## Start the watcher
Use the harness's watcher tool or, if none is available, the `monitor-pr` script. Never write your own watcher, polling loop, or `sleep` loop.
Watch only PRs you own. If you are a delegated child task, leave the watcher to the parent thread that owns the PR. After each notification from the harness's watcher, check the merge requirements yourself.
A foreground `monitor-pr` run occupies the thread, so stop the script before you finish, report readiness or a blocker, or ask for input. Harness watchers such as T3's let you end your turn while the watcher runs and the user continues to interact with the thread. If a merge or closure does not stop the watcher automatically, stop it yourself.
If the harness's watcher reports "Stopped watching, could not read it", run `gh api rate_limit --jq .resources.graphql` as one background command before restarting the watcher. Never retry in a tight loop. `monitor-pr` waits out rate limits on its own.
### Use the `monitor-pr` script
Run `scripts/monitor-pr` from this skill's directory, using its absolute path. `--help` lists every option.
```bash
monitor-pr <pr> [--repo owner/name] [--until ready|green] [--head <sha>] [--require <agents>|none]
monitor-pr show <pr>
```
The script prints one line per event and returns one of these exit codes:
- `0`: the `--until` condition is met or the PR merges.
- `1`: action is needed because a required check failed, the branch conflicts or is `BEHIND`, a review agent left findings or stalled, review threads remain unresolved, everything is ready except an agent that reviews only on request, or the PR closed.
- `2`: the input is invalid, or another `monitor-pr` already watches the PR.
Choose the wait condition that matches the task:
- `ready` (default): required checks pass, every review agent approves the latest head, no review threads remain unresolved, and the branch is mergeable.
- `green`: required checks pass.
Pass `--require` to name the review agents identified from the repository's review gates or, when none are documented, from PR activity. Use `--require none` only when the repository requires no review agents and none are found.
Run `monitor-pr show <pr>` to read the full text of every failed check, open finding, and unresolved thread.
If the harness provides Claude Code's Monitor tool, run the script with `timeout_ms: 1800000`, its 30-minute limit, so each output line sends a notification. If the monitor stops before the script exits, restart the script. Without a monitor, run it as one long command that exits on its own.
After a push, restart the script with `--head $(git rev-parse HEAD)` so it ignores the old head. Also restart it after you address an exit code of `1`, or when you resume work. The script tracks reported events and reports any that arrived while it was stopped.
GitHub sometimes leaves the PR head on the old commit after a push. If the head has not moved after a few minutes, compare it with `gh api repos/<owner>/<repo>/pulls/<n> --jq .head.sha`, and push an empty commit to resync it.
If the script reports that another process already watches the PR, do not start a second watcher. Stop the existing process only if its events do not reach you.
With either watcher, end your turn without a message when an event needs no action. Never post or say "still waiting".
## Handle GitHub rate limits
`gh pr view` and `gh pr checks` use GraphQL. If you reach the GraphQL limit, use REST, which has a separate limit:
- Read the PR with `gh api repos/<owner>/<repo>/pulls/<n>`.
- Read checks with `gh api repos/<owner>/<repo>/commits/<sha>/check-runs`.
## Address review feedback
Act only on checks and comments newer than the latest push. Verify each bot finding against the source before changing code.
Verify approval for the latest head according to how each agent reports its review:
- **Agents that publish a review check.** Wait for the check to report approval. A completed check with unresolved findings is not approval.
- **Agents that leave comments.** Wait for a comment that reports no remaining issues or explicitly approves the change in the agent's own wording. Silence and resolved threads do not count as approval.
After each push, wait for fresh approval from every review agent. Most agents review every push on their own. Bugbot and Greptile review only the PR's first push on their own, and Codex reviews only on request. `monitor-pr` marks such an agent `unrequested` and does not wait for it.
Request a review only when `monitor-pr` exits with "ready for an on-request review" or reports a stalled or failed agent. Never request one only because you pushed. Before you request an `unrequested` agent, make sure another review agent approved the head. If none did, run the `code-review` skill on the diff and fix its valid findings first.
When the exit names an earlier commit that the agent approved, run the compare command it prints. If the changes since that commit only fix typos or formatting, count the earlier approval and do not request a review. If they change behavior or the meaning of a document, request one.
Post the request with the `comment` skill, with the command on the first line. Use the bot's handle, which can differ from its product name:
- Bugbot: `@cursor review` or `bugbot run`.
- Codex: `@codex review`.
- Greptile: `@greptileai review`.
- CodeRabbit: `@coderabbitai review`.
- Pullfrog: `@pullfrog review`.
Fix valid findings and CI failures after checking whether each failure comes from the repository or the infrastructure.
If a finding cites repository review rules, read those rules before replying.
If you decide not to address a finding, explain why in a comment and resolve the thread. Use the `comment` skill for every comment you post on the user's behalf. When screenshots or videos help explain the result, upload them with the `upload` skill.
Keep changes within the user's goal, and prefer fixes that delete or narrow code. Decline unrelated tests, unnecessary edge-case guards, extra integrations or compatibility work, and minor performance changes. Explain those decisions and list the declined work as follow-ups.
### Reply to and resolve review threads
Use the `monitor-pr threads` commands for review threads, whichever watcher you run. Never write GraphQL for threads by hand.
```bash
monitor-pr threads list <pr> [--json]
monitor-pr threads reply <thread-id> --body-file <file> [--resolve]
monitor-pr threads resolve <thread-id>...
```
- `list` prints each unresolved thread with its ID, location, and latest comments, and marks the threads you have already answered.
- `reply` posts the file's contents as a reply and prints its URL. It refuses a reply without the agent marker, so write the body with the `comment` skill. Create the file with `mktemp`, because other sessions share fixed `/tmp` paths.
- `resolve` resolves every thread you pass in one request. Resolve threads once their fix is pushed or your reply explains why you declined.
## Work on a stacked PR
A PR whose base is not the default branch may be part of a GitHub stack, managed with the `gh stack` extension. Run `gh stack view` on the branch to see the stack, or `gh stack checkout <pr>` to import it.
- Watch every PR in the stack. Fix findings in the lowest PR that contains the code, because the PRs above inherit the fix.
- After you change a lower PR, run `gh stack sync`. It fetches, rebases each branch onto its updated parent, and pushes every branch at once with `--force-with-lease`. If it reports a conflict, run `gh stack rebase`, resolve the conflict, run `gh stack rebase --continue`, then `gh stack push`.
- For a stack of plain branches without `gh stack`, rebase each branch onto its parent from the bottom up, and push the bottom branch first with `--force-with-lease`.
- Never run `gh pr edit --base` on a stacked PR. It fails with "Cannot change the base branch because the pull request is part of a stack". Restructure the stack with `gh stack modify`. To split it, run `gh stack checkout <pr>` and then `gh stack unstack`, which removes only the grouping and leaves the PRs open. Ask the user before you restructure a stack.
- When you move a PR to the bottom of a stack, retarget it to the default branch before you force-push the branch that used to be its base. Otherwise GitHub can mark the PR as merged into that old base and delete its branch, and a merged PR cannot be reopened.
- Merge a stacked PR with `gh stack merge <pr>`, which merges it and every PR below it. `gh pr merge` fails on stacked PRs.
## Check the base branch and merge requirements
Rebase when `monitor-pr` reports `DIRTY`, `BEHIND`, or base commits that touch this PR's files. Each rebase restarts CI and every review agent, so do not rebase only because the base moved. Because `watch_pull_request` reports only conflicts, check for `BEHIND` yourself before reporting that the PR is ready.
If another PR makes this PR obsolete, stop the watcher and report that to the user. Ask before closing the PR unless the user has already authorized closure.
Before reporting readiness, verify that required checks pass, every review agent approves the latest head, and no review threads remain unresolved. A `ready` exit from `monitor-pr` establishes all three for the configured agents. A "ready for an on-request review" exit establishes them when you counted each agent's earlier approval under "Address review feedback". Any other watcher exit does not. Also verify any additional repository criteria, such as review scores.
Stop the watcher once these conditions are met.
Merge only when the user explicitly requests it. Otherwise, report that the PR is ready.
If nothing has changed, stay quiet.
Immediately before merging, run `git fetch` and check the PR again. Never merge if the PR is `BEHIND` or `DIRTY`, or if base commits since the last successful check run touch its files. Rebase, push, and wait for checks to pass again.
Files in this package (2)
- SKILL.md 10 KB
- scripts/monitor-pr 55 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · adelrodriguez/skills | 96 | MIT |
| x85446/claudecodetricks | 100 | MIT |
| nvidia/model-optimizer | 100 | MIT |
| tinyfish-io/tinyfish-web-agent-integrations | 100 | MIT |
| anthohunt/claude-code-skills | 100 | Apache-2.0 |
| spotify/ads-claude-plugin | 100 | Apache-2.0 |
| k1p1l0/claude-telegram-supercharged | 100 | Apache-2.0 |
| npow/claude-skills | 100 | Apache-2.0 |
| ialameh/sift-coder | 100 | MIT |
Database snapshot: 13.11.2026 · package version eeb330096ebc (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 95t3-babysit-pr
Monitor a pull request through review and CI. Use when the user asks to monitor, watch, or babysit a PR. - 100babysit-pr
Monitor a pull request through review and CI. Use when the user asks to monitor, watch, or babysit a PR. - 100mroowa-babysit
Monitor a pull request through review and CI. Use when the user asks to monitor, watch, or babysit a PR. - 100babysit-pr
Monitor a pull request through review and CI. Use when the user asks to monitor, watch, or babysit a PR. - 100babysit
Watch a pull request or review cycle until it is ready to merge. Use when asked to babysit, monitor, or keep checking PR comments, reviews, and CI until all actionable issues are resolved. - 100st-watch-pr
Watches a pull request through CI and review, fixes real findings and stops when it is ready, merged or blocked. Use when the user asks to watch, monitor or babysit a PR, or /st-watch-pr.