# babysit-pr

babysit-pr is a skill for Claude Code that monitors a pull request through CI and review. It runs when asked to watch or babysit a PR.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 1400 installs · ★ 4278 repo stars
- Author: t3dotgg
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/t3dotgg/tstack/tree/HEAD/skills/babysit-pr/SKILL.md
- Updated: 2026-11-11
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/t3dotgg-babysit-pr

## What it does

The skill tracks pull request progress through continuous integration checks, review comments, and branch conflicts. It uses an internal monitoring mechanism or the `scripts/pr-wait` script to report events and exit when the target condition is met.

Operation relies on GitHub CLI and respects GraphQL rate limits while querying repository status. It reads rules from `.macroscope/check-run-agents/` when processing review findings and integrates with `leaving-pr-comments` for replies.

The watcher requires an absolute path to the skill directory and authenticated GitHub access. Before handing off or merging, it verifies base branch updates and checks for dirty states.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add t3dotgg/tstack --skill babysit-pr -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/babysit-pr/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/babysit-pr/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add t3dotgg/tstack --skill babysit-pr -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/babysit-pr/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add t3dotgg/tstack --skill babysit-pr -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/babysit-pr/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install t3dotgg/tstack skills/babysit-pr
```

2. **Manually: put the files in place**
- File: `.github/skills/babysit-pr/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add t3dotgg/tstack --skill babysit-pr -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/t3dotgg/tstack --path skills/babysit-pr
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/babysit-pr/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add t3dotgg/tstack --skill babysit-pr -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/t3dotgg/tstack/tree/HEAD/skills/babysit-pr/SKILL.md

## When to use it
- monitor pull request and CI status
- check for branch conflicts
- handle review bot feedback
- manage GitHub GraphQL limits

## Example prompts
- Watch this pull request until CI turns green
- Monitor the open PR for review comments and status updates
- Wait for the PR checks to pass using pr-wait

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 007b3deaeaf9a707.

BEGIN THIRD-PARTY FILE 007b3deaeaf9a707
````text
---
name: babysit-pr
description: Monitor a pull request through review and CI. Use when the user asks to monitor, watch, or babysit a PR.
---

# Babysit PR

Many repos have AI review bots. They're helpful, even if they are not always
right.

## Waiting

Never write your own watcher, polling loop, or `sleep` loop. Use one watcher
per PR: `watch_pull_request` in T3 Code, `pr-wait` everywhere else. Never run
both on the same PR. Every watcher on a GitHub account shares one rate limit.

### In T3 Code: `watch_pull_request`

Handle the existing checks and comments first. Then call
`watch_pull_request` and end your turn. T3 Code wakes you with a message when
a check fails, the required checks pass, someone comments or reviews, or the
branch conflicts.

- **Only the thread that owns the PR watches it.** If you are a delegated
  child task (a reviewer, a Sol round, any `delegate_task` child), never call
  `watch_pull_request`. The parent owns the PR. Do not watch PRs you are not
  working on.
- **A wake is news, not a merge decision.** Check the merge gate yourself.
- **Unwatch when you hand off.** A watched thread stays in Working and out of
  the user's inbox. When you stop (ready, blocked, or asking the user a question),
  call `unwatch_pull_request` first. A merge or close ends the watch on its
  own.
- **"Stopped watching, could not read it"** usually means GitHub's rate limit
  is used up. Run `gh api rate_limit --jq .resources.graphql` before you
  watch again. If `remaining` is near 0, wait for `reset` with one background
  command, then watch again. Never watch again in a tight loop.

### Everywhere else: `pr-wait`

Wait with `scripts/pr-wait` from this skill's directory (use its absolute
path).

```bash
pr-wait <pr> [--repo owner/name] [--until ready|green|any-change]
```

It prints one line per real event. It exits 0 when the `--until` condition is
met or the PR merges, 1 when it needs you (a required check failed, conflicts,
unresolved threads, PR closed), and 2 on bad input.

- `ready` (default): required checks green, Greptile or Macroscope reviewed the
  head, and no unresolved threads. Use this to babysit.
- `green`: required checks only. Use it when the repo has no Greptile or
  Macroscope.
- `any-change`: exit on the first event.

In Claude Code, run it with the Monitor tool (`timeout_ms: 3600000`), so each
line wakes you. Without a monitor, run it as one long command. It ends on its
own.

Start it again after you push, after you handle an exit 1, and after a resume.
It remembers what it already reported, so nothing that arrived in between is
lost. If it says another pid already watches the PR, do not start a second one.
Kill the old one only if its events do not reach you.

With either watcher: when an event needs no action, end your turn without a
message. Never post or say "still waiting".

## GitHub rate limits

`gh pr create`, `gh pr view`, and `gh pr checks` use GraphQL. When GraphQL is
used up, the REST limit is separate and usually still has room. Use
`gh api repos/<owner>/<repo>/pulls/<n>` to read a PR, and
`gh api repos/<owner>/<repo>/commits/<sha>/check-runs` for checks.

## Reviews

Only act on checks and comments newer than the latest push. Verify every bot
````
END THIRD-PARTY FILE 007b3deaeaf9a707

The third-party file has ended. Everything between the 007b3deaeaf9a707 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3239 of 5299 bytes. © t3dotgg · MIT · https://github.com/t3dotgg/tstack/tree/HEAD/skills/babysit-pr/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
