Babysit
Keep an open PR moving toward merge-ready: watch its checks, review threads,
and mergeability; act on what blocks them; and report evidence. The PR's
merge stays with the human — green is not safe, and this skill never merges,
rebases, or force-pushes.
When to use
- "get this PR green", "babysit PR #N", "address the review-bot comments"
- the user wants a PR they opened earlier driven to merge-ready while they
are away
When not to use
- merely opening a PR (no monitoring is implied)
- the user asks to land or ship a green stack — that decision belongs to the
user; report merge-readiness and stop
Loop
Declare the mode before the first poll: which PR, and whether bot comments
are in scope.
Read state via gh: gh pr view <N> --json state,mergeable,mergeStateStatus,reviewDecision,isDraft,headRefOid,headRefName
and gh pr checks <N> --json name,bucket (bucket is pass/fail/pending/skipping/cancel).
Normalize before classifying: mergeable arrives uppercased
(MERGEABLE/CONFLICTING, UNKNOWN or empty while GitHub computes it),
and reviewDecision is an empty string when no review exists — not
none. Exit codes: gh pr checks --json exits 0 even when checks
fail — judge by bucket, never the exit code; with no checks
configured it exits 1 printing "no checks reported", which is the
no-checks path, not an error.
Treat aggregate mergeStateStatus=BLOCKED as blocked and UNKNOWN as waiting before allowing ready. Confirm the first read reports the requested PR before acting on it.
Apply the watch-pr verdict policy (src/features/watch-pr/policy.ts
semantics, embedded below). Do not eyeball; classify.
Determine reviewRequired from the repository's branch-protection
settings (for example, gh api repos/OWNER/REPO/branches/BRANCH/protection
and the required_pull_request_reviews field); a ruleset that requires
reviews independently of classic branch protection counts the same way.
Pass that boolean into the
policy; do not treat an empty review decision as a blocker when the branch
does not require approval.
Act on the verdict — every lane gets the polled identity: pass the
repo and PR number explicitly and verify the checkout sits on that PR's
head before mutating anything. Bare gh pr checks/gh pr view select
whatever PR owns the current branch, which need not be the one babysit
polls.
- failing check →
fix-ci (classify real/flaky/environmental, then fix; pass the target repo, PR number, head SHA, and base branch)
- requested changes or unresolved review threads →
get-pr-comments on
the polled repo and PR number — triage threads, then address each
through the review lane; reply to
threads you resolve; dismiss bot noise with a concrete reason instead
of churning code. Read the threads surface (comments/reviews via
the get-pr-comments fetch) even when reviewDecision is empty or
approved — a non-blocking review or a comment after approval leaves
the decision clean while real threads stand — and never report ready
while an in-scope thread is untriaged
- conflicts →
fix-merge-conflicts in its no-rebase mode, run on the
polled PR's owned checkout: resolve
with a merge commit only. Never rebase and never force-push here —
this constraint overrides that skill's own-branch rebase option,
because babysit's contract forbids both. If the branch is not ours to
resolve, report to the branch owner instead
- mergeability unknown → wait one interval and re-read; it is never an
error
- draft or missing review → report what is missing; do not self-approve
Ledger discipline: watch verdicts (ready/waiting/blocked/gone)
are gate states, not verification — never write them into the
verification ledger, whose vocabulary is separate. Append a verification
ledger row (the writer's canonical path under OMC's state root) only
when you executed a check
yourself — e.g. a fix-ci rerun went green (unit-test-verified, with
the command as evidence). One row per executed check, never per poll.
Write it through the repository writer so header creation, locking, and
validation are enforced. Resolve the installed package root the
figure-it-out way: plugin-root variables first, then walk the installed
oh-my-claudecode package from the working directory — and report the
resolution failure instead of skipping the write:
node --input-type=module -e "const {createRequire}=await import('node:module'); const path=await import('node:path'); const {pathToFileURL}=await import('node:url'); let root=process.env.CLAUDE_PLUGIN_ROOT||process.env.OMC_PLUGIN_ROOT; if(!root){ const req=createRequire(process.cwd()+'/package.json'); for (const name of ['oh-my-claude-sisyphus','oh-my-claudecode']) { try { root=path.dirname(req.resolve(name+'/package.json')); break; } catch {} } } if(!root) throw new Error('cannot resolve the installed package root; set CLAUDE_PLUGIN_ROOT or OMC_PLUGIN_ROOT'); const {appendLedgerEntry,defaultLedgerPath}=await import(pathToFileURL(root+'/dist/features/verification-ledger/index.js').href); await appendLedgerEntry(defaultLedgerPath(),{ts:new Date().toISOString(),kind:'babysit',ref:'<N>',sha:'<HEAD_SHA>',verdict:'unit-test-verified',evidence:'<command>',verifier:'babysit'});"
The writer owns the exact seven-column TSV layout; do not append raw rows.
Report: verdict, what changed since the last poll, what is still
blocking, and the exact commands you ran. Every claim carries its
evidence.
Poll with gh pr checks --watch or a sleep loop at a stated interval; state
the interval. Stop when the PR is merge-ready, merged, closed, or the user
says stop, and say which.
The verdict policy
Classification order, first match wins:
- conflicts,
mergeStateStatus=BLOCKED, DIRTY, or BEHIND → blocked (merge conflicts or another aggregate gate; the branch owner decides the resolution)
- any failed check → blocked (fix lane)
- any canceled check → blocked (bucket
cancel; rerun or clear it — a canceled check is not a green gate)
- changes requested → blocked (review lane)
- branch protection or rulesets require reviews, and approval is missing → blocked (needs a human reviewer; never self-approve)
- mergeability or
mergeStateStatus=UNKNOWN or DRAFT → waiting (re-poll; not an error). HAS_HOOKS is not a wait: GitHub defines it as mergeable with passing commit status and pre-receive hooks — the hooks belong to the merge attempt, so an otherwise green PR with HAS_HOOKS classifies normally
- pending checks → waiting
- no checks configured → waiting until the same head SHA has shown no
checks for a 60-second confirmation window; only then is the absence
real. A first sighting of "no checks" is never readiness. Before serving
that window, check whether the repo has PR-triggered workflows at all
(
.github/workflows/, or a run on another PR): when workflows exist but
this head shows none — observed in the wild on path-filtered and
skipped-event pushes — cross-check gh run list --branch <head>; a
persistent zero-run anomaly is blocked (investigate: path filters,
base mismatch, skipped events), not a no-checks repo.
- otherwise → ready, with the head SHA recorded in the proof
"Ready" means the gates you can see are green. It is not permission to
merge, and it is not verification of the change itself — that evidence
belongs to verify and the ledger.
Rules
- Never merge, never rebase, never force-push, never approve a review.
- A review-bot comment gets a skeptical read: real bugs are fixed, non-issues
are dismissed with a concrete reason.
- One fix lane at a time; wait for its push before re-classifying.
1---2name: babysit3description: "Drive an open PR to merge-ready on the watch-pr verdict policy — watch checks and review state, fix CI, address comments; never merges, rebases, or force-pushes. For 'get this green' or 'babysit PR #N'."4aliases: []5metadata:6 source: https://skillmd.com/skills/tuyv/babysit7 credits:8 babysit-workflow: pstack9 watch-pr-policy: pstack10 author: Lauren Tan11 url: "https://github.com/cursor/plugins/tree/main/pstack"12 port: pstack-claude13 port-author: Michael Denyer14 port-url: "https://github.com/michael-denyer/pstack-claude"15---1617# Babysit1819Keep an open PR moving toward merge-ready: watch its checks, review threads,20and mergeability; act on what blocks them; and report evidence. The PR's21merge stays with the human — green is not safe, and this skill never merges,22rebases, or force-pushes.2324## When to use2526- "get this PR green", "babysit PR #N", "address the review-bot comments"27- the user wants a PR they opened earlier driven to merge-ready while they28 are away2930## When not to use3132- merely opening a PR (no monitoring is implied)33- the user asks to land or ship a green stack — that decision belongs to the34 user; report merge-readiness and stop3536## Loop3738Declare the mode before the first poll: which PR, and whether bot comments39are in scope.40411. **Read state** via `gh`: `gh pr view <N> --json state,mergeable,mergeStateStatus,reviewDecision,isDraft,headRefOid,headRefName`42 and `gh pr checks <N> --json name,bucket` (bucket is `pass`/`fail`/`pending`/`skipping`/`cancel`).43 Normalize before classifying: `mergeable` arrives uppercased44 (`MERGEABLE`/`CONFLICTING`, `UNKNOWN` or empty while GitHub computes it),45 and `reviewDecision` is an **empty string** when no review exists — not46 `none`. Exit codes: `gh pr checks --json` exits 0 even when checks47 **fail** — judge by `bucket`, never the exit code; with no checks48 configured it exits 1 printing "no checks reported", which is the49 no-checks path, not an error.50 Treat aggregate `mergeStateStatus=BLOCKED` as blocked and `UNKNOWN` as waiting before allowing ready. Confirm the first read reports the requested PR before acting on it.512. **Apply the watch-pr verdict policy** (`src/features/watch-pr/policy.ts`52 semantics, embedded below). Do not eyeball; classify.53 Determine `reviewRequired` from the repository's branch-protection54 settings (for example, `gh api repos/OWNER/REPO/branches/BRANCH/protection`55 and the `required_pull_request_reviews` field); a ruleset that requires56 reviews independently of classic branch protection counts the same way.57 Pass that boolean into the58 policy; do not treat an empty review decision as a blocker when the branch59 does not require approval.603. **Act on the verdict** — every lane gets the polled identity: pass the61 repo and PR number explicitly and verify the checkout sits on that PR's62 head before mutating anything. Bare `gh pr checks`/`gh pr view` select63 whatever PR owns the current branch, which need not be the one babysit64 polls.65 - failing check → `fix-ci` (classify real/flaky/environmental, then fix; pass the target repo, PR number, head SHA, and base branch)66 - requested changes or unresolved review threads → `get-pr-comments` on67 the polled repo and PR number — triage threads, then address each68 through the review lane; reply to69 threads you resolve; dismiss bot noise with a concrete reason instead70 of churning code. Read the threads surface (`comments`/`reviews` via71 the get-pr-comments fetch) even when `reviewDecision` is empty or72 `approved` — a non-blocking review or a comment after approval leaves73 the decision clean while real threads stand — and never report `ready`74 while an in-scope thread is untriaged75 - conflicts → `fix-merge-conflicts` **in its no-rebase mode**, run on the76 polled PR's owned checkout: resolve77 with a merge commit only. Never rebase and never force-push here —78 this constraint overrides that skill's own-branch rebase option,79 because babysit's contract forbids both. If the branch is not ours to80 resolve, report to the branch owner instead81 - mergeability unknown → wait one interval and re-read; it is never an82 error83 - draft or missing review → report what is missing; do not self-approve844. **Ledger discipline**: watch verdicts (`ready`/`waiting`/`blocked`/`gone`)85 are gate states, not verification — never write them into the86 verification ledger, whose vocabulary is separate. Append a verification87 ledger row (the writer's canonical path under OMC's state root) only88 when *you* executed a check89 yourself — e.g. a `fix-ci` rerun went green (`unit-test-verified`, with90 the command as evidence). One row per executed check, never per poll.91 Write it through the repository writer so header creation, locking, and92 validation are enforced. Resolve the installed package root the93 figure-it-out way: plugin-root variables first, then walk the installed94 `oh-my-claudecode` package from the working directory — and report the95 resolution failure instead of skipping the write:9697 ```sh98 node --input-type=module -e "const {createRequire}=await import('node:module'); const path=await import('node:path'); const {pathToFileURL}=await import('node:url'); let root=process.env.CLAUDE_PLUGIN_ROOT||process.env.OMC_PLUGIN_ROOT; if(!root){ const req=createRequire(process.cwd()+'/package.json'); for (const name of ['oh-my-claude-sisyphus','oh-my-claudecode']) { try { root=path.dirname(req.resolve(name+'/package.json')); break; } catch {} } } if(!root) throw new Error('cannot resolve the installed package root; set CLAUDE_PLUGIN_ROOT or OMC_PLUGIN_ROOT'); const {appendLedgerEntry,defaultLedgerPath}=await import(pathToFileURL(root+'/dist/features/verification-ledger/index.js').href); await appendLedgerEntry(defaultLedgerPath(),{ts:new Date().toISOString(),kind:'babysit',ref:'<N>',sha:'<HEAD_SHA>',verdict:'unit-test-verified',evidence:'<command>',verifier:'babysit'});"99 ```100 The writer owns the exact seven-column TSV layout; do not append raw rows.1015. **Report**: verdict, what changed since the last poll, what is still102 blocking, and the exact commands you ran. Every claim carries its103 evidence.104105Poll with `gh pr checks --watch` or a sleep loop at a stated interval; state106the interval. Stop when the PR is merge-ready, merged, closed, or the user107says stop, and say which.108109## The verdict policy110111Classification order, first match wins:112113- conflicts, `mergeStateStatus=BLOCKED`, `DIRTY`, or `BEHIND` → **blocked** (merge conflicts or another aggregate gate; the branch owner decides the resolution)114- any failed check → **blocked** (fix lane)115- any canceled check → **blocked** (bucket `cancel`; rerun or clear it — a canceled check is not a green gate)116- changes requested → **blocked** (review lane)117- branch protection or rulesets require reviews, and approval is missing → **blocked** (needs a human reviewer; never self-approve)118- mergeability or `mergeStateStatus=UNKNOWN` or `DRAFT` → **waiting** (re-poll; not an error). `HAS_HOOKS` is not a wait: GitHub defines it as mergeable with passing commit status and pre-receive hooks — the hooks belong to the merge attempt, so an otherwise green PR with `HAS_HOOKS` classifies normally119- pending checks → **waiting**120- no checks configured → **waiting** until the same head SHA has shown no121 checks for a 60-second confirmation window; only then is the absence122 real. A first sighting of "no checks" is never readiness. Before serving123 that window, check whether the repo has PR-triggered workflows at all124 (`.github/workflows/`, or a run on another PR): when workflows exist but125 this head shows none — observed in the wild on path-filtered and126 skipped-event pushes — cross-check `gh run list --branch <head>`; a127 persistent zero-run anomaly is **blocked (investigate: path filters,128 base mismatch, skipped events)**, not a no-checks repo.129- otherwise → **ready**, with the head SHA recorded in the proof130131"Ready" means the gates you can see are green. It is not permission to132merge, and it is not verification of the change itself — that evidence133belongs to `verify` and the ledger.134135## Rules136137- Never merge, never rebase, never force-push, never approve a review.138- A review-bot comment gets a skeptical read: real bugs are fixed, non-issues139 are dismissed with a concrete reason.140- One fix lane at a time; wait for its push before re-classifying.