PR Shepherd

Monitor GitHub pull requests and rebase until merge-ready.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/dimakis/mitzo --skill pr-shepherd-dimakis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: PR Shepherd
Source: https://github.com/dimakis/mitzo/tree/main/skills/pr-shepherd
Command: npx skills add https://github.com/dimakis/mitzo --skill pr-shepherd-dimakis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gh, git.

What problem does it solve?

This Skill resolves the most common reasons a pull request stalls—conflicts, failing CI, and unresolved review feedback—by taking a disciplined, repeatable approach to drive the PR toward merge readiness.

Core Features & Use Cases

  • PR conflict recovery via rebase: Detects when a PR is conflicting, rebases onto the base branch in the appropriate worktree, and pushes using --force-with-lease when safe.
  • CI health verification and targeted remediation: Checks whether CI is running; if failing, inspects failed logs and attempts fixes based on failure type (lint/format, type errors, test issues, or infrastructure flakiness).
  • Review comment triage with auto-fix where possible: Fetches review and comment threads, reads the referenced code context, fixes auto-fixable issues immediately, and escalates substantive feedback for user guidance.
  • Scheduled watch loop until merge-ready: Cycles every 5 minutes with status reporting, continuing until the PR is merged or the user stops it.

Quick Start

Tell the agent: “Shepherd PR 254 in mitzo#254 until it’s merge-ready, fixing conflicts and CI when possible.”

Frequently Asked Questions about PR Shepherd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate a pull request to merge by resolving conflicts and failing CI checks?

You can automate a pull request to merge by running a shepherding loop that checks mergeability, detects conflicts, performs safe rebases, inspects failing CI logs, and applies automated fixes until the PR is merge-ready.

Does the PR shepherding loop work with GitHub CLI to rebase and push force-with-lease?

Yes, the PR shepherding loop uses GitHub CLI and git commands to inspect PR metadata, perform safe rebases onto the base branch, and push using force-with-lease semantics when safe to resolve merge conflicts.

How do I fix unresolved GitHub review comments on a pull request automatically?

To fix unresolved GitHub review comments automatically, the shepherding loop fetches comment threads, reads the referenced code context, applies immediate fixes for auto-fixable issues, and escalates substantive feedback for user guidance.

What is a PR merge readiness check and how does it handle failing CI and merge conflicts?

A PR merge readiness check evaluates CI run status, review comment threads, and mergeability. It handles failing CI by inspecting logs for lint, type, or test errors, and handles conflicts by rebasing onto the base branch.

Can I schedule automated follow-up checks on a GitHub pull request until it merges?

Yes, you can schedule automated follow-up checks on a GitHub pull request using ScheduleWakeup, which cycles every 5 minutes to report status and verify merge readiness until the PR is merged or stopped.

Do I need GitHub CLI and git installed to run the PR shepherding automation?

Yes, you need GitHub CLI and git installed to run the PR shepherding automation, as it relies on these dependencies to inspect PR metadata, perform git rebases, and execute force-with-lease pushes.