# Github Pr Watch

> Watch GitHub for pull requests awaiting the user's review and notify the session when new review requests appear. Use when the user asks to watch a repo (or all repos) for PRs, babysit their review queue, get pinged about review requests, or stop such a watch.

- **Type:** Skill
- **Install:** `agentstack add skill-shodocan-pi-monitor-plugin-github-pr-watch`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Shodocan](https://agentstack.voostack.com/s/shodocan)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Shodocan](https://github.com/Shodocan)
- **Source:** https://github.com/Shodocan/pi-monitor-plugin/tree/main/skills/github-pr-watch

## Install

```sh
agentstack add skill-shodocan-pi-monitor-plugin-github-pr-watch
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# GitHub PR review watcher

Starts a background monitor that polls GitHub for open pull requests where the user's
review is requested, and delivers a structured event into this session for each new one.
Polling uses the ambient `gh` CLI authentication — no tokens are read or stored.

## Prerequisites

- `gh` CLI installed and authenticated (`gh auth status` must succeed).
- `jq` installed.
- The pi-monitor extension active (this skill ships with it).

If `gh auth status` fails, tell the user to run `gh auth login` themselves — never attempt
to authenticate on their behalf.

## Start watching

1. **Resolve scope.**
   - User said "this repo" or you are inside a repo: run
     `gh repo view --json nameWithOwner -q .nameWithOwner` and use `--repo `.
   - User said "my PRs", "everything", or gave no repo: use cross-repo mode without `--repo`.
2. **Pick interval.** Default 300 seconds. Minimum practical interval is 60 seconds because `gh search` indexing may lag.
3. **Start monitor.** Use the absolute script path from this skill directory.

### Slash examples

Watch review requests across all repos every 5 minutes:

```text
/monitor --regex '^PI_EVENT ' -- /scripts/watch-prs.sh --interval 300
```

Watch one repo:

```text
/monitor --regex '^PI_EVENT ' -- /scripts/watch-prs.sh --interval 300 --repo acme-org/example-service
```

Include drafts or bot-authored PRs:

```text
/monitor --regex '^PI_EVENT ' -- /scripts/watch-prs.sh --interval 300 --include-drafts --include-bots
```

### Tool example

Pass `jobs_monitor` params directly:

```json
{
  "command": "/scripts/watch-prs.sh --interval 300 --repo acme-org/example-service",
  "regex": "^PI_EVENT ",
  "before": 0,
  "after": 0,
  "debounceSeconds": 5,
  "deliver": "polite"
}
```

### Parameter cheat sheet

- `--repo owner/name` — limit watch to one repository; omit for all repos.
- `--interval seconds` — polling interval; default `300`.
- `--include-drafts` — include draft PRs; skipped by default.
- `--include-bots` — include bot authors like Dependabot; skipped by default.
- `--once` — single poll for testing; do not use for a long-running monitor.

After starting, tell the user: "Watching  every ; `/jobs` shows active monitors and `/cancel ` stops it."

## When an event arrives

Deliveries contain one `PI_EVENT` JSON line per new PR
(`{"v":1,"type":"pr_review_requested","repo":...,"number":...,"url":...}`). For each:

1. Run `gh pr view ` (add `--json title,body,additions,deletions,statusCheckRollup`
   if you need structure) for a cheap enrichment.
2. Give the user a 2–3 line summary: what it changes, size, CI status.
3. Ask whether they want you to start a review. **Never review, comment, or approve
   without explicit confirmation.** If the author is a bot and it is a routine dependency
   bump, say so and offer a quick skim instead.

A `{"type":"baseline","count":N}` event on first run means N requests already existed —
report the count once, do not enumerate them unless asked.

## Stop watching

Run `/jobs`, find the `mon_*` job, then `/cancel `.

```text
/jobs
/cancel mon_1
```

Watcher state (seen PR ids) lives under `~/.local/state/pi-monitor/watch-prs/` and may be
deleted freely — the only consequence is a fresh baseline.

## Testing the pipeline

`scripts/watch-prs.sh --once` performs a single poll and exits — useful for verifying
`gh` auth and inspecting the raw `PI_EVENT` output before starting a monitor.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Shodocan](https://github.com/Shodocan)
- **Source:** [Shodocan/pi-monitor-plugin](https://github.com/Shodocan/pi-monitor-plugin)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-shodocan-pi-monitor-plugin-github-pr-watch
- Seller: https://agentstack.voostack.com/s/shodocan
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
