一键导入
pr-watch
Poll GitHub PR for review feedback, auto-fix issues, and report terminal state
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Poll GitHub PR for review feedback, auto-fix issues, and report terminal state
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Dispatch a background worker with role-templated prompt and auto-populated collision fences
Comprehensive system health monitoring — checks agent performance, database, Kafka topics, pattern discovery, and service status across the ONEX platform
Orchestrate a Claude Code agent team to autonomously work a Linear epic across multiple repos
Run DoD evidence checks against a ticket contract and generate a verification receipt
Autonomous per-ticket pipeline that chains ticket-work, local-review, PR creation, CI watching, PR review loop, integration verification gate, and auto-merge into a single unattended workflow with Slack notifications and policy guardrails
Full autonomous audit-debug-fix loop for all dashboard pages — Playwright recon, parallel systematic-debug, fix, PR, Linear ticket, re-audit, iterate until clean. Supports local and cloud targets with optional post-fix redeployment.
| name | pr-watch |
| description | Poll GitHub PR for review feedback, auto-fix issues, and report terminal state |
| version | 1.0.0 |
| level | basic |
| debug | false |
| category | workflow |
| tags | ["pr","github","review","automation","polling"] |
| author | OmniClaude Team |
| composable | true |
| inputs | [{"name":"pr_number","type":"int","description":"GitHub PR number to watch","required":true},{"name":"repo","type":"str","description":"GitHub repo slug (org/repo)","required":true},{"name":"timeout_hours","type":"float","description":"Max hours to wait for review (default 24)","required":false},{"name":"max_review_cycles","type":"int","description":"Max auto-fix cycles before escalating (default 3)","required":false},{"name":"auto_fix","type":"bool","description":"Auto-fix Critical/Major/Minor review comments (default true)","required":false},{"name":"fix_nits","type":"bool","description":"Also auto-fix Nit-level comments (default false)","required":false}] |
| outputs | [{"name":"skill_result","type":"ModelSkillResult","description":"Written to ~/.claude/skill-results/{context_id}/pr-watch.json","fields":[{"status":"approved | changes_requested_fixed | timeout | capped | error"},{"pr_number":"int"},{"repo":"str"},{"fix_cycles_used":"int"},{"elapsed_hours":"float"}]}] |
| args | [{"name":"pr_number","description":"GitHub PR number to watch","required":true},{"name":"repo","description":"GitHub repo slug (org/repo)","required":true},{"name":"--timeout-hours","description":"Max hours to wait for review (default 24)","required":false},{"name":"--max-review-cycles","description":"Max fix cycles before escalating (default 3)","required":false},{"name":"--no-auto-fix","description":"Poll only, don't attempt fixes","required":false},{"name":"--fix-nits","description":"Also auto-fix Nit-level comments","required":false}] |
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
/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
gh pr view {pr_number} --repo {repo} --json reviews,reviewDecisionreviewDecision == APPROVED: exit with status: approvedreviewDecision == CHANGES_REQUESTED and auto_fix=true and cycles remaining:
status: cappedstatus: timeoutstatus: changes_requested_fixedTask(
subagent_type="onex:polymorphic-agent",
description="pr-watch: fix review comments for PR #{pr_number} (cycle {N})",
prompt="Invoke: Skill(skill=\"onex: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."
)
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
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.
When Kafka and Valkey are available (ENABLE_REAL_TIME_EVENTS=true):
(repo, pr_number) via Valkey watch registrypr-status event arrives in the agent's inbox topic
(onex.evt.omniclaude.agent-inbox.{agent_id}.v1)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,
)
When Kafka/Valkey are unavailable:
gh run watch {run_id} --exit-status as background process after pushing fixes~/.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,
)
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.
ticket-pipeline skill (planned: invokes pr-watch after ci-watch passes)ci-watch skill (planned: runs before pr-watch)auto-merge skill (planned: runs after pr-watch passes)pr-review-dev skill (invoked to fix review comments)inbox_wait module (omniclaude.services.inbox_wait) — unified wait interfacenode_github_pr_watcher_effect — ONEX node for EVENT_BUS+ mode routing