
babysit-pr
Watch a PR until it is merge-ready: CI, review threads, fix-push loop. Use for "babysit", "watch the PR", "get it green".
- Installs
- 555
- Last 24h
- +22
- Trending rank
- #5494
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/timschoch/skilly --skill babysit-pr- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads babysit-pr automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Hold one PR until it is merge-ready: poll, classify, fix, push, poll again. Terminal states are merged, closed, needs-user. Nothing else ends the loop, not a push, not a green run, not a report.
Loop
Each pass:
- Snapshot.
bash scripts/pr-state.sh <pr> [--since <lastPushAt>]. Carry the previous pass'slastPushAtinto--since, so only review items newer than your last push surface. - Terminal first.
stateisMERGEDorCLOSED: report it and stop. - Review items before CI. A fix commit retriggers CI, so answering review first avoids spending a rerun on a SHA you are about to replace.
- CI. For each check with a failing
conclusion, runbash scripts/classify-failure.sh <check-url>before touching code. - Push. Commit on the PR head branch, push, then return to step 1 on the new SHA.
- Wait.
bash scripts/watch.sh <pr>blocks until the checks settle, then prints a fresh snapshot. Use it instead of sleeping. Cap it withBABYSIT_MAX_MINUTES, default 60.
Rules
- Published and fresh only. Act on review items whose
submittedAtorcreatedAtis newer thanlastPushAt.pr-state.shdropsPENDINGreviews: a reviewer still drafting has not spoken yet. An item answered before the last push stays answered. - Classify a failure, then act on the class.
classify-failure.shprintsflakyorrealfrom log evidence, then the first 20 failing lines.real: patch the branch.flaky: rerun it withgh run rerun <run-id> --failed. While a failure readsflaky, leave tests, build scripts, CI config and dependency pins as they are. A patch that only silences infra hides the signal for everyone downstream. - CI budget: 3 attempts per PR. An attempt is one fix push or one rerun made for a red check; a review-fix push is none. It fails when the checks settle red again.
- Third failed attempt: stop at needs-user, even with ideas left.
- Tell the user the failing checks, what each attempt changed, and the first 20 failing lines.
- Humans get the user's words, not yours. A human reviewer is any
reviews[].authorthat is neither the PR author nor flaggedisBot. Surface their item to the user with a suggested reply, and wait for explicit confirmation before posting anything to GitHub. Bot items you act on and resolve yourself. - Resolve what you fixed. Once the fix is pushed:
bash scripts/resolve-thread.sh <threadId>, usingthreads[].idfrom the snapshot. - Merge is the user's call. The done rule (
.claude/rules/workflow-done.md): committed means done, pushed means signed off. Merge mode starts only with--merge, or when the user says merge in this session. Without it, stop at green and report. - Merge mode merges at green, never before. Run
gh pr merge <pr> --squash --match-head-commit <headSha>,--mergein place of--squashfor--merge=merge. Then take one more snapshot:MERGEDends the loop.headShacomes from the green snapshot: a push that lands after it blocks the merge.- Never
--auto: on a repo without required checks it merges at once, before CI settles. - Never
--delete-branch.
- Green is a milestone, not an exit. No failing check,
mergeable: MERGEABLE, no unresolved thread: report "ready to merge", then keep polling. Late review items still land while the PR is open. Merge mode merges here instead.
Reviewer set
pr-state.sh reads bot logins from .skilly/config.json at the git root:
{ "review": { "bots": ["chatgpt-codex-connector[bot]", "some-reviewer"] } }
A login ending in [bot] also counts. Missing key or missing file means an empty list, and every reviewer but the PR author reads as human. Read the config each run; keep no login in your head.
CI
Checks are whatever the PR reports. The repo's tier in .skilly/config.json decides the set (the verify skill explains tiers). verify is the one check every tier runs, so a red verify is always a statement about this branch.
Commits
Conventional commit, prefix by content: fix: when a check was red, chore: for a lint or config nit. Add one body line, so the origin of the change stays greppable:
Babysit-pr: fixes review thread <thread-url>
Report
Close every pass with: head SHA, check tally, mergeability, what was pushed, CI attempts spent out of 3, what is still open.
FAQ
What does the babysit-pr skill do?
Watch a PR until it is merge-ready: CI, review threads, fix-push loop. Use for "babysit", "watch the PR", "get it green".
How do I install babysit-pr?
Run npx skills add https://github.com/timschoch/skilly --skill babysit-pr in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/babysit-pr/ (personal) or .claude/skills/babysit-pr/ (project).
Which AI agents can use babysit-pr?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is babysit-pr safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains babysit-pr?
It is published by timschoch in timschoch/skilly. It has 555 recorded installs.
More from timschoch/skilly
cleanup-merged-branches
timschoch/skilly
Delete remote branches whose PR was merged. Read-only dry-run, then confirm, then delete.
git-shortcuts
timschoch/skilly
Translates shorthand git/GitHub workflow commands into the correct sequence of actions. ALWAYS trigger when the user's message contains a "--" prefixed shorthand like: "--c", "--p", "--cp", "--pr", "--prm", "--cppr", "--cpprm", "--ff", "--release", "--pub", "--close" — with or without a trailing "?". The "--" prefix is required — do NOT trigger on bare letters like "c" or "pr" appearing in normal sentences. NEVER invoke this skill autonomously — it MUST always be user-invoked via an explicit "--" shorthand in their message.
step-by-step
timschoch/skilly
Walk the user through a manual procedure step by step, with every value spelled out and every link clickable.
plan-critics
timschoch/skilly
Critiques an implementation plan — or a wayfinder map/ticket — from multiple angles (security, simplicity, edge cases, scope creep, codebase conflicts, tech-specific best practices) via parallel critic subagents. Trigger: user says "kritisiere den plan", "plan check", "plan-kritik", "blinde flecken", "/plan-critics" — also invoke when a planning agent wants to validate its own plan before presenting it, or a wayfinder session wants a resolution checked before closing a ticket. Must be called at top-level (not inside a subagent) — it uses the Task tool.
qa
timschoch/skilly
Interactive QA session where user reports bugs or issues conversationally, and the agent files GitHub issues. Explores the codebase in the background for context and domain language. Use when user wants to report bugs, do QA, file issues conversationally, or mentions "QA session".
1-3-1
timschoch/skilly
Frame a problem or decision as 1-3-1: one problem, three distinct solutions, one recommendation. Use when the user brings a non-trivial decision or fork and wants options weighed before a pick ("what should I do about X", "help me decide", "weigh the tradeoffs"), or names "1-3-1" or "do a 131". Skip questions with one right answer, just answer those.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.