/toycrane-skills:babysit-prfrom toycrane-skills
Watches an open GitHub pull request through CI and review bots until it is ready to merge or needs human intervention. Fixes confirmed failures, resolves review threads, and reruns infrastructure flakes.
Ships in toycrane-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Take one open pull request and carry it to one of two end states, then stop.
Merging is outside this skill. The request to babysit authorizes commits that
answer the pull request's checks and findings, pushes of them to its branch,
replies and thread resolutions on it, and reruns of its checks. Rewrite
history only on this pull request's branch, with --force-with-lease against
the remote state just observed, when a rebase onto the base is needed.
Each pass starts from the pull request as it is now: its head, base, mergeability, required checks and their results on the current head, required reviews and which commit each reviewed, unresolved review threads, and new comments and reviews. Find what is required from branch protection or rulesets, not from which checks happen to run. Results and reviews of an earlier head do not count. Every unresolved review thread is open work, whenever it was posted.
A person's comment or review comes first, whenever it was posted: finish it, commit, push, and reply, before you open any bot thread. A person's request for changes ends the run as needs a person unless the request is clear and in scope, in which case answer it like a confirmed finding and leave its approval to that person.
Read a failing check's logs before acting. Separate a failure the repository caused from an infrastructure flake, such as a runner that lost its connection, a registry timeout, or a rate limit: rerun a flake and change no code for it. Fix a repository failure when the cause and the intended fix are clear from the change's purpose; otherwise end as needs a person with the failing step and log excerpt. When GitHub reports a conflict with the base, rebase onto the fetched base and resolve it when the intended result is clear from both sides, verify, and push with the lease above; otherwise end as needs a person with the conflicting files. Treat a check GitHub does not require as information: report it, and never wait for it.
Check each bot finding against the current source before acting on it. Fix it only when it describes a real bug on the path the change is meant to serve. Decline, with the reason, a finding about another path, a rare case, a small performance difference, or tests and defensive code the change did not intend, so answering review does not grow the pull request. Verify a fix the way the change was verified, commit it as a Conventional Commit, and push it.
Reply on every thread you act on. A fixed finding's reply says what changed
and where. A declined finding's reply gives the evidence: file:line, a test,
or command output. Resolve the thread only after its reply has posted. Wait
only for bots GitHub requires; when a required review bot has not reviewed
the current head, request it once in the way it accepts, such as a
@codex review comment for Codex.
Every comment posted on the user's behalf starts with a GitHub note block
saying an agent wrote it for them, using their GitHub login and no model
name. Write the login without @, so the note does not notify them on every
comment:
> [!NOTE]
> 🤖 에이전트가 <login> 대신 답함
Before posting, check the text for secrets, credentials, and personal data.
Between passes, wait with the bundled
scripts/pr-events.mjs. Run mark <pr> before the
first pass reads the state, so nothing posted during that pass is missed. Then
run wait <pr> in the background, or wherever the harness wakes you when a
command ends. It returns when a check completes, a commit lands, a review,
thread, or comment appears or changes, mergeability changes, or the pull
request closes, and records that state, so a restarted run or a new session
still sees events that arrived while nothing waited. Its exit codes:
| Code | Meaning | Next |
|---|---|---|
| 0 | changed, with the changes | run a pass |
| 10 | idle: 30 minutes since the last change | end as needs a person |
| 11 | retry: its --max-minutes ran out | run wait again |
| 3 | busy: another wait holds this PR | stop your own earlier wait, or leave the PR to the session that owns it |
Keep one wait per pull request. Your own pushes and replies wake the next wait; that pass finds nothing to do. When a pass has nothing to do, start the next wait without a message or comment: no progress reports, no "still waiting".
When the invoking skill says no person is present, ask the user anything through the harness's question tool, not as chat text. When no answer comes, end as needs a person with that question, and never merge. Without that signal, everything here applies as written.
End with the state, ready or needs a person, and the pull request URL; what was fixed, with commits; what was declined, with reasons; check reruns; and for needs a person, exactly what is waiting and on whom.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
28 skills in this plugin
/add-env-keyGet a key the user must issue or supply, such as an API key, token, or password, into the project's .env file without the value passing through chat or the model's context. Opens the vendor's issuance page, collects the value through the secret-env mod's input pane when the session has it, and otherwise opens the file in the user's editor with the key line ready. Use when work needs such a key that the project does not have yet, or when the user asks to add, set, or put an API key or token into .env./add-stack-contextAudit and establish current agent context for the technologies that define a project's stack. Use when setting up a project for agent work, after selecting or adding a framework, library, developer tool, or hosted service, or when entering an existing project whose agent context has not been audited./audit-evalsAudit a project's LLM eval regression suite from its committed cell history, report cells whose most recent 10 trials all passed, checks with identical recent histories, cells that flip after graduating, and cells that always fail, then propose demoting the recently always-passing cells to the lower tier and apply only the demotions the user approves. Use when the user asks which eval cells still earn their run, why a regression run costs so much, or to slim, prune, or demote a regression suite./babysit-specsRevise active `docs/specs/SLUG/` specs so they match what has shipped since they were written. Use when earlier work has landed and queued specs may now rest on stale assumptions, acceptance criteria, constraints, terms, or prototypes, or when implementation reports a spec as stale before changing source. Takes one or more spec folders, or every folder under `docs/specs/` when none is named. Do not use to shape a new spec from a problem and direction, which belongs to `shape-idea`, or to reconcile durable project context and retire shipped folders, which belongs to `maintain-project-context`./build-prototypeBuild a complete dummy-data HTML prototype or a temporary comparison of up to three alternatives for a specific user situation. Use to settle a screen-based product before implementation or resolve a visual or interaction decision during shaping or prototype review. Do not use for production implementation or CLI, terminal, or voice interfaces./clean-branchesClean up the local leftovers of finished work in one pass, removing worktrees and local branches whose pull request merged or closed, detached worktrees already contained in the base, and left-over worktree folders that lost their Git registration, while leaving open, uncommitted, session-attached, and Codex-managed work in place. Use when the user asks to clean up, prune, or tidy stale or piled-up branches or worktrees across a repository. merge hands this skill the one branch it just merged. Remote branches are never deleted.npx claudepluginhub toy-crane/skills --plugin toycrane-skills