一键导入
babysit-pr
// Use to monitor an open PR for AI/bot review comments, evaluate them critically, push fixes for real issues, and resolve threads — capped at a sensible duration so it self-terminates. Invoke as "babysit PR
// Use to monitor an open PR for AI/bot review comments, evaluate them critically, push fixes for real issues, and resolve threads — capped at a sensible duration so it self-terminates. Invoke as "babysit PR
Use when an extension change needs agentic verification in a real browser — content scripts, popup UI, network calls, fonts, console errors. Spawns the agent's own Chrome via the chrome-devtools-ext MCP. Complements (does not replace) human-eye verification via `pnpm dev:browser`.
Use when about to write or modify a Playwright e2e spec under `packages/danmaku-anywhere/e2e/`. Points at the canonical doctrine and surfaces the load-bearing rules so the spec doesn't get bounced in review.
Use when you need to load a specific published preview/nightly extension build into the agent's MCP browser by run-number, branch name, or tag. Faster than rebuilding locally when you only want to exercise an existing artifact.
Use when evaluating review comments from AI reviewers (gemini-code-assist, copilot-pull-request-reviewer) on a PR. Default to assuming the reviewer is right; verify before declining. Includes reporting in chat and resolving threads after handling.
Use when finishing a brainstorm, writing a design spec, or producing an implementation plan in this project. Directs the output to ClickUp as a doc on the DA-XXX task instead of saving to the repo or local disk.
| name | babysit-pr |
| description | Use to monitor an open PR for AI/bot review comments, evaluate them critically, push fixes for real issues, and resolve threads — capped at a sensible duration so it self-terminates. Invoke as "babysit PR |
Watch a PR for new review activity, evaluate each comment via the reviewing-ai-feedback skill (which owns the accept/decline judgment), push fixes when warranted, and stop on its own.
Default budget: 30 minutes / 6 iterations at 5-minute cadence. That covers one or two full AI-reviewer cycles after the initial push and the post-fix re-review. Beyond that, returns are sharply diminishing.
Extend (up to 60 min / 12 iterations) only if:
Shorten if the PR is trivial (≤30 LOC chore/doc): 15 min / 3 iterations is enough.
Never schedule beyond 60 min in a single sitting. If the PR is still churning after that, hand back to the human.
/loop 5m babysit PR #<N> per .claude/skills/babysit-pr/SKILL.md
The /loop skill creates a session-only cron (*/5 * * * *) and runs the first iteration immediately. Track iteration count in your own head — when you hit the budget, CronDelete the job and notify the human.
GraphQL snippets below use <OWNER>/<REPO> placeholders — resolve from gh repo view --json owner,name -q '.owner.login + "/" + .name' (or substitute literally from the current repo) before running.
scripts/pr-status.sh <N>
One GraphQL call returns: reviews, pending reviewers, open threads, reactions, check states. Read it carefully — state: PENDING on a reviewer means "still working", not "approved".
Evaluate via the reviewing-ai-feedback skill. It defines the accept/decline rules, false-positive patterns, accept-signals, reply style, and the in-chat reporting format. Default stance is "verify against the code; the reviewer is probably right." Decline only with a named rule. Resolve every thread you handle (accepted or declined).
gh api graphql -f query='{ repository(owner: "<OWNER>", name: "<REPO>") { pullRequest(number: N) { reviewThreads(first: 50) { nodes { id isResolved } } } } }'
gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "THREAD_ID"}) { thread { isResolved } } }'
After git push, the AI reviewers (gated by the ai-rereview label) re-run automatically. Wait one full iteration before re-evaluating — they need 2–4 min to land.
Stop the loop and notify the human as soon as all three hold:
state: PENDING, no unmatched eyes reaction from a bot that hasn't posted yetSUCCESS or NEUTRAL. If any is FAILURE, fix it first; don't stop while CI is redAlso stop (and notify) on:
To stop:
CronDelete <jobId>
Then send one message: PR URL, what was addressed, what was skipped (with one-line rationale each), what's still open if anything, and the final CI / reviewer state.
| Action | Command |
|---|---|
| One-shot status | scripts/pr-status.sh <N> |
| List threads + IDs | gh api graphql -f query='{ repository(owner: "<OWNER>", name: "<REPO>") { pullRequest(number: N) { reviewThreads(first: 50) { nodes { id isResolved comments(first: 5) { nodes { author { login } body } } } } } } }' |
| Reply on thread | gh api graphql -f query='mutation { addPullRequestReviewThreadReply(input: {pullRequestReviewThreadId: "ID", body: "..."}) { comment { id } } }' |
| Resolve thread | gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "ID"}) { thread { isResolved } } }' |
| Stop loop | CronDelete <jobId> |