# Babysit PR

Watch an open PR and fix its CI failures and review feedback until it's clean.

- Repository: https://github.com/BuilderIO/agent-native (7579 stars)
- Category: Git and review
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add BuilderIO/agent-native --skill babysit-pr -g -a claude-code -y`
Codex: `npx skills add BuilderIO/agent-native --skill babysit-pr -g -a codex -y`
Cursor: `npx skills add BuilderIO/agent-native --skill babysit-pr -g -a cursor -y`
Gemini CLI: `npx skills add BuilderIO/agent-native --skill babysit-pr -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add BuilderIO/agent-native`

## Description

Watch an open PR and fix its CI failures and review feedback until it's clean. Use standalone for a PR you want monitored, or as the babysit step of /ship, which continues through the merge.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Babysit PR

Monitor PR `$ARGUMENTS`: fix CI failures and review feedback, one batched push
at a time, until the PR is clean. With no number, find it from the branch:

```bash
gh pr list --head "$(git branch --show-current)" --state open --json number --limit 1
```

Ownership, who may push or comment, the merge gate, cadence, and the Codex
goal and heartbeat all live in `ship`. Under `/ship` this is a step inside it:
keep going through the merge. Standalone, stop after 30 minutes of green
GitHub Actions and no new feedback, and merge only if the user asks.

## Each tick

1. Refresh and read the live PR:

   ```bash
   git fetch origin --quiet
   gh api user --jq .login
   gh pr view $ARGUMENTS --json state,mergedAt,author,headRepository,headRefName,headRefOid,baseRefName,mergeable,mergeCommit
   ```

   If `author.login` isn't your login, don't push, comment, or merge unless
   the user named this PR and that action. Closed without a merge ends the
   work; report it as unsuccessful. Merged
   under `/ship` continues with its post-merge step. If the query fails, retry
   on the next tick instead of acting on old data.

2. Read all review comments, every tick, until the moment you merge. Review
   bots re-review on every push and post a new round each time. Never filter
   by a "since <timestamp>" window: it hides rounds posted before your last
   reply, and "0 new" reads as "all addressed" (this left two rounds
   unanswered on PR #1097). Use reply state instead. Run both queries below
   with `set -o pipefail`. If either fails, the PR is not clean: retry next
   tick, and never read empty output from a failed call as "no feedback". This
   lists every top-level comment with no reply:

The rest: https://github.com/BuilderIO/agent-native/blob/HEAD/.agents/skills/babysit-pr/SKILL.md
