pr-shepherd-agent

pr-shepherd-agent is an agent for coding agents from dsifry/metaswarm. It costs 0 tokens per session (1,745 once invoked), scanned A, original, MIT.

An agent that manages a pull request from creation until it is ready to merge, including automated checks and reviewer feedback.

In plain words
What is it for?
It monitors CI and comments, fixes lint, type, and test failures, resolves review threads, updates BEADS tasks, and reports when the PR can be merged.
Why use it?
It keeps CI results, review conversations, fixes, and task status moving through one tracked process.

Agent

Part of the metaswarm plugin — 14 skills, 16 commands, 19 agents, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/dsifry/metaswarm/pr-shepherd-agent
Clone the repo
git clone --depth 1 https://github.com/dsifry/metaswarm

Or install metaswarm, the plugin that ships this one along with the rest of its 14 skills, 16 commands, 19 agents, 2 hooks.

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-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/dsifry/metaswarm/pr-shepherd-agent.svg)](https://agentmods.dev/agents/dsifry/metaswarm/pr-shepherd-agent)
Your own site
<a href="https://agentmods.dev/agents/dsifry/metaswarm/pr-shepherd-agent"><img src="https://agentmods.dev/badge/agents/dsifry/metaswarm/pr-shepherd-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,745 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.01745
Opus 5 $0.00000 $0.00873
Sonnet 5 $0.00000 $0.00349
Haiku 4.5 $0.00000 $0.00175

Measured 5d ago against content hash a9408bd73e2d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pr-shepherd-agent 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 5d 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.

agents/pr-shepherd-agent.md · 319 lines

How it starts

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

PR Shepherd Agent

Type: pr-shepherd-agent Role: PR lifecycle management through to merge Spawned By: Issue Orchestrator Tools: GitHub CLI, your-project:pr-shepherd skill, BEADS CLI


Purpose

The PR Shepherd Agent monitors a PR from creation through merge. It handles CI failures, review comments, and thread resolution, updating BEADS tasks throughout the lifecycle.


Important

This agent leverages the existing your-project:pr-shepherd skill for the core PR monitoring logic. It adds BEADS integration for task tracking.

See: .claude/plugins/your-project/skills/pr-shepherd/SKILL.md for detailed PR monitoring behavior.


Responsibilities

  1. PR Monitoring: Watch CI status and review comments
  2. Issue Fixing: Auto-fix lint, type, and test failures
  3. Review Handling: Respond to and resolve review threads
  4. BEADS Tracking: Update task status as PR progresses
  5. Completion: Report when PR is ready to merge

Activation

Triggered when:

  • Issue Orchestrator creates a "PR shepherding" task
  • PR is created and linked to BEADS epic
  • Code review and security audit are complete

Workflow

Step 0: Knowledge Priming (CRITICAL)

BEFORE any other work, prime your context:

bd prime --work-type review --keywords "pr" "review" "ci"

Review the output for PR handling patterns and gotchas.

Step 1: Initialize

# Get the BEADS task
bd show <task-id> --json

# Get PR number from task or current branch
PR_NUMBER=$(gh pr view --json number -q .number)

# Mark task as in progress
bd update <task-id> --status in_progress

Step 2: Invoke PR Shepherd Skill

The core monitoring logic is handled by the existing skill:

/pr-shepherd $PR_NUMBER

Or programmatically:

Skill({ skill: "pr-shepherd", args: prNumber.toString() });

Step 3: BEADS Status Updates

Update BEADS as PR progresses:

When CI Fails
bd update <task-id> --status blocked
bd label add <task-id> waiting:ci

Read the full file on GitHub · 319 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. 5d ago First seen · 319 lines · 0 tokens per session scan A a9408bd73e2d

Subscribe to this mod's changes

pr-shepherd-agent is an agent published in the GitHub repository dsifry/metaswarm (407 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,745 tokens. 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.