agentleFS
Aryansharma28Aryansharma28/skills-aryan/babysit-pr/SKILL.md

babysit-pr

Skill8 starsChanged 6 months agoMITView on GitHub

Take a PR all the way to "done" — CI green, all review/CodeRabbit comments resolved, /review run, and code quality (DRY, YAGNI, blast radius, architecture) personally verified. Use when the user says "babysit PR N", "watch this PR", "finish this PR", "keep pushing until green", or asks you to stay on a PR until it's truly ready.

  • Deletes or force-pushes
  • Commits and pushes

55 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use leaving-pr-comments, sol-loop and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • scottwaterSkill

    leaving-pr-comments

    Format comments an agent posts on GitHub on the user's behalf. Use whenever leaving a PR comment, review comment, or reply.

    Also in 9 projects that use this

  • scottwaterSkill

    sol-loop

    Review a change with GPT Sol in a loop until both agents agree. Use when the user says sol loop, or when another skill asks for a Sol review.

    Also in 7 projects that use this

  • Nexus-Organization-InfosecSkill

    full-stop

    Shut down the Full Control phone-bridge completely — end Claude's watch loop, stop the bridge server (server.py started via ensure_server.ps1), and mark Claude offline in the app. Use whenever the user invokes /full-stop or says "stop full control", "stop the watch loop", "shut down the bridge/server", or "stop the ps1". Counterpart of [[full-control]], which starts everything.

    Also in 9 projects that use this

  • assisjpSkill

    file-pr

    Prepare and open or update an authorized pull request with a concise problem-first description and verifiable evidence. Use when the user asks to create, file, open, or update a PR. Do not use merely to review a diff or when publication is not authorized.

    Also in 13 projects that use this

  • shhacSkill

    full-send

    Complete an explicitly assigned task autonomously through parallel agents, peer-reviewed decisions, and automatic retries of temporary blockers. Use only when the user explicitly invokes Full Send.

    Also in 8 projects that use this

  • assisjpSkill

    takeover

    Take over an existing branch, pull request, worktree, or agent handoff while preserving the original goal, contributor credit, and concurrent work. Use when the user asks to take over, finish, rescue, or continue someone else's implementation. Do not use to replace a clear request to start new work.

    Also in 4 projects that use this

  • +1 more from scottwater

The file

Show its rules and text

We split this skill into the rules it gives an agent

24 rules. 0 are common, 15 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 54 edited versions we read keep these.

  • 15

    Distinctive

    This author's own choices. Worth a look.

  • 9

    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
  1. Very specific:

    CI fully green: All non-skipped workflow runs on the latest commit = success.

    line 14
  2. Distinctive:

    All review comments resolved: Every CodeRabbit / Copilot / human reviewer comment is either fixed in code or has a written reason for being …

    line 15
  3. Distinctive:

    If any of these is unmet, the PR is not done — keep working or surface a blocker.

    line 20
  4. Distinctive:

    Watch, don't poll: Use the Monitor tool with a persistent loop that emits only on *state change* (new run, new conclusion, new comment).

    line 36
  5. Very specific:

    Run /review (or invoke the review skill) on the latest commit.

    line 43
  6. Distinctive:

    Run the code quality pass (section below).

    line 45
  7. Distinctive:

    Only then report done.

    line 47
  8. Very specific:

    Before declaring done, read the diff yourself — gh pr diff <N> — and apply this checklist.

    line 51
  9. Distinctive:

    Dead code, stale comments, debug prints: Remove.

    line 58
  10. Distinctive:

    Comments: Remove WHAT-comments and PR-context comments ("added for ticket X").

    line 60
  11. Very specific:

    Commit fixes from this pass with messages like cleanup: remove unused FeatureFlag plumbing (YAGNI) so the human reviewer can see the …

    line 64
  12. Very specific:

    If remote has diverged because of an upstream rebase, git reset --hard origin/<branch> then cherry-pick your unpushed commits onto the new …

    line 86
  13. Distinctive:

    Verify git log before pushing.

    line 87
  14. Distinctive:

    Never git push --force without confirming the scope with the user.

    line 90
  15. Very specific:

    Commit message: <type>(<scope>): <what>.

    line 95
  16. Very specific:

    Always create new commits — never --amend on a pushed branch unless the user explicitly asks.

    line 96
  17. Distinctive:

    Don't push every tiny change.

    line 100
  18. Distinctive:

    All checks are green (done).

    line 106
  19. Distinctive:

    Don't report on:

    line 111
  20. Distinctive:

    Every run that turns green.

    line 112
  21. Distinctive:

    Don't merge the PR. Even if all checks pass, leave merging to the human.

    line 123
  22. Very specific:

    Don't force-push main/master or any branch the user didn't explicitly name.

    line 124
  23. Very specific:

    Don't touch .github/workflows/*.yml unless the user asked — CI-config changes are a category the human owns.

    line 125
  24. Distinctive:

    Don't reply inline to review comments.

    line 126

