Raise a pull request from the current branch and babysit it to green. Opens the PR, then polls CI (~every 10 min) until every check passes, reacting to each failure by reading the logs, fixing locally
Open a pull request from the current branch, then babysit it: poll CI, react to every failure until all checks pass, and hand back a PR that is green and ready for a human to merge. This is the tail of the local agentic loop - it does not approve or merge (that's a deliberate human step for this project), and it does not run the code review (that's `review-loop`, run before you get here).
This large 1,450-word instruction set is purpose-built for testing & qa work in AI coding agents. Paste directly into your CLAUDE.md or AI agent settings.
Open a pull request from the current branch, then babysit it: poll CI, react to
every failure until all checks pass, and hand back a PR that is green and ready for a
human to merge. This is the tail of the local agentic loop - it does not approve
or merge (that's a deliberate human step for this project), and it does not run the
code review (that's review-loop, run before you get here).
Execute directly - do not enter plan mode. Report progress inline as you go.
git branch --show-current is your defaultgit switch -c <descriptive-slug>) - do not rename the current
branch if it's already a feature branch.
git push -u origin HEAD)./factory, this already passed - a quick lint + typecheck is enough.)Write the title and body from the actual diff (git diff origin/<default-branch>...HEAD), not from
memory. Base defaults to your default branch (or the argument). The body is a tight what + why, not a
file-by-file restatement - reviewers and CI read it. End the body with a clear commit message per your
commit conventions.
gh pr create --base <default-branch> --title "<type(scope): summary>" --body "<what + why>"If a PR for this branch already exists (gh pr view --json number succeeds), skip creation
and go straight to monitoring - this skill is idempotent, re-running it resumes the babysit.
Watch the checks until they all settle. Prefer a backgrounded watch so a long CI run
notifies you on completion instead of blocking (foreground sleep is unavailable):
gh pr checks <n> --watch --fail-fast # run in the background; it exits when checks settleA backgrounded watch is a notifier, not a wait. It hands control straight back, so you still need
exactly one thing that parks the run until the notification lands: a ScheduleWakeup (~600s) or aMonitor until-loop. Pairing a backgrounded watch with one ScheduleWakeup fallback is the correct
shape, not a redundancy - the wakeup is the heartbeat that keeps the loop alive if the watch never
fires. Say so in the reason ("fallback heartbeat while CI runs; the watch should notify first").
What is actually forbidden is burning tool calls to pass time. Never emit a no-op (echo .,
"still waiting") to fill a turn, and never re-poll gh pr checks faster than the CI cadence - ~10
minutes between reactions, not seconds. If you find yourself checking every few seconds, you have no
parking mechanism armed; arm one instead of polling. Concretely: one parking mechanism live at a
time, and zero tool calls between arming it and being woken.
When it returns, read the outcome (gh pr checks <n>). Three cases:
gh in a tight loop. If the background watch isn't available, use a
ScheduleWakeup / /loop-style ~600s tick to re-check rather than a foreground sleep.
factory's guidance on asking about
a decision the work surfaced), and fold in known follow-ups before pushing rather than after CI goes green.Pull the actual failure - never guess from the check name:
gh run view <run-id> --log-failed # the failing job's logstriage-visual-changes skill - not by hand-rolling raw review/MCP calls; the
skill carries the guardrails that ad-hoc calls skip. Whatever tool you use, hold three disciplines:
(1) adjudicate each story baseline-vs-candidate - look at BOTH the baseline and the candidate
image and compare, never judge the candidate alone (a change being caused by your diff says nothing
about whether the result is correct - a global CSS/theme change can quietly break an unrelated page).
(2) Triage stops at the pixels - classify intended vs regression vs flake and attribute the
change to the diff, but do NOT assert a code-level mechanism (an animation, a race, a specific CSS
cause) unless you have verified it against the actual element and code; a metric that contradicts
your proposed mechanism refutes it (a tiny changed-pixel count cannot be a whole-element fade - a
missing element is a didn't-render problem, not a frozen frame). Root-causing is a separate step.
(3) If the diff is an intended change, accept the baseline so the check clears; if it's a
regression you introduced, fix the code and push. Never blanket-accept to make the check pass -
that defeats the whole point of the tool.
(4) A reviewer's comment on a diff is part of the job, not decoration. A green check does not mean
done while a human's note on the build is open: read the comments on every poll (for UI Verify, the
comments {unresolved} count on each story, then list_comments), do what they ask, and resolve the
thread when it is addressed. UI Verify refuses to accept a story whose note is still open.
/e2e-verify cangh run rerun <run-id> --failed) once before treating it as real; if it flakes repeatedly,
say so rather than silently re-running forever.After any fix: commit, push, and return to §2 - the fresh CI run is what confirms the fix, the
same way review-loop only trusts a clean re-review.
When a CI failure exposed a generalizable mistake - something a rule or a lint guard would
have caught before you pushed (an inline route path, a missing route.test.ts, an em dash in
shipped copy, a boundary violation) - propose capturing it before you finish:
> "CI caught X. That generalizes - want me to /add-rule it so the linter/CLAUDE.md catches
> it next time?"
Only act on a yes ("adds a rule agreed"). A one-off typo is not a rule; a mistake you (or a
future agent) would plausibly repeat is. Hand the confirmed lesson to the /add-rule skill,
which decides the enforcement layer and writes the rule + guard.
Report the final state plainly: the PR link, the check trajectory (what failed, what you did,
what's green now), any baseline you accepted through the MCP and why, and any rule you proposed.
End with the explicit handoff: the PR is green and ready for you to merge - this skill never
merges.
Babysit Pr is a free testing & qa skill for AI coding agents. Raise a pull request from the current branch and babysit it to green. Opens the PR, then polls CI (~every 10 min) until every check passes, reacting to each failure by reading the logs, fixing locally. It provides a specialized system prompt that configures your agent with testing & qa expertise.
Copy the system prompt below and paste it into your CLAUDE.md file or Claude Code's custom instructions to activate Babysit Pr.
Babysit Pr is compatible with Claude Code, Cursor, GitHub Copilot, Windsurf, OpenClaw, Cline, and any AI agent that supports custom system prompts or .cursorrules files.
Yes, Babysit Pr is completely free and open source. The full source is available on GitHub at https://github.com/uiverify/uiverify/blob/main/packages/skills/skills/babysit-pr/SKILL.md. You only need a subscription to the AI agent you use it with.
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.