← Back to the collection

Watch PR Then Action

Watch a PR for events (CI, reviews, ready-for-review) and run a follow-up action. Works in Claude Code and Codex.

Installation

# Add the marketplace (if not already added)
claude plugin marketplace add jtsternberg/claude-plugins

# Install the plugin
claude plugin install watch-pr-then-action@jtsternberg

# Codex
codex plugin add watch-pr-then-action@jtsternberg

Skills

watch-pr-then-action

Poll a GitHub PR until a condition is met, then execute a follow-up action.

Invoke watch-pr-then-action with a PR number or URL, an optional condition, and an optional follow-up action.

Conditions:

Examples:

Workflow:

  1. Parses the PR identifier, condition, and optional follow-up action
  2. Verifies the PR exists (aborts if closed/merged)
  3. Checks condition immediately
  4. If not met, schedules a cron job polling every 5 minutes
  5. Once condition is met, cancels the cron and executes the follow-up (defaults to review PR <number>)

Prerequisites:

Example Usage

Claude Code:

# Wait for Copilot to finish, then review
/watch-pr-then-action:watch-pr-then-action 2165

# Wait for a draft PR to be marked ready, then review
/watch-pr-then-action:watch-pr-then-action 2165 for ready

Codex:

$watch-pr-then-action:watch-pr-then-action 2165

Additional Documentation

Part of the pr-workflow bundle — install pr-workflow to get all PR skills at once.