| name | babysit |
| description | Watch an open PR until it's clean — poll CI, address bot comments, hide each bot comment as it's handled, then mark ready for review. Use when the user wants a draft PR monitored through to green. |
Babysit
Target: the PR just opened, the one the user names, or the current branch's PR.
Helper scripts live in this skill's scripts/ directory. Skills do not change the working directory, so always invoke them through ${CLAUDE_SKILL_DIR} (it expands to the directory containing this SKILL.md). All three use gh for auth:
${CLAUDE_SKILL_DIR}/scripts/pr-open-bot <PR-URL> — only the bot comments on the current head not yet hidden. This is the working list.
${CLAUDE_SKILL_DIR}/scripts/pr-comments <PR-URL> — the full board: every comment across both bot surfaces (inline review threads and top-level review/issue comments) with its resolved and minimized state. These two take a PR URL and derive owner/repo from it.
${CLAUDE_SKILL_DIR}/scripts/pr-hide <id> [--reason RESOLVED|OUTDATED] — minimize one handled bot comment (in an inline thread, only the bot's own comments; human replies stay visible). Inline rows give a PRRT_ thread id; top-level rows give an IC_/PRR_ node id.
The ethos: the bots are iterated against — a disposition for every bot comment — until they fall silent and agree there's nothing left to do, because every bot comment has been given one of three dispositions: fixed, dismissed, or deferred. Polling in this skill is a cooldown between polls, not a fixed on-the-dot schedule: poll, then wait out the cooldown before polling again. Before every push, git pull --rebase the PR branch so a moved remote never rejects the push non-fast-forward; never stall on a rejected push. Each push re-triggers the bots, so go round by round:
- Poll
gh pr checks (with a ~1-minute cooldown) until checks finish.
- If a lint/format check is red (e.g.
ruff), read the failure with gh run view <run-id> --log-failed (get the run id from gh pr checks), fix it, and push before anything else.
${CLAUDE_SKILL_DIR}/scripts/pr-open-bot <PR-URL> for the open bot comments.
- For each bot comment, give it exactly ONE disposition, in this order of preference:
- Fix (always preferred) — whenever there's a clear, low-risk way to resolve it, always do so, no matter how trivial. Nitpicks included; a clear obvious fix is never skipped. The commit is its own explanation; no comment needed.
- Dismiss — when the bot comment is wrong, doesn't apply, or is a bot re-raising a deferred item or pushing you to undo a prior fix. Post a plain bot-voice reason; for a re-raise, point to where it was already settled (check the Deferred decisions section and your prior commits so you don't loop).
- Defer — ONLY when the trade-off is genuinely unclear or it's a real design decision you shouldn't make unilaterally. Post a disposition comment saying you're deferring it and asking the bots to stop commenting on it, AND append it to a
## Deferred decisions section at the END of the PR description. These are calls the human reviewer/owner must make. Never guess at a risky change that could cause a regression just to close a comment.
Write every disposition comment plainly as a bot — never impersonate the maintainer or post in a human's voice.
Keep the diff minimal: commit only the necessary source files, NEVER scratch or temp files.
- Immediately
${CLAUDE_SKILL_DIR}/scripts/pr-hide <id> each bot comment once it has a disposition. Every single bot comment must end up hidden — there are no exceptions, because each one has been dealt with one of the three ways.
Keep the PR description accurate throughout, not only the ## Deferred decisions section. As the branch changes under you — fixes applied, behavior altered, scope adjusted — update the description so it always reflects what the PR now does. A description left out of date is itself a defect to fix.
When a full round ends with CI green and pr-open-bot empty, do NOT declare clean yet — some bots (e.g. Cursor Bugbot) post comments asynchronously with no gating CI check, so checks-green does not prove their comments have landed. Enter a settle window of ~20 minutes: keep polling gh pr checks and ${CLAUDE_SKILL_DIR}/scripts/pr-open-bot (with a ~5-minute cooldown) for any new bot comment or check. If ANY new bot comment appears, give it a disposition and reset the 20-minute window. Only after a full 20 minutes with zero new bot comments is the PR clean — every bot comment has a disposition and all bots agree nothing's left.
When clean: if any deferred decisions remain, leave it a draft — those are the human's to resolve. If none remain, gh pr ready <number>. Don't approve, merge, or close without the user asking.