# Pr Watch

> Poll GitHub PR for review feedback -- dispatches to node_pr_watch_orchestrator for execution

- Skill: `omninode-ai/pr-watch` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add omninode-ai/pr-watch`
- Raw SKILL.md: https://api.skillmd.com/api/skills/omninode-ai/pr-watch/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: OmniNode-ai (https://skillmd.com/u/omninode-ai)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/omninode-ai/pr-watch

---


<!-- routing-enforced: dispatches to node_pr_watch_orchestrator. -->

# PR 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 review state on PR #{pr_number}."

**Implements**: the pr-watch polling contract

## 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

1. Fetch PR review state via `gh pr view {pr_number} --repo {repo} --json reviews,reviewDecision`
2. If `reviewDecision == APPROVED`: exit with `status: approved`
3. If `reviewDecision == CHANGES_REQUESTED` and `auto_fix=true` and cycles remaining:
   - 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
4. If fix cycles exhausted: exit with `status: capped`
5. If elapsed > timeout_hours: exit with `status: timeout`
6. If all blocking issues resolved but no explicit approval: exit with `status: changes_requested_fixed`

## Fix Dispatch Contract

```
Task(
  subagent_type="general-purpose",
  description="pr-watch: fix review comments for PR #{pr_number} (cycle {N})",
  prompt="Invoke: Skill(skill=\"onex:pr_review\", 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 `$ONEX_STATE_DIR/skill-results/{context_id}/pr-watch.json` on exit.

```json
{
  "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`

## See Also

- `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)
- `node_github_pr_watcher_effect` — ONEX node for EVENT_BUS+ mode routing

