Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Babysit Ci?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ryanportfolio-babysit-ci)
---
name: "babysit-ci"
description: "Watch PR checks, fix failures: 'watch CI', 'fix CI', 'get checks green', PR with failing or pending checks. Not a bare merge request."
---
# Babysit CI
## Mode
- **watch**: inspect and report. No edits, pushes, or reruns.
- **fix** ("fix CI", "get checks green"): scoped fixes and pushes. Never merge.
- Ambiguous request: watch.
## Loop
1. Find the PR: `gh pr view <pr> --json number,url,headRefName,headRefOid`. No PR given: pass the branch from `git branch --show-current`.
2. Read checks with `gh pr checks <pr> --json name,bucket,state,workflow,link`. Judge the PR by this output alone: Actions runs are only part of it, since apps and status contexts report here too.
3. Diagnose failures before waiting on anything. Each failing check gets one root error: the earliest log line that names a cause; errors after it often follow from it.
- Actions check: take the run id from its link; `gh run view <run-id> --log-failed`.
- External check: open its link and find the step or service that failed.
4. Pending checks: run `gh pr checks <pr> --watch --fail-fast` as a long-running command if this runtime supports one and keep diagnosing meanwhile; otherwise run it in the foreground.
5. Watch mode: once the watcher exits, reread the checks and the head SHA, report, and stop. Fix mode continues below.
## Fix
Sort each failure before touching code:
- **Not from this PR's diff**: see whether the default branch already passes that check. If it does, `git fetch origin` and `git merge origin/<default>` bring the fix in; this PR carries no patch for it.
- **Flake**: one rerun (`gh run rerun <run-id> --failed`), and cite the evidence: it passed on rerun with no change, or it is a known flake (say where it is recorded).
- **Caused by this PR**: if the failing command is cheap to run locally, reproduce the failure first and rerun it after the change. One cause per push. Stage explicit paths. Never pass `--no-verify`.
After any push, restart at step 2. A push can trigger workflows the old list lacked or retire ones it showed, so check state read before the push is stale.
## Stop, report, and ask before continuing
- 3 fix pushes done.
- The same failure survives a fix: switch to `$fable-mode`, rethink the cause, and name the fix tier.
- The fix needs secrets, infra, permissions, or a user decision.
## Before calling it green
Re-read `headRefOid`; if it moved, run the loop on the new head. A missing, skipped, or unavailable expected check does not pass; list it.
Each fix push leaves a head without the pre-merge review. State that in the report. Rerunning the cross-vendor `$claude-review` uses the user's Claude subscription and needs their OK.
A CI quirk that cost a retry goes to pitfalls via `$recall`.
## Report
- Each iteration: check → first root error line → link → fix applied.
- Final: status and PR URL, or blocked plus the next action.