accountable-engineerin…
Use explicit human checkpoints for architecture, security, rollout, or operational decisions.
Use when monitoring an open GitHub PR for CI failures, review feedback, mergeability, and safe retries or fixes.
$ npx -y skills add jellydn/my-ai-tools --skill babysit-pr --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/babysit-prContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when monitoring an open GitHub PR for CI failures, review feedback, mergeability, and safe retries or fixes.
name: babysit-pr description: Use when monitoring an open GitHub PR for CI failures, review feedback, mergeability, and safe retries or fixes. version: 1.0.0 author: my-ai-tools contributors metadata: source: openai/codex@5e96aabd68dc6194f5ad928cb7f5d0bc71b72df9 source_path: .codex/skills/babysit-pr
Babysit a PR persistently until one of these terminal outcomes occurs:
Do not stop merely because a single snapshot returns `idle` while checks are still pending.
Accept any of the following:
1. When the user asks to "monitor"/"watch"/"babysit" a PR, start with the watcher's continuous mode (`--watch`) unless you are intentionally doing a one-shot diagnostic snapshot. 2. Run the watcher script to snapshot PR/review/CI state (or consume each streamed snapshot from `--watch`). 3. Inspect the `actions` list in the JSON response. 4. If `diagnose_ci_failure` is present, inspect failed run logs and classify the failure. 5. If the failure is likely caused by the current branch, patch code locally, commit, and push. Do not patch random flaky tests, CI infrastructure, dependency outages, runner issues, or other failures that are unrelated to the branch. 6. If `process_review_comment` is present, inspect surfaced published review items and decide whether to address them. 7. If a review item is actionable and correct, patch code locally, commit, push, and then resolve the associated review thread only when allowed by the GitHub state mutation policy below. 8. Do not post replies to human-authored review comments/threads unless the user explicitly confirms the exact response. If a human review item is non-actionable, already addressed, or not valid, surface the item and recommended response to the user instead of replying on GitHub. 9. If the failure is likely flaky/unrelated and `retry_failed_checks` is present, rerun failed jobs with `--retry-failed-now`. 10. If both actionable review feedback and `retry_failed_checks` are present, prioritize review feedback first; a new commit will retrigger CI, so avoid rerunning flaky checks on the old SHA unless you intentionally defer the review change. 11. On every loop, look for newly surfaced review feedback before acting on CI failures or mergeability state, then verify mergeability / merge-conflict status (for example via `gh pr view`) alongside CI. 12. After any push or rerun action, immediately return to step 1 and continue polling on the updated SHA/state. 13. If you had been using `--watch` before pausing to patch/commit/push, relaunch `--watch` yourself in the same turn immediately after the push (do not wait for the user to re-invoke the skill). 14. Repeat polling until `stop_pr_closed` appears or a user-help-required blocker is reached. A green + review-clean + mergeable PR is a progress milestone, not a reason to stop the watcher while the PR is still open. 15. Maintain terminal/session ownership: while babysitting is active, keep consuming watcher output in the same turn; do not leave a detached `--watch` process running and then end the turn as if monitoring were complete.
python3 skills/babysit-pr/scripts/gh_pr_watch.py --pr auto --once
python3 skills/babysit-pr/scripts/gh_pr_watch.py --pr auto --watch
python3 skills/babysit-pr/scripts/gh_pr_watch.py --pr auto --retry-failed-now
python3 skills/babysit-pr/scripts/gh_pr_watch.py --pr <number-or-url> --once
Use `gh` commands to inspect failed runs before deciding to rerun.
`gh run view --log-failed` is workflow-run scoped and may not expose failed-job logs until the overall run finishes. For faster diagnosis, poll the run's jobs first and, as soon as a specific job has failed, fetch that job's logs directly from the Actions job logs endpoint. The watcher includes a `failed_jobs` list with each failed job's `job_id` and `logs_endpoint` when GitHub exposes one.
Prefer treating failures as branch-related when failed-job logs point to changed code (compile/test/lint/typecheck/snapshots/static analysis in touched areas).
Prefer treating failures as flaky/unrelated when logs show transient infra/external issues (timeouts, runner provisioning failures, registry/network outages, GitHub Actions infra errors).
Do not attempt to fix flaky/unrelated failures by changing tests, build scripts, CI configuration, dependency pins, or infrastructure-adjacent code unless the logs clearly connect the failure to the PR branch. For flaky/unrelated failures, rerun only when the watcher recommends `retry_failed_checks`; otherwise wait or stop for user help.
If classification is ambiguous, perform one manual diagnosis attempt before choosing rerun.
Read `skills/babysit-pr/references/heuristics.md` for a concise checklist.
The watcher surfaces review items from:
Portable, source-controlled configuration for AI coding assistants. my-ai-tools installs one consistent set of agent guidelines, skills, commands, hooks, MCP servers, and tool settings across supported AI coding assistants.
Use explicit human checkpoints for architecture, security, rollout, or operational decisions.
Record architecture decisions with ADRs — captures why, alternatives considered, and consequences
Inspect history and architecture for hidden constraints before risky cross-cutting changes.
Build an interactive report or experiment when the user asks to explore model capabilities.
Audit a diff for structural maintainability and unnecessary complexity.
Review a branch, PR, or worktree diff for repository conventions and stated intent.