Install
$ agentstack add skill-aryansharma28-skills-aryan-babysit-pr ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
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.
- CI fully green. All non-skipped workflow runs on the latest commit =
success. - All review comments resolved. Every CodeRabbit / Copilot / human reviewer comment is either fixed in code or has a written reason for being dismissed.
/reviewhas been run on the latest commit and its findings addressed (or dismissed with reason).- Code quality pass done by you. You read the diff with the lens below and either fixed issues or surfaced them to the user.
- 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
- Snapshot state.
gh pr view --json headRefName,state,mergeable,reviewDecisionandgh run list --branch --limit 20 --json .... Usegh run list— not justgh pr checks— because the latter deduplicates by name and can hide failing runs behind later passing ones (project rule). - 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.
- Pull review comments on every iteration:
gh api repos/OWNER/REPO/pulls/N/commentsand.../issues/N/comments. Track seen IDs so you only act on new ones. - Act on what you find (see triage rules below).
- 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.
- 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:
- Run
/review(or invoke the review skill) on the latest commit. Wait for results. Address findings. - Re-pull review comments — sometimes CodeRabbit posts late, after CI finishes.
- Run the code quality pass (section below). Fix or surface.
- Re-check mergeable state — base may have moved.
- Only then report done.
Code quality pass (the YAGNI/DRY/blast-radius gate)
Before declaring done, read the diff yourself — gh pr diff — 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.
| Signal | Action | |---|---| | Lint / format / typecheck failure with obvious fix in the log | Apply the fix locally, commit, push. | | Flaky test (transient infra, network, OOM) | Re-run once via gh run rerun --failed. Don't re-run more than once per run — that hides real bugs. | | Test failure that clearly maps to a change in this PR | Read 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-risk | Apply 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-value | Leave it alone. Don't argue in-PR unless the user asks. | | Failure you can't reproduce or understand | Stop 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 failure | Stop 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:
git fetch origin- Compare local and remote histories.
- If remote has diverged because of an upstream rebase,
git reset --hard origin/then cherry-pick your unpushed commits onto the new tip. - Verify
git logbefore pushing. - 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:
():. Body explains why and, where relevant, links the review comment or failing check. - Always create new commits — never
--amendon 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
ghCLI for everything GitHub. Usegh api repos/OWNER/REPO/pulls/N -X PATCHto edit PR bodies (avoids the deprecated Projects warning fromgh 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 --log-failedfor just the failing step; full log viagh run view --logonly when necessary (big output).
Non-goals
- Don't merge the PR. Even if all checks pass, leave merging to the human.
- Don't
force-pushmain/master or any branch the user didn't explicitly name. - Don't touch
.github/workflows/*.ymlunless 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.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Aryansharma28
- Source: Aryansharma28/skills-aryan
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.