PR Babysitter
Continuously track a GitHub pull request’s reviews, CI, and mergeability while handling safe fixes.
The skill explicitly restricts replies to human reviewers, limits thread mutation, requires branch-state checks, avoids destructive Git operations, and caps retries, showing meaningful control of permissions and external effects. It can still commit, push, rerun CI, and process GitHub data automatically without per-action confirmation, sensitive-log/data-flow disclosure, or a clear rollback procedure, so points are deducted.
The script, decision tree, and committed pytest tests cover review prioritization, pending reviews, continuous polling, and failed-job log endpoints, with diagnostic error paths described. However, nothing was executed; coverage is incomplete, and operation depends on gh, authentication, GitHub APIs, and live environment state. Several abnormal paths and termination behaviors are not fully proven, so the static score is capped below 10.
Triggers, PR input forms, watch/once modes, and stop conditions are clearly described for GitHub PR maintenance. The skill nevertheless depends on GitHub CLI, GitHub network access, and English-oriented GitHub workflows; non-GitHub boundaries, Chinese interaction, and mainland-China reachability are not documented, so points are deducted.
The material includes objectives, inputs, commands, workflow guidance, failure classification, review handling, mutation policy, references, and tests. The repository also supplies Apache-2.0 licensing, official provenance, and security policy. The skill lacks independent versioning, changelog, named maintenance responsibility, explicit installation/dependency notes, and fuller troubleshooting, so points are deducted.
The intended outcome is concrete: monitor PR state, surface reviews and CI failures, and conditionally fix or retry them. Source tests demonstrate several key behaviors, but no execution was performed, and real permissions, network, branch state, and review judgment materially affect results. Direct usability evidence is therefore limited and scored conservatively within the static cap.
Source code, reference documents, and committed pytest tests provide auditable evidence for several decision paths. There are no executed results, dedicated CI results for this skill, or independent corroboration, so the static score is capped below 5.
- The skill may automatically commit, push branch changes, and rerun failed CI during monitoring; confirm the worktree, target branch, GitHub permissions, and organizational approval requirements first.
- Logs and GitHub API responses may contain code, review comments, or build information; the files do not specify redaction, retention, or access controls for sensitive data.
- Core operation depends on gh, GitHub authentication, and continuous network access, which may be unreliable in mainland-China network environments.
- The script and tests were not executed in this static review, so live API compatibility, recovery behavior, and polling behavior remain unverified.
What it does & when to use it
PR Babysitter monitors a GitHub pull request after creation. It polls review comments, CI checks or workflow runs, and mergeability until the PR is merged, closed, or requires user help. It can diagnose branch-related failures, patch and push appropriate fixes, and retry likely flaky checks up to three times. It continues watching open PRs after they become green so new review feedback is surfaced promptly.
Runs the provided Python watcher in one-shot or continuous mode; reads pull-request, review, CI, workflow, and mergeability state; uses GitHub CLI commands to inspect failed runs, jobs, and logs; surfaces published review feedback; patches local code, commits, and pushes when a safe branch-related fix is appropriate; retries failed checks when the watcher recommends it, up to three times; stops when the PR is merged, closed, or blocked on user help.
- A developer wants continuous CI monitoring after opening a pull request.
- A contributor wants newly published review comments surfaced while waiting for approval.
- A maintainer needs to diagnose a test, compile, lint, typecheck, or snapshot failure connected to the PR branch.
- A developer wants likely transient checks retried when the watcher identifies them as flaky or unrelated to the branch.
Pros & cons
- Covers review comments, CI checks, workflow runs, mergeability, and conflicts in one monitoring loop.
- Distinguishes likely branch-related failures from infrastructure and external-service failures.
- Supports up to three retries for likely flaky failures.
- Keeps watching after a PR becomes green so late review feedback is not missed.
- Requires Python 3, GitHub CLI, network access, and suitable GitHub permissions.
- The source provides no test results, supported-platform matrix, or separate skill installation instructions.
- It does not automatically reply to human-authored review comments without explicit confirmation.
- Permission problems, infrastructure failures, exhausted retries, and ambiguous review requests may require user intervention.
How to install
Install Codex CLI using a README-supported method, such as curl -fsSL https://chatgpt.com/codex/install.sh | sh on macOS or Linux, powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex" on Windows, or npm install -g @openai/codex and brew install --cask codex. The skill is bundled at .codex/skills/babysit-pr/SKILL.md; the source does not document a separate installation procedure for this skill.
How to use
Ask Codex to monitor or babysit an open GitHub PR, for example: “Monitor the PR for the current branch, watch CI and review comments, and keep polling until it is merged, closed, or blocked.” A PR number or URL may also be supplied. Supported commands include python3 .codex/skills/babysit-pr/scripts/gh_pr_watch.py --pr auto --once, python3 .codex/skills/babysit-pr/scripts/gh_pr_watch.py --pr auto --watch, and, only when indicated by the watcher, python3 .codex/skills/babysit-pr/scripts/gh_pr_watch.py --pr auto --retry-failed-now.