Debugging et maintenancesource GitHub
PR shepherd
/pr-shepherdSurveillez un PR de sa création à sa fusion, en gérant automatiquement les échecs de l'IC, les commentaires de révision et la résolution des problèmes
// contenu du skill
description: Monitor a PR through to merge - handles CI failures, reviews, and thread resolution
PR Shepherd
Monitor a PR from creation through merge, handling CI failures, review comments, and thread resolution automatically.
Usage
text
/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 options with pros/cons for approval
- Handles review comments - Delegates to
handling-pr-commentsskill - Checkpoints at 4 hours - Asks if you want to continue or handoff
Steps
- Get PR information:
bash
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 options, wait for approval
- 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
text
/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)Notes
- The agent stays active until the PR is ready to merge or you stop it
- All code changes use TDD process
- Complex issues always get user approval before fixing
- Uses
handling-pr-commentsskill for review comment handling
// source originale publique
dsifry/metaswarm/.claude/commands/pr-shepherd.md
Licence : MIT License
Projet indépendant, non affilié à Anthropic. Ce skill reste la propriété de son auteur original.