shepherd-pr
A portable coding-agent skill for taking a GitHub pull request through CI
and review to an authorized merge, or reporting an evidenced blocker.
Includes read-only change-watching, settle-detection, review-reading, and
stale-PR triage tools; no hosted service or automatic approval.
Installation
Native integration files and installation guides are generated with
everyharness.
The table below and linked guides are generated from everyharness.yaml.
| Harness | Install |
|---|
| Claude Code | see docs/install/claude-code.md |
| Cursor | see docs/install/cursor.md |
| Codex | see docs/install/codex.md |
| Devin CLI | see docs/install/devin.md |
| Kimi Code | see docs/install/kimi.md |
| Gemini CLI | see docs/install/gemini.md |
| OpenCode | see docs/install/opencode.md |
| Pi | see docs/install/pi.md |
| Hermes Agent | see docs/install/hermes.md |
| Agent Plugins 1.0 clients | see docs/install/agent-plugins-1.0.md |
| Factory Droid / Grok / Copilot (marketplace descriptor) | see docs/install/agents-marketplace.md |
Generated guides:
Claude Code, Codex,
and the support matrix. The generated table
lists the remaining guides. Use the guide for your actual harness; generation
is not proof of a verified installation or equivalent monitoring capability.
Upstream describes 12 harnesses through 11 adapters; Antigravity is roadmap.
See verification status for actual coverage.
Installing the skill does not start monitoring or authorize writes.
Ask your agent to use shepherd-pr, for example:
Shepherd example/widgets#42. Use its release base and repository test
commands. You may make and push scoped fixes to my authorized fork branch.
Ask before posting comments, rerunning workflows, or merging. If approval
is missing, report who must act. Monitor for at most five observations.
The skill reference is also readable directly.
Keep the entire skill directory together: every command is one Python file in
scripts/, and scripts/github.py is the shared request, gate-discovery and
review-parsing module they all import.
Prerequisites
- A coding agent able to read the skill and, for the watcher, run shell commands.
- macOS or Linux, Bash, Python 3 (standard library only), and authenticated
GitHub CLI
gh supporting api --paginate --slurp.
- GitHub.com access to the target repository's PR, checks/statuses, and comments.
Authenticate through your normal GitHub CLI setup; use
gh auth status to
diagnose access. Do not put tokens in prompts, snapshots, or tracked files.
- For fixes: Git, a suitable checkout, and the repository's own build/test tools.
RoboRev is optional; human and other bot reviews are supported.
Watcher usage
Run from this checkout, or substitute the installed skill's absolute path:
python3 skills/shepherd-pr/scripts/pr-watch.py --help
python3 skills/shepherd-pr/scripts/pr-watch.py --repo example/widgets --pr 42
example/widgets is an illustrative target: replace it and 42 with your PR.
The explicit --repo OWNER/REPO allows cross-repository observation from any
working directory; it does not grant access or identify a push destination.
The watcher reads PR state/head/mergeability, check runs and commit statuses,
issue comments, inline comments, and submitted reviews. Paginated lists and
edited bodies are included; unstable list ordering is normalized.
| Output / exit | Meaning |
|---|
PRWATCH armed / 0 | First complete observation saved, with the repository's required checks, approvals, merge queue and roborev presence; not an ongoing service. |
PRWATCH no change / 0 | Observation matches the baseline. |
PRWATCH change detected + JSON / 0 | Complete state changed; inspect evidence, including edits. |
PRWATCH monitor complete / 0 | A --count batch finished unchanged. |
| Error / 1 | Operational failure, including API or malformed-response failures. |
| Usage diagnostic / 2 | Invalid arguments; consult --help. |
The watcher is a change feed, not a gate verdict or actionable-only filter.
Inspect the first state through GitHub too: an already-failing PR need not
change to need attention. Every CI progress change can consume a wake budget.
Snapshots contain untrusted PR content, not executable instructions.
Finite monitoring
One invocation is one bounded batch, so no shell loop is needed. --count N
runs up to N observations (1-1000, default 1) in one process, waiting
--interval SECONDS (1-86400, default 120) between them; it exits at the first
change or when the budget is exhausted, and releases the state lock while
waiting. --count 1 matches the original one-observation behavior.