Awesome-omni-skill pr-watch
Poll GitHub PR for review feedback, auto-fix issues, and report terminal state
git clone https://github.com/diegosouzapw/awesome-omni-skill
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data-ai/pr-watch" ~/.claude/skills/diegosouzapw-awesome-omni-skill-pr-watch-16257d && rm -rf "$T"
skills/data-ai/pr-watch/SKILL.mdPR Watch
Overview
Poll GitHub PR review status. Auto-fix review comments (Critical/Major/Minor by default) using
pr-review-dev. Exit when PR reaches a terminal state: approved, changes_requested_fixed
(all blocking issues resolved), timeout, or capped (max fix cycles reached).
Announce at start: "I'm using the pr-watch skill to monitor reviews for PR #{pr_number}."
Implements: OMN-2524
Quick Start
/pr-watch 123 org/repo /pr-watch 123 org/repo --timeout-hours 48 /pr-watch 123 org/repo --max-review-cycles 5 /pr-watch 123 org/repo --fix-nits /pr-watch 123 org/repo --no-auto-fix
Poll Loop
- Fetch PR review state via
gh pr view {pr_number} --repo {repo} --json reviews,reviewDecision - If
: exit withreviewDecision == APPROVEDstatus: approved - If
andreviewDecision == CHANGES_REQUESTED
and cycles remaining:auto_fix=true- Dispatch pr-review-dev agent with review comments
- Increment fix cycle count
- Wait for CI (delegate to ci-watch if needed), then re-request review
- If fix cycles exhausted: exit with
status: capped - If elapsed > timeout_hours: exit with
status: timeout - If all blocking issues resolved but no explicit approval: exit with
status: changes_requested_fixed
Fix Dispatch Contract
Task( subagent_type="onex:polymorphic-agent", description="pr-watch: fix review comments for PR #{pr_number} (cycle {N})", prompt="Invoke: Skill(skill=\"pr-review-dev\", args=\"{pr_number}\") Review comments: {review_comments} Fix all Critical, Major, and Minor issues.{nit_instruction} Push fixes to branch: {branch_name} Report: issues fixed, files changed, any issues skipped." )
Skill Result Output
Write
ModelSkillResult to ~/.claude/skill-results/{context_id}/pr-watch.json on exit.
{ "skill": "pr-watch", "status": "approved", "pr_number": 123, "repo": "org/repo", "fix_cycles_used": 2, "elapsed_hours": 3.5, "context_id": "{context_id}" }
Status values:
approved | changes_requested_fixed | timeout | capped | error
Push-Based Notification Support (OMN-2826)
pr-watch supports two notification modes, selected automatically based on infrastructure availability. The push-based mode eliminates polling for CI status checks during the review cycle.
EVENT_BUS+ Mode (preferred)
When Kafka and Valkey are available (
ENABLE_REAL_TIME_EVENTS=true):
- Register watch: agent registers interest in
via Valkey watch registry(repo, pr_number) - Wait for inbox: block until a
event arrives in the agent's inbox topic (pr-status
)onex.evt.omniclaude.agent-inbox.{agent_id}.v1 - Process result: on CI completion after a fix cycle, check review status and decide next step
from omniclaude.services.inbox_wait import register_watch, wait_for_pr_status # Register watch for CI re-runs after pushing fixes await register_watch(agent_id=agent_id, repo=repo, pr_number=pr_number) # After pushing a fix, wait for CI to complete (replaces polling) ci_result = wait_for_pr_status( repo=repo, pr_number=pr_number, run_id=latest_run_id, agent_id=agent_id, timeout_seconds=3600, )
STANDALONE Mode (fallback)
When Kafka/Valkey are unavailable:
- Spawn
as background process after pushing fixesgh run watch {run_id} --exit-status - Wait for result in file-based inbox (
)~/.claude/pr-inbox/
from omniclaude.services.inbox_wait import wait_for_pr_status # Unified interface -- automatically falls back to STANDALONE ci_result = wait_for_pr_status( repo=repo, pr_number=pr_number, run_id=latest_run_id, timeout_seconds=3600, )
Migration Notes
The original review polling loop is unchanged. The inbox-wait pattern replaces only the CI status checks that happen between fix cycles (when pr-watch pushes a fix and needs to wait for CI before re-requesting review). The
wait_for_pr_status() function provides
a unified interface that works in both EVENT_BUS and STANDALONE modes.
See Also
skill (planned: invokes pr-watch after ci-watch passes)ticket-pipeline
skill (planned: runs before pr-watch)ci-watch
skill (planned: runs after pr-watch passes)auto-merge
skill (invoked to fix review comments)pr-review-dev
module (inbox_wait
) — unified wait interfaceomniclaude.services.inbox_wait
— ONEX node for EVENT_BUS+ mode routingnode_github_pr_watcher_effect- OMN-2524 — pr-watch implementation ticket
- OMN-2826 — push-based notifications ticket