“Common” is measured: kept by at least 6 in 10 of the 54 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

babysit-pr

Stay on a pull request until it is actually done — not just green CI, but: every required check passing, every review comment resolved or consciously dismissed, /review (or equivalent) run and addressed, and the diff itself reviewed by you for code quality. The user hands you a PR number (or URL) and expects you to come back only when it's done or genuinely stuck.

Definition of done

A PR is only "done" when all of these are true. Do not declare done until you have explicitly verified each one.

  1. CI fully green. All non-skipped workflow runs on the latest commit = success.
  2. All review comments resolved. Every CodeRabbit / Copilot / human reviewer comment is either fixed in code or has a written reason for being dismissed.
  3. /review has been run on the latest commit and its findings addressed (or dismissed with reason).
  4. Code quality pass done by you. You read the diff with the lens below and either fixed issues or surfaced them to the user.
  5. Mergeable (mergeable: MERGEABLE, no conflicts with base).

If any of these is unmet, the PR is not done — keep working or surface a blocker.

Inputs you need

  • PR number (and repo, if not obviously the current one) — ask if ambiguous.
  • Authorization scope: can you push fixes directly, or only suggest them? Default to push low-risk fixes directly; escalate anything that touches public behavior, schemas, or security.

Core loop

  1. Snapshot state. gh pr view <N> --json headRefName,state,mergeable,reviewDecision and gh run list --branch <branch> --limit 20 --json .... Use gh run list — not just gh pr checks — because the latter deduplicates by name and can hide failing runs behind later passing ones (project rule).
  2. Classify each check:
    • success / skipped / neutral — leave alone.
    • in_progress / queued / pending — keep watching, don't act.
    • failure / cancelled / timed_out / action_required — pull logs, diagnose, fix.
  3. Pull review comments on every iteration: gh api repos/OWNER/REPO/pulls/N/comments and .../issues/N/comments. Track seen IDs so you only act on new ones.
  4. Act on what you find (see triage rules below).
  5. Watch, don't poll. Use the Monitor tool with a persistent loop that emits only on state change (new run, new conclusion, new comment). Never chain sleeps from the main thread. Pick a 45–90s poll cadence — faster wastes API quota, slower misses early-warning signal.
  6. Stop when terminal. Either: all five "definition of done" conditions met (report done), or repeated fixes fail to clear the same failure (stuck — report with what you tried).

When CI is green

Going green is not the finish line — it's when the real "done" check starts. Once everything is success:

  1. Run /review (or invoke the review skill) on the latest commit. Wait for results. Address findings.
  2. Re-pull review comments — sometimes CodeRabbit posts late, after CI finishes.
  3. Run the code quality pass (section below). Fix or surface.
  4. Re-check mergeable state — base may have moved.
  5. Only then report done.

Code quality pass (the YAGNI/DRY/blast-radius gate)

Before declaring done, read the diff yourself — gh pr diff <N> — and apply this checklist. Fix what you find directly (low-risk) or surface it (anything touching public behavior).

  • YAGNI. Any code added for a hypothetical future requirement? Any flag/abstraction/config knob with no current caller? Delete it.
  • DRY — but only where it earns its keep. Three near-identical blocks may still be fine. A premature abstraction with one caller is worse than the duplication it tries to remove. Flag genuine repetition; don't invent shared helpers for the sake of it.
  • Blast radius. What else does this touch? Shared utilities, exported types, DB schemas, public APIs, CI config — does the PR scope match the change's reach? If a "small fix" mutates a function with 40 callers, surface that.
  • Architecture fit. Does the change live in the right layer? Are concerns leaking (HTTP code in a domain module, SQL in a controller)? Is it consistent with how the surrounding code is organized?
  • Scope creep. Are there refactors, renames, or cleanups bundled in that aren't related to the stated purpose? Either split or call them out in the PR description.
  • Dead code, stale comments, debug prints. Remove.
  • Error handling at boundaries only. Trust internal calls; validate at user input / external APIs. Defensive code on every internal call is noise.
  • Comments. Remove WHAT-comments and PR-context comments ("added for ticket X"). Keep only WHY-comments where the reason is non-obvious.
  • Tests. Does the new behavior have a test? Was an existing test deleted or weakened to make the build pass? If yes, flag it.
  • Security smell. Any new user input not validated? Secrets in logs? SQL/HTML concatenation? Don't auto-fix — surface.

Commit fixes from this pass with messages like cleanup: remove unused FeatureFlag plumbing (YAGNI) so the human reviewer can see the rationale.

Triage rules for failures

Match in order; apply the first that fits.

SignalAction
Lint / format / typecheck failure with obvious fix in the logApply the fix locally, commit, push.
Flaky test (transient infra, network, OOM)Re-run once via gh run rerun <id> --failed. Don't re-run more than once per run — that hides real bugs.
Test failure that clearly maps to a change in this PRRead the test, diagnose, fix the code (not the test). If the test is wrong for a legitimate reason documented in the PR, fix the test — but call it out in the commit message.
CodeRabbit / reviewer comment that's valid and low-riskApply the fix. Commit with a message that references the comment and what you changed. Verify against current code first — don't apply blindly if the code already addresses it.
CodeRabbit / reviewer comment that's wrong, stale, or low-valueLeave it alone. Don't argue in-PR unless the user asks.
Failure you can't reproduce or understandStop and surface it. Include the run ID, the failing step, the last 30 relevant log lines, and what you think is happening. Don't guess-and-push.
Security-review / compliance workflow failureStop and surface. Never auto-fix.

Rebasing safely

The upstream branch may get rebased while you're working (common on shared PRs). When git push rejects:

  1. git fetch origin <branch>
  2. Compare local and remote histories.
  3. If remote has diverged because of an upstream rebase, git reset --hard origin/<branch> then cherry-pick your unpushed commits onto the new tip.
  4. Verify git log before pushing.
  5. Push again.

Never git push --force without confirming the scope with the user.

Commits

  • One concern per commit. Don't batch a typo fix and a logic change.
  • Commit message: <type>(<scope>): <what>. Body explains why and, where relevant, links the review comment or failing check.
  • Always create new commits — never --amend on a pushed branch unless the user explicitly asks.

Push cadence

  • Don't push every tiny change. Batch obviously related fixes into one push to avoid retriggering CI thrash.
  • But don't sit on a fix waiting for more — if a fix addresses a red check, get it out so CI can start moving.

When to surface to the user

Always report when:

  • All checks are green (done).
  • You got stuck (same failure recurring, or a fix you don't trust).
  • A new human reviewer (not a bot) posted a comment — their feedback often warrants human judgment.
  • The PR was closed or merged out from under you.

Don't report on:

  • Every run that turns green.
  • Routine "fix applied, pushed, CI rerunning" loops — those are the job.

Tooling

  • gh CLI for everything GitHub. Use gh api repos/OWNER/REPO/pulls/N -X PATCH to edit PR bodies (avoids the deprecated Projects warning from gh pr edit --body).
  • Monitor tool (persistent, stdout-line-per-event) for the watch loop. Filter must emit on every terminal state, not just success — silence on a crash looks identical to "still running."
  • For log fetching: gh run view <id> --log-failed for just the failing step; full log via gh run view <id> --log only when necessary (big output).

Non-goals

  • Don't merge the PR. Even if all checks pass, leave merging to the human.
  • Don't force-push main/master or any branch the user didn't explicitly name.
  • Don't touch .github/workflows/*.yml unless the user asked — CI-config changes are a category the human owns.
  • Don't reply inline to review comments. Commit-message references are how you acknowledge feedback.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.