pr-shepherd

pr-shepherd is a skill for Claude Code from Sassy-Dog/sassydog-skills. It costs 182 tokens per session (8,775 once invoked), scanned A, original, Apache-2.0.

A workflow for monitoring GitHub pull requests from opening through merging and cleanup. A pull request is a proposed change that must pass checks before it is merged.

In plain words
What is it for?
Use it to watch checks, retry transient GitHub errors, merge or queue approved pull requests, handle coupled or stacked pull requests, and clean up batch worktrees.
Why use it?
It keeps track of merge readiness, automated checks, temporary GitHub failures, merge queues, related pull requests, and worktrees without deciding which changes should merge.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the sassy-dog plugin — 21 skills, 10 agents shipped together

Good fit Use it to watch checks, retry transient GitHub errors, merge or queue approved pull requests, handle coupled or stacked pull requests, and clean up batch worktrees.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Sassy-Dog/sassydog-skills
Claude Code
/plugin install sassy-dog

Made for: Claude Code.

Or install sassy-dog, the plugin that ships this one along with the rest of its 21 skills, 10 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pr-shepherd

README.md
[![agentmods](https://agentmods.dev/badge/skills/sassy-dog/sassydog-skills/pr-shepherd/github.svg)](https://agentmods.dev/skills/sassy-dog/sassydog-skills/pr-shepherd)
Your own site
<a href="https://agentmods.dev/skills/sassy-dog/sassydog-skills/pr-shepherd"><img src="https://agentmods.dev/badge/skills/sassy-dog/sassydog-skills/pr-shepherd/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pr-shepherd

Your own site · 80×15
<a href="https://agentmods.dev/skills/sassy-dog/sassydog-skills/pr-shepherd"><img src="https://agentmods.dev/badge/skills/sassy-dog/sassydog-skills/pr-shepherd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 182 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,775 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00182 $0.08775
Opus 5 $0.00091 $0.04387
Sonnet 5 $0.00036 $0.01755
Haiku 4.5 $0.00018 $0.00877

Measured 7d ago against content hash 1d73b4c2f0d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

pr-shepherd scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 8 executable files (scripts/gh-retry.sh, scripts/merge-shepherd.sh, scripts/poll-prs.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

So “the poller went quiet” is evidence for rows 1 and 4 only; for rows 2 and 3 the poller reports *pending*. **The row that matters for a merge is not the row the poller disagrees about most loudly.** `merge-shepherd.sh`
skills/pr-shepherd/SKILL.md · 212 lines

How it starts

The opening of the file, as written. The whole thing — 212 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PR Shepherd

PR lifecycle mechanics from "PR opened" to "merged and cleaned up": verify mergeable, watch checks, retry transient GitHub failures, merge (or enqueue) greens, serialize coupled PRs, tear down batch worktrees. Works in any GitHub repo; project workflow skills delegate here so the mechanics live in one place.

This skill does NOT decide what to merge — the caller (user or project skill) owns that. It also never auto-rebases a CONFLICTING PR; conflicts are surfaced for a human decision.

Inputs to establish first

From the caller's request (ask if missing and not inferable):

  1. Repoowner/name, or infer from cwd.
  2. PR number(s) — what to shepherd.
  3. Merge policy — merge queue or direct merge. Project skills state this explicitly; otherwise detect (see references/merge-queue.md) and confirm a guess rather than acting on it.
  4. Coupled-PR concerns — does the batch touch migrations / codegen / other derived artifacts? (See references/serialization.md.)
  5. Teardown scope — worktree paths from a batch manifest, if the caller ran parallel sub-agents.
  6. Stacked PRs — is any PR a layer of a stack? Detected automatically by scripts/stack-probe.sh, never asked. (See references/stacked-prs.md.)

Workflow

1. Mergeable check — always first

CONFLICTING silently blocks CI from firing ("no checks reported" looks identical to "CI hasn't started"). Check before any watch loop:

gh pr view "$PR" --repo "$REPO" --json mergeable,mergeStateStatus --jq '"\(.mergeable) \(.mergeStateStatus)"'

For more than one PR — or a "where does everything stand" probe — prefer the scripted snapshot over hand-rolled --jq variants; it reuses the poller's type-aware pending predicate and prints the same table + JSON as a watch tick:

REPO="$REPO" bash ${CLAUDE_PLUGIN_ROOT}/skills/pr-shepherd/scripts/poll-prs.sh --once "$PR"   # zero PR args = every open PR

Surface CONFLICTING immediately — do not auto-rebase. For generated-file conflicts, point the caller at the regenerate-don't-hand-merge recipe in references/serialization.md.

Read the full file on GitHub · 212 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago Changed 1d73b4c2f0d4
  2. 8d ago Changed c7aab95802fd
  3. 11d ago First seen · 212 lines · 182 tokens per session scan A fd82110b522f

Subscribe to this mod's changes

pr-shepherd is a skill published in the GitHub repository Sassy-Dog/sassydog-skills (0 stars, last pushed 3d ago), licensed Apache-2.0. It adds 182 tokens to every session and 8,775 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

commit

Git commit workflow with precommit hook handling, lint/type checking, README updates, and API reference updates. Use when the user wants to commit changes. Handles precommit hooks that modify files (formatting, linting) by re-staging and retrying. Runs ruff lint and pyright type checks on staged Python files, and…

ReflexioAI/claude-smart · 122 tokens

update-pr

Update an existing pull request with new changes. Use when the user wants to update a PR, push follow-up changes to a PR, refresh a PR description, or sync a PR with latest commits. Triggers on: update pr, update-pr, update the pr, push to pr, refresh pr, sync pr, update pull request.

ReflexioAI/claude-smart · 71 tokens

codex-setup

Initialize sd0x-dev-flow infrastructure for Codex CLI and other non-Claude agents. Generates AGENTS.md, installs the commit-msg hook, copies runner scripts. The pre-push gate is opt-in via --with-push-gate. Use when setting up a new project or after updating skills.

sd0xdev/sd0x-harness · 65 tokens

smart-rebase

Smart partial rebase for squash-merge repositories. Auto-detect which commits to keep/drop when base branch was squash-merged into target. Use when: user says 'rebase', 'partial rebase', 'base already merged', 'smart rebase', or /smart-rebase. Not for: simple git rebase (the developer runs it — Claude never executes…

sd0xdev/sd0x-harness · 131 tokens

next-step

Change-aware next step advisor. Use when: user asks what to do next, workflow progression is unclear, session just started with dirty worktree. Not for: executing the suggested command (user decides), auto-loop decisions (hooks handle that). Output: findings-based suggestions or session summary with commit seed.

sd0xdev/sd0x-harness · 63 tokens

merge-prep

Pre-merge analysis and preparation. Analyzes source branch vs target branch: commit stats, conflict detection, file impact. Analysis-only v1 — outputs report + suggested commands, does not auto-merge. Use when: user says 'merge prep', 'pre-merge', 'merge analysis', or /merge-prep.

sd0xdev/sd0x-harness · 69 tokens