Shepherd

Shepherd reviews every PR in GitHub Actions and posts one review per push, with a verdict and one inline comment per finding. The model reads the code and holds no token; shepherd's own process posts the review and sets the shepherd commit status. A person approves and merges.
On your own machine, Shepherd's skills in your coding agent review your change before you open a PR, fix findings and repair CI under your team's policy. They leave human decisions for you.
Set it up
In your repository, with Bun and an authenticated GitHub CLI, and a model key in your environment (OPENCODE_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY or OPENROUTER_API_KEY):
bunx @jagreehal/shepherd init
That picks the model from your key, writes .github/workflows/shepherd.yml and .shepherd/config.yml, and sets the key as an Actions secret. Commit the files, merge, and every PR gets a review and a verdict. Pick the model yourself with --model provider/model (opencode-go/…, anthropic/…, openai/…, openrouter/…, amazon-bedrock/…).
Once merged, shepherd doctor checks the setup. On any PR:
shepherd review 42 # comments /review, which reviews the head again in GitHub Actions
shepherd status 42 # the review, the shepherd status, CI and open threads, and what to do next
To run it from your coding agent instead, shepherd install, then /shepherd 42 on a PR, or /shepherd --local before you open one.
Customize it
Your team's rules live in .shepherd/config.yml and the lenses it names. Shepherd reads them from the default branch, so a change takes effect once you merge it.
| I want to… | Edit |
|---|
| Add my team's review rules | .shepherd/lenses/<name>/SKILL.md, made by shepherd lens new <name> |
| Run those rules only on some directories | The lens's applies_to in .shepherd/config.yml |
| Choose what the local skills may change | fixes.mode in .shepherd/config.yml |
| Keep fixes out of code a person must own | escalate.paths in .shepherd/config.yml |
| Stop the review approving changes to some files | A deny category under review: in .shepherd/config.yml |
| Share all of this across repositories | A pack, named under extends |
The top of config.yml decides what Shepherd reviews and fixes; review: decides what the review approves. Customize Shepherd for your team walks through one rule from checklist to enforced, and how to check it before you merge:
shepherd config validate # config.yml and its lenses
shepherd gate config --policy-dir .shepherd # the review: section
shepherd preview --working-tree # the plan for your current change
Read more
Choose what the local agent may change
fixes.mode governs the skills you run in your coding agent. The review in GitHub Actions changes no code.
| Mode | Result |
|---|
suggest | Findings posted; no code edits |
local | Fixes left in your working tree; you commit and push |
push | Fixes committed and pushed under the skill rules |
/shepherd --local provides a pre-PR review-and-fix path with no GitHub writes. A completed local review does not establish merge readiness: the shepherd status does, once the review approves the current head and no thread a person wrote in is open.
Go further
None of this is needed for a first run.