What problem does it solve? Shepherding pull requests from "opened" to "merged and cleaned up" involves fragile manual steps: detecting merge conflicts that silently block CI, distinguishing real failures from GitHub platform degradation, navigating merge-queue vs direct-merge regimes, handling stacked PRs, and tearing down worktrees afterward. This Skill encodes those mechanics as deterministic scripts so nothing is merged past red checks, stale bases, or open lower stack layers. ## Core Features & Use Cases - Mergeable and stack gating: Detects CONFLICTING PRs before watching CI, probes stacked-PR membership, and refuses to merge a layer whose lower layers are still open. - Check polling and queue watching: Polls one or many PRs until checks are terminal, then watches merge-queue state with eject-aware disambiguation via RemovedFromMergeQueueEvent. - Stateless merge writer: merge-shepherd.sh advances one PR through gating, GraphQL enqueuePullRequest (or direct squash merge), staleness checks, and teardown as an idempotent, re-runnable step with distinct exit codes. - Platform degradation probe: Distinguishes a real CI failure from a GitHub outage by comparing workflow runs across heads and attributing against the status page, returning one of four verdicts that never gate a merge. - Use Case: After a batch of parallel sub-agents opens five PRs, run the poller to watch checks, let merge-shepherd.sh enqueue the green ones, and finish with teardown.sh to remove worktrees and reconcile the default branch. ## Quick Start Ask the agent to watch PR #123 in this repository and merge it once all checks are green, then clean up the worktree.