Borrowing it
Nothing to install: this file belongs to dsifry/metaswarm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/dsifry/metaswarm/main/.claude/commands/pr-shepherd.mdgit clone --depth 1 https://github.com/dsifry/metaswarmWrote 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.
[](https://agentmods.dev/commands/dsifry/metaswarm/pr-shepherd)<a href="https://agentmods.dev/commands/dsifry/metaswarm/pr-shepherd"><img src="https://agentmods.dev/badge/commands/dsifry/metaswarm/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.
<a href="https://agentmods.dev/commands/dsifry/metaswarm/pr-shepherd"><img src="https://agentmods.dev/badge/commands/dsifry/metaswarm/pr-shepherd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00016 | $0.00659 |
| Opus 5.5 | $0.00006 | $0.00264 |
| Sonnet 5.5 | $0.00003 | $0.00132 |
| Haiku 4.5 | $0.00002 | $0.00066 |
Grade A, and why
pr-shepherd scanned grade A with 0 findings 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 4d ago.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PR Shepherd
Monitor a PR from creation through merge, handling CI failures, review comments, and thread resolution automatically.
Usage
/pr-shepherd [pr-number]
If no PR number is provided, uses the PR associated with the current branch.
What This Does
- Monitors CI/CD - Polls every 60 seconds for status changes
- Monitors Reviews - Watches for new comments and unresolved threads
- Auto-fixes simple issues - Lint, prettier, type errors
- Asks before complex fixes - Presents a decision request for approval: lettered options (A, B, C) under numbered questions (reply
1 A 2 C), each with its pros and cons, the recommended option marked, and why it is recommended (see Decision requests in the metaswarm plugin'sguides/delivery-scope.md) - Handles review comments - Delegates to
handling-pr-commentsskill - Checkpoints at 4 hours - Asks if you want to continue or handoff
Steps
-
Get PR information:
PR_NUMBER=${1:-$(gh pr view --json number -q .number 2>/dev/null)} if [ -z "$PR_NUMBER" ]; then echo "No PR found. Provide PR number: /pr-shepherd 123" exit 1 fi -
Activate the pr-shepherd skill: Load and follow the pr-shepherd skill definition.
-
Begin monitoring loop (background, every 60s):
- Check CI status
- Check for new review comments
- Check unresolved thread count
- Take action based on state machine
-
Handle issues as they arise:
- Simple CI failures -> auto-fix with TDD
- Complex failures -> present a decision request (lettered options, pros/cons, recommended and why; Decision requests in
guides/delivery-scope.md); only the blocked failure waits for approval, and monitoring and review-comment handling continue meanwhile - New comments -> invoke
handling-pr-commentsskill
-
Exit when done:
- All CI green AND all threads resolved -> report success
- 4-hour timeout -> checkpoint with user
Example
/pr-shepherd 695
> I'm using the pr-shepherd skill to monitor PR #695 through to merge.
> I'll watch CI/CD, handle review comments, and fix issues as they arise.
>
> Current status:
> - CI: Running (2/5 checks complete)
> - Threads: 0 unresolved
>
> Monitoring... (will check every 60 seconds)
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.
- 4d ago Changed 00c3bda84526
- 3mo ago First seen · 77 lines · 16 tokens per session scan A 374a47d14fae
pr-shepherd is a command published in the GitHub repository dsifry/metaswarm (442 stars, last pushed yesterday), licensed MIT. It adds 16 tokens to every session and 659 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
pr-shepherd compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| pr-shepherddsifry/metaswarm | Command | 442 | yesterday | MIT | A | 16 | Claude Code |
| merge-conflict-analysisrjmurillo/ai-agents | Command | 50 | today | Apache-2.0 | A | 0 | GitHub Copilot |
| release-notesOpenHands/extensions | Command | 190 | today | MIT | A | 44 | Claude Code |
| commitechoVic/blade-code | Command | 181 | 16d ago | MIT | A | 8 | Claude Code |
| repo-audittractorjuice/arc-kit | Command | 2.3k | yesterday | none | A | 29 | Claude Code |
| codex-reviewoalders/kitchen-sink | Command | 5 | today | MIT | A | 41 | Claude Code |
| releaseparuff/uFawkesAI | Command | 2 | yesterday | MIT | A | 39 | Claude Code |