pr-shepherd
Skill18 starsChanged 7 months agoMITView on GitHub
Analyze and fix failing GitHub PRs. Check .branchdeck/analysis.json to determine current state. If no analysis exists, analyze the PR. If analysis is approved, execute the fix plan.
- Commits and pushes
We split this skill into the rules it gives an agent
17 rules. 0 are common, 7 are distinctive, and 10 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Read .branchdeck/pr-context.json for the PR you're working on:
- Very specific: line 21
Use these values in all gh commands below.
- Very specific: line 25
Check if .branchdeck/analysis.json exists in the current worktree.
- Very specific: line 29
Read PR status: gh pr checks <number> --repo <repo>
- Very specific: line 30
Read review comments: gh pr view <number> --repo <repo> --comments
- Very specific: line 31
Read inline review comments: gh api repos/<owner>/<repo>/pulls/<number>/comments
- Distinctive: line 32
Search codebase for relevant patterns
- Distinctive: line 33
Check recent git history: git log --oneline -20
- Distinctive: line 36
MEDIUM: test logic, small refactor, dependency version bump
- Very specific: line 38
Write .branchdeck/analysis.json with your findings:
- Very specific: line 76
Read approved_plan from .branchdeck/analysis.json (the human may have edited the plan)
- Distinctive: line 79
Follow the project's code standards (see CLAUDE.md)
- Distinctive: line 80
Run the project's check suite (see CLAUDE.md for commands)
- Distinctive: line 88
If CI still fails, analyze the new failure and fix it (up to 3 attempts)
- Very specific: line 89
When done, update analysis.json: set resolved: true
- Distinctive: line 93
Do nothing. End your session.
- Very specific: line 97
If gh commands fail with 403/404, verify authentication: gh auth status
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PR Shepherd Workflow
You are shepherding a GitHub PR to get it ready to merge.
Get PR context
Read .branchdeck/pr-context.json for the PR you're working on:
repo: the GitHub repo (e.g., "owner/repo")number: the PR numberbranch: the PR branch namebase_branch: the target branch (e.g., "main")
Use these values in all gh commands below.
Determine your phase
Check if .branchdeck/analysis.json exists in the current worktree.
If it does NOT exist → Analyze
- Read PR status:
gh pr checks <number> --repo <repo> - Read review comments:
gh pr view <number> --repo <repo> --comments - Read inline review comments:
gh api repos/<owner>/<repo>/pulls/<number>/comments - Search codebase for relevant patterns
- Check recent git history:
git log --oneline -20 - Classify confidence:
- HIGH: lint/format, unused imports, single-file assertion, known pattern
- MEDIUM: test logic, small refactor, dependency version bump
- LOW: architecture, multi-file rewrite, security, unknown pattern
- Write
.branchdeck/analysis.jsonwith your findings:{ "pr": { "repo": "<repo>", "number": <number>, "branch": "<branch>" }, "confidence": "HIGH|MEDIUM|LOW", "failures": [ { "check_name": "<CI check name>", "error_summary": "<one-line summary>", "root_cause": "<what actually went wrong>", "fix_approach": "<how to fix it>" } ], "reviews": [ { "reviewer": "<username>", "comment": "<review comment>", "proposed_response": "<how you'd address it>" } ], "plan_steps": [ { "description": "<what to do>", "file": "<file path>", "change_type": "modify|create|delete" } ], "affected_files": ["<file1>", "<file2>"], "reasoning": "<brief explanation of your analysis>", "approved": false, "approved_plan": null, "resolved": false } - End your session. A human will review your analysis.
If it exists with approved: true → Fix
- Read
approved_planfrom.branchdeck/analysis.json(the human may have edited the plan) - Execute each plan step in order
- Follow the project's code standards (see CLAUDE.md)
- Run the project's check suite (see CLAUDE.md for commands)
- Stage, commit, push:
git add <affected files> git commit -m "fix: <concise summary>" git push - Verify CI:
gh pr checks <number> --repo <repo> --watch - If CI still fails, analyze the new failure and fix it (up to 3 attempts)
- When done, update analysis.json: set
resolved: true
If it exists with approved: false → Wait
Do nothing. End your session. The human hasn't reviewed yet.
Troubleshooting
If gh commands fail with 403/404, verify authentication: gh auth status
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- vercel/eve★ 5.8ksame name
- github/lever★ 241same name
- sledtools/pika★ 45same name
- malinskibeniamin/skills★ 4same name
- ankraio/agent-tools★ 1same name
- Sassy-Dog/skills★ 1same name
- tjespers/claude-skills★ 1same name
- krosdai/skills★ 0same name
- xdanger/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use skill-creator.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SentrySkillskill-creator
Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, writing, registration, and verification.
Also in 3 projects that use this
In this repository74 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- src/CLAUDE.mdCLAUDE.md
- bmad-advanced-elicitationSkill
- bmad-agent-analystSkill
- bmad-agent-architectSkill
- bmad-agent-builderSkill
- bmad-agent-devSkill
- bmad-agent-pmSkill
- bmad-agent-qaSkill
- bmad-agent-quick-flow-solo-devSkill
- bmad-agent-smSkill
- bmad-agent-tech-writerSkill
- bmad-agent-ux-designerSkill
- bmad-brainstormingSkill
- bmad-builder-setupSkill
- bmad-check-implementation-readinessSkill
- bmad-code-reviewSkill
- bmad-correct-courseSkill
- bmad-create-architectureSkill
- bmad-create-epics-and-storiesSkill
- bmad-create-prdSkill
- bmad-create-storySkill
- bmad-create-ux-designSkill
- bmad-dev-storySkill
- bmad-distillatorSkill
- bmad-document-projectSkill
- bmad-domain-researchSkill
- bmad-editorial-review-proseSkill
- bmad-editorial-review-structureSkill
- bmad-edit-prdSkill
- bmad-generate-project-contextSkill
- bmad-helpSkill
- bmad-index-docsSkill
- bmad-initSkill
- bmad-market-researchSkill
- bmad-party-modeSkill
- bmad-product-briefSkill
- bmad-qa-generate-e2e-testsSkill
- bmad-quick-devSkill
- bmad-retrospectiveSkill
- bmad-review-adversarial-generalSkill
- bmad-review-edge-case-hunterSkill
- bmad-shard-docSkill
- bmad-sprint-planningSkill
- bmad-sprint-statusSkill
- bmad-story-cycleSkill
- bmad-teach-me-testingSkill
- bmad-teaSkill
- bmad-technical-researchSkill
- bmad-testarch-atddSkill
- bmad-testarch-automateSkill
- bmad-testarch-ciSkill
- bmad-testarch-frameworkSkill
- bmad-testarch-nfrSkill
- bmad-testarch-test-designSkill
- bmad-testarch-test-reviewSkill
- bmad-testarch-traceSkill
- bmad-validate-prdSkill
- bmad-workflow-builderSkill
- sat-generateSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

