pr-babysitter
Skill0 starsChanged 4 months agoMITView on GitHub
Keep a PR merge-ready after push: monitor CI until green, poll for new review comments (human, Copilot, security scanners, bots), alert the user, validate and auto-fix legitimate feedback, auto-commit and auto-push, reply and resolve threads. Use after pushing to a PR branch or when asked to babysit a PR.
- Commits and pushes
6 other projects use a version of this.
Adopted by
Most recently taken up by
- NVIDIA/TensorRT-Model-Connecttheir own version, first seen Oct 13, 2026
- manastalukdar/ai-devstudiotheir own version, first seen Oct 13, 2026
- mblode/agent-skillstheir own version, first seen Sep 11, 2026
- NasserAlbusaidi/ship-gatetheir own version, first seen Jul 23, 2026
- nfeuer/project-foundation-kittheir own version, first seen Jul 5, 2026
- b1rdmania/ghostclawtheir own version, first seen May 3, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- NVIDIA/TensorRT-Model-Connect★ 290same name
- mblode/agent-skills★ 189same name
- b1rdmania/ghostclaw★ 91same name
- manastalukdar/ai-devstudio★ 1same name
- NasserAlbusaidi/ship-gate★ 0same name
- nfeuer/project-foundation-kit★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository40 other files it gives its agents.
- address-pr-feedbackSkill
- architectureSkill
- code-reviewSkill
- code-structureSkill
- competitive-briefSkill
- contract-guardSkill
- debugSkill
- deep-workSkill
- dependency-upgradeSkill
- deploy-checklistSkill
- diagnoseSkill
- documentationSkill
- explain-pr-step-by-stepSkill
- feedback-checkpointSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- improve-codebase-architectureSkill
- incident-responseSkill
- memory-managementSkill
- observabilitySkill
- plan-criticSkill
- plan-from-rfcSkill
- prototypeSkill
- queue-checkSkill
- rebase-onto-mainSkill
- releaseSkill
- security-reviewSkill
- setup-engineering-skillsSkill
- squash-and-pushSkill
- synthesize-researchSkill
- system-designSkill
- tddSkill
- tech-debtSkill
- testing-strategySkill
- to-issuesSkill
- to-prdSkill
- triageSkill
- verification-before-completionSkill
- zoom-outSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. 0 are common, 16 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
16
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 18
Run from the repository root that owns the PR
- Distinctive: line 27
If owner/repo are needed:
- Distinctive: line 35
Run the bundled cross-platform poll script:
- Distinctive: line 89
Never resolve a thread with code changes unless validation passed and tests support the fix.
- Distinctive: line 93
When the script reports new items (or on loop wake):
- Very specific: line 110
Run scoped lint/typecheck/tests when available
- Distinctive: line 111
Commit with the repository's commit-message convention
- Distinctive: line 117
Do not silence constructive feedback in touched code by default.
- Distinctive: line 121
Before each push from babysitter fixes:
- Very specific: line 123
Check whether changed behavior/contracts/config require docs updates (README, onboarding, runbooks, endpoint docs).
- Distinctive: line 124
If docs are impacted, update the relevant docs in the same PR before push.
- Distinctive: line 125
If no docs are needed, state why in the final babysitter summary.
- Distinctive: line 126
Do not mark merge-ready if docs are stale relative to merged code behavior.
- Very specific: line 130
Use variableized gh api graphql with -F owner=, -F name=, -F number= (mandatory on Windows PowerShell.
- Distinctive: line 136
After every push, poll until current runs complete:
- Distinctive: line 149
Do not mark healthy while required checks are red or pending
- Very specific: line 169
When the output contains AGENT_LOOP_WAKE_PR_COMMENT, wake and run the full babysit loop (alert → validate → fix → push → reply → resolve).
- Distinctive: line 173
Every babysitter fix follows the host project's own rules first (root agent instructions, contributing guide, lint config).
- Distinctive: line 185
After each scoped fix:
- Distinctive: line 194
Verify staged paths contain only intended files before commit.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PR Babysitter
Autonomous PR operations loop with auto-fix and auto-push. Use after pushing to a PR branch, or invoke /pr-babysitter.
Prerequisites
ghinstalled and authenticated (gh auth status)nodeon PATH (for the bundled poll script)- Run from the repository root that owns the PR
- On Windows PowerShell: use separate shell commands (no
&&chaining) and variableized GraphQL (-F owner=… -F name=… -F number=…) instead of string-interpolated queries
Resolve PR context
gh pr view --json number,url,baseRefName,headRefName,isDraft,mergeable,statusCheckRollupIf owner/repo are needed:
gh repo view --json nameWithOwnerAlert on new comments
Run the bundled cross-platform poll script:
node "${CLAUDE_SKILL_DIR}/scripts/poll-pr-comments.mjs" --pr <number>Optional flags:
--owner <org> --repo <name>— override auto-detection from the current repo--state-dir <dir>— where seen-comment state is stored (default: OS temp dir, never inside the repo)--json— machine-readable output only
Script behavior
- Fetches unresolved review threads, minimized/suppressed review comments, bot review summaries with suppressed hints, issue comments, and reviews via
gh - Flags items as
suppressed/requiresValidation(Copilot, security scanners, bots, minimized/low-confidence) - Diffs against per-PR state (
<owner>-<repo>-<pr>.jsonin the state dir); first run initializes state without alerting - Prints new items and updates state
- Fires a native OS notification (macOS notification + sound, Windows tray balloon) via the bundled
scripts/pr-babysitter-notify.mjs, and emits the sentinel lineAGENT_LOOP_WAKE_PR_COMMENTfor loop/wake integration
Suppressed bot comments (critical)
GitHub may hide Copilot feedback as "Comments suppressed due to low confidence" in the PR UI. Do not treat these as ignorable.
The poll script handles them by:
- Fetching
isMinimized/minimizedReasonon review comments - Parsing review summaries for suppressed
file:linehints when the full comment body is not inline - Tagging output with
[SUPPRESSED]and[VALIDATE-FIRST]
Alert always. Auto-fix only after validation passes.
Comment validation gate (before auto-fix)
Functional correctness is the #1 goal. Auto-fix is enabled, but never blind.
For each comment (human, Copilot, scanner, bot — including suppressed):
| Step | Check |
| 1 | Read cited code and understand current runtime behavior |
| 2 | Is this a confirmed defect (broken test, schema/type mismatch, security issue) or preference/refactor? |
| 3 | Would the suggested fix change behavior? If yes, only proceed if the bug is proven (failing test, repro, contract violation) |
| 4 | Does the fix obey the project's standards, PR scope, and module boundaries? |
| 5 | Is this refactor/style-only? If it's in touched files and materially improves clarity/testability with low behavior risk, prefer a minimal safe fix; otherwise reject with rationale |
| 6 | Still uncertain? Do not auto-fix — reply with analysis; leave open or escalate |
Outcomes
- Fix + push — validated defect; minimal diff; scoped tests pass; behavior preserved or bug corrected
- Improve + push — non-functional improvement in touched area that clearly improves maintainability/readability and is behavior-preserving
- Reply only — invalid, speculative, out of scope, or refactor-only; explain why with evidence
- Needs human — ambiguous behavior impact or conflicting intent
Never resolve a thread with code changes unless validation passed and tests support the fix.
Alert the user
When the script reports new items (or on loop wake):
- Post a chat summary per item: author, source, suppressed/VALIDATE-FIRST flags, location, snippet, URL
- The OS notification fires automatically from the poll script
- Proceed to auto-fix only for comments that pass the validation gate
Comment triage and auto-fix
- Fetch unresolved review threads and minimized/suppressed comments (GraphQL). Read comment body + minimal location; avoid dumping full JSON.
- Classify author:
- Human reviewer — treat change requests as actionable unless clearly nitpick/out of scope; still validate behavior impact
- Copilot — always validate; never skip suppressed/low-confidence items
- Security scanners (Aikido, Snyk, CodeQL, etc.) — validate and fix real issues only
- Other bots — validate before fixing
- For each comment passing the validation gate:
- Declare allowed file list (PR scope + comment path)
- Implement the minimal fix, following the project's own conventions and rules
- Run scoped lint/typecheck/tests when available
- Commit with the repository's commit-message convention
- Push to PR branch
- Reply on thread with concrete resolution notes
- Resolve thread via GraphQL
- Restart CI loop
- For invalid feedback: reply with rationale; do not change code; resolve only if fully addressed by explanation
- Do not silence constructive feedback in touched code by default. If declining a maintainability/readability suggestion, explain concrete trade-offs (scope, risk, behavior uncertainty) and prefer leaving the thread open unless clearly settled.
Documentation currency gate (required)
Before each push from babysitter fixes:
- Check whether changed behavior/contracts/config require docs updates (README, onboarding, runbooks, endpoint docs).
- If docs are impacted, update the relevant docs in the same PR before push.
- If no docs are needed, state why in the final babysitter summary.
- Do not mark merge-ready if docs are stale relative to merged code behavior.
Reply and resolve (GraphQL)
Use variableized gh api graphql with -F owner=, -F name=, -F number= (mandatory on Windows PowerShell; good practice everywhere).
Resolve a thread after the fix is pushed and the reply is posted. Prefer replying through gh pr comment or review comment APIs as appropriate to the thread type.
CI loop
- After every push, poll until current runs complete:
gh pr checks <number> --watchOr inspect rollup:
gh pr view <number> --json statusCheckRollup- On failure: fetch logs for the failed check, fix in scope, commit, push, repeat
- Do not mark healthy while required checks are red or pending
Periodic polling while working
While the PR is open and you are otherwise idle, poll on an interval:
while true; do
sleep 300
node "${CLAUDE_SKILL_DIR}/scripts/poll-pr-comments.mjs" --pr <number>
donewhile ($true) {
Start-Sleep -Seconds 300
node "$env:CLAUDE_SKILL_DIR/scripts/poll-pr-comments.mjs" --pr <number>
}When the output contains AGENT_LOOP_WAKE_PR_COMMENT, wake and run the full babysit loop (alert → validate → fix → push → reply → resolve); otherwise keep polling.
Code-change rules (every fix)
Every babysitter fix follows the host project's own rules first (root agent instructions, contributing guide, lint config). Baseline regardless of project:
| Area | Rule |
| Scope | Only touch files within PR scope + the commented path; no opportunistic refactors |
| Behavior | Preserve runtime behavior unless a defect is proven; match existing style; minimal diff |
| Line endings | Preserve existing line endings; never rewrite whole files for small edits |
| Tests | Run the smallest relevant suite before push; a fix with failing tests never ships |
| Hygiene | No agent/IDE config folders or local secrets in commits; verify staged paths before commit |
Auto-push commit flow
After each scoped fix:
git add <allowed-files-only>
git status
git commit -m "<repo-convention message>"
git pushVerify staged paths contain only intended files before commit.
Stop conditions
Merge-ready: green required checks + mergeable + no unresolved actionable threads
Blocked — report and stop:
- Auth / permission errors
- Fix needs out-of-scope or CI workflow changes
- Unresolvable merge intent conflict
- Cannot validate a bot finding and the fix would be risky — leave thread open with explanation
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

