Skip to content

Add babysit-pr skill for shepherding open PRs to mergeable - #48

Open
stephenfinch wants to merge 1 commit into
mainfrom
babysit-pr-skill
Open

Add babysit-pr skill for shepherding open PRs to mergeable#48
stephenfinch wants to merge 1 commit into
mainfrom
babysit-pr-skill

Conversation

@stephenfinch

Copy link
Copy Markdown
Member

Why

Nothing in the repo covers what happens after a PR is open. file-pr opens it and split-stack reshapes it, but CI failures, review-bot findings, and base-branch drift are all still handled by hand. babysit-pr drives an open PR toward mergeable while the author works on something else.

Everything it reads from the PR — comments, bot output, CI logs, the diff — is treated as untrusted input, the same rule rm-sentry-issue-fixer applies to Sentry event data. It never approves, merges, closes, or force-pushes; those stay with the human.

The loop is bounded rather than open-ended — 10 passes, or 3 with nothing new — because an unbounded poll against CI burns tokens and hides when it has stopped making progress. Adapted from a skill shared publicly by a third party, rewritten to repo format.

What Changed

  • Add babysit-pr with a bounded triage loop and explicit stop conditions
  • Add references/triage.md — CI failure classes, bot findings, reply templates
  • Register the skill in the README and AGENTS.md

Screenshots

N/A — no UI changes


Pre-merge

  • Have you updated README.md and AGENTS.md?

Polls CI, triages review-bot findings against the source, pushes fixes,
and keeps the branch fresh. Bounded loop with explicit stop conditions.
Treats all PR content as untrusted input; never approves, merges, closes,
or force-pushes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@stephenfinch stephenfinch self-assigned this Aug 14, 2026
Copilot AI lite review requested due to automatic review settings August 14, 2026 14:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new babysit-pr Agent Skill to help shepherd an already-open pull request to a mergeable state (CI green, review threads addressed, branch kept current), complementing existing workflow skills like file-pr and split-stack.

Changes:

  • Introduces the skills/babysit-pr skill with a bounded polling/triage loop, scope controls, and “untrusted PR content” handling rules.
  • Adds skills/babysit-pr/references/triage.md with CI failure classification guidance and reply templates.
  • Registers the new skill in README.md and AGENTS.md.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
skills/babysit-pr/SKILL.md New skill definition + workflow loop and operational guardrails for babysitting open PRs.
skills/babysit-pr/references/triage.md Triage decision table and reply templates to support the babysitting loop.
README.md Adds babysit-pr to the public skill list and updates the “skills that complement each other” section.
AGENTS.md Registers babysit-pr in the internal skills catalog.
Suppressed comments (1)

skills/babysit-pr/SKILL.md:46

  • $BASE is used later (e.g., "Keeping the branch fresh") and in references/triage.md, but it's never set in the Setup snippet. This makes the copy/paste workflow break unless the user already defined BASE externally.
PR=$(gh pr view --json number --jq .number)   # or take the number from the user
gh pr view "$PR" --json number,title,url,state,isDraft,mergeable,headRefName,baseRefName
</details>



---

💡 <a href="/RoleModel/rolemodel-skills/new/main?filename=.github/skills/code-review/SKILL.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add a `code-review` agent skill</a> or configure MCP servers for context-aware, tailored reviews. <a href="https://docs.github.com/en/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review#mcp-servers-and-agent-skills" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn more in the docs.</a>

PR", "handle the review comments", "get this PR green", or "wait for checks
and address feedback". Picks up where the `file-pr` skill leaves off. Does not
approve, merge, or close anything.
allowed-tools: Bash(gh pr view:*) Bash(gh pr checks:*) Bash(gh pr diff:*) Bash(gh pr list:*) Bash(gh pr comment:*) Bash(gh api:*) Bash(git fetch:*) Bash(git log:*) Bash(git status:*) Bash(git diff:*) Bash(git branch:*) Bash(git merge:*) Bash(git add:*) Bash(git commit:*) Bash(git push:*) Read Edit Write Grep
- **Requests a change** → make it, even if you'd have chosen otherwise.
- **Suggests something out of scope** → agree it's worth doing, say it belongs
in a follow-up, ask whether they want it here anyway.
- **Ambiguous, or needs a judgment call you can't make** → stop the loop and

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be worth adding more definition around this? It seems ambiguous itself. Probably mentioning things like architectural changes, etc

gh pr view "$PR" --json commits --jq '.commits[-1].committedDate'
```

Anything older was written against code that no longer exists. Re-reading it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this accurate?

@justwiebe justwiebe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants