divecode-pr-watch
Monitor PR status and automate merging or feedback loops based on live results.
Install
mkdir -p .claude/skills/divecode-pr-watch && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11816" && unzip -o skill.zip -d .claude/skills/divecode-pr-watch && rm skill.zipInstalls to .claude/skills/divecode-pr-watch
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Watch a PR — auto-respond to comments and CI failures. Uses bin/divecode-pr-watch which polls via gh and emits a routing decision (status + route). 6-status / 7-route routing per agent-flow: green→merge, has_comments→fix-loop, ci_failed→fix-loop, pending→block, closed→block, merged→cleanup, error→block. Use after /divecode-push-pr, before /divecode-merge.Key capabilities
- →Fetch the live status of a Pull Request
- →Decide the next route based on PR status
- →Invoke `/divecode-merge` for `green` status
- →Invoke `/divecode-fix-loop` for `has_comments` or `ci_failed`
- →Suggest re-invocation for `pending` status
- →Record each poll/action in `pr-watch.md`
How it works
The skill fetches the live status of a Pull Request, uses a deterministic routing table to decide the next action, and records the process.
Inputs & outputs
When to use divecode-pr-watch
- →Watch a pull request status
- →Auto-respond to CI failures
- →Automate PR merging
About this skill
divecode-pr-watch — status-driven routing
You are running divecode-pr-watch. Read the PR's live status, decide the next route per agent-flow's 6-status contract.
Iron Laws
- Status is computed, not assumed. Always actually fetch the PR.
- One status → one route. No "maybe try X then Y" — the routing table is deterministic.
- Block ≠ fail. Pending CI is not a failure; just don't merge yet.
- Closed (not merged) requires user input. Never auto-cleanup a closed-without-merge PR.
Preamble
PROJ_DIR="${DIVECODE_PROJECT_DIR:-$PWD}"
DIVECODE_HOME="${DIVECODE_HOME:-$HOME/.divecode}"
[ -x "$DIVECODE_HOME/bin/divecode-pr-watch" ] || DIVECODE_HOME="$HOME/Trappist/divecode"
# Find PR number from push-pr.md
PR=$(grep -E '^url:' "$PROJ_DIR/divecode/push-pr.md" 2>/dev/null | head -1 | grep -oE '/pull/[0-9]+' | grep -oE '[0-9]+')
[ -z "$PR" ] && { echo "could not find PR in divecode/push-pr.md"; exit 1; }
echo "PR: $PR"
Workflow
Step 1 — Fetch + route
bash "$DIVECODE_HOME/bin/divecode-pr-watch" "$PR" > "$PROJ_DIR/divecode/pr-watch.md"
cat "$PROJ_DIR/divecode/pr-watch.md"
Routing table (matches agent-flow exactly):
| status | route | action |
|---|---|---|
green | merge | invoke /divecode-merge |
has_comments | fix-loop | invoke /divecode-fix-loop with PR comments converted into must-fix items |
ci_failed | fix-loop | invoke /divecode-fix-loop; reproduce the failure locally, fix, push |
pending | block | sleep / wait — re-invoke pr-watch after ~5min |
closed (not merged) | block | ask user before proceeding |
merged | cleanup | invoke /divecode-cleanup |
error | block | surface error; do not retry until user input |
Step 2 — Branch per route
Per the table. For pending, suggest the user re-invoke later or set a timer.
Step 3 — Append round entry to pr-watch.md
Each poll/action is recorded:
## Round <N> — <date>
status: <s>
route: <r>
action: <what was done>
Done criteria
pr-watch.mdshows latest status- Next skill invoked (or user prompted for
pending/closed)
When not to use it
- →Assuming PR status without fetching it
- →Attempting multiple actions for a single status
- →Auto-cleaning up a PR that was closed without merging
Limitations
- →Status is computed, not assumed
- →One status leads to one route
- →Does not auto-cleanup a closed-without-merge PR
How it compares
This skill uses a fixed 6-status/7-route deterministic routing table to automate PR workflow decisions, which is more structured than manual PR monitoring.
Compared to similar skills
divecode-pr-watch side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| divecode-pr-watch (this skill) | 0 | 2mo | Review | Intermediate |
| fix-pr | 1 | 4mo | Review | Intermediate |
| resolve-checks | 1 | 6mo | Review | Intermediate |
| agent-github-pr-manager | 1 | 6mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
fix-pr
AztecProtocol
Fix a failing PR by analyzing CI logs and fixing errors. Autonomous workflow that identifies failures, rebases, fixes issues, and pushes.
resolve-checks
flowglad
Resolve all failing CI checks and address PR review feedback on the current branch's PR. Runs tests locally, fixes failures, incorporates valid review comments, and resolves addressed feedback. Use when CI is red, after receiving PR feedback, or before merging.
agent-github-pr-manager
ruvnet
Agent skill for github-pr-manager - invoke with $agent-github-pr-manager
agent-github-modes
ruvnet
Agent skill for github-modes - invoke with $agent-github-modes
agent-pr-manager
ruvnet
Agent skill for pr-manager - invoke with $agent-pr-manager
git-pr-workflows-git-workflow
sickn33
Orchestrate a comprehensive git workflow from code review through PR creation, leveraging specialized agents for quality assurance, testing, and deployment readiness. This workflow implements modern g