babysit-prlisted
Install: claude install-skill shekohex/dotai
# PR Babysitter
## Objective
Monitor one PR until exactly one terminal outcome happens:
- PR is merged or closed.
- PR is ready to merge: CI green, review feedback handled, required approval not blocking, no merge conflict risk.
- User help is required: permissions/auth failure, exhausted flaky retries, ambiguous review request, unsafe local state.
## Quick Start
```bash
python3 <skill-dir>/scripts/gh_pr_watch.py --pr auto --watch
```
`--watch` is agent-first: it blocks silently, emits one compact JSON event, then exits. Reuse the returned `cursor` on the next invocation; no state file is needed.
```bash
python3 <skill-dir>/scripts/gh_pr_watch.py --pr auto --watch --cursor '<cursor>'
```
## Agent Loop
1. Run `--watch` with the latest cursor, if any.
2. Read the single JSON event.
3. Act on `actions` and `event`.
4. After any fix, commit, push, or retry, run `--watch` again with returned cursor.
5. Stop only on terminal event or user-help blocker.
## Event Handling
| Event | Action |
| --- | --- |
| `review_feedback` | Inspect `review_items`; patch only correct/actionable feedback. |
| `ci_failed` | Inspect `failed_runs`/`failed_checks`; diagnose logs before retry/fix. |
| `sha_changed` | Note new SHA; continue watching with cursor. |
| `mergeability_changed` | Re-check merge conflict/review state; continue or stop if blocked. |
| `ci_green` | Report concise progress; keep watching for review/mergeability changes. |
| `heartbeat` | No useful change before max wait; c