Przejdź do treści
Biblioteka skilli
Programowanie · Automatyzacja

watch

/watch

Monitoruje pull request pod kątem komentarzy bota recenzenta AI i sam odpowiada na nie oraz naprawia kod, aż recenzent umilknie.

Licencja
MIT
Ostatnia zmiana repozytorium
16.07.2026

Ocena i bezpieczeństwo

84/ 100Klasa: dobry
Format9 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
3
Skrypty
2
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 16.07.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 2 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/rerequest-review.sh, scripts/watch-pr-comments.sh

Co robi i kiedy

Monitoruje pull request pod kątem komentarzy bota recenzenta AI i sam odpowiada na nie oraz naprawia kod, aż recenzent umilknie.

Wyzwalacze z opisu

watch a PRwatch PR #123watch for AI review commentsauto-handle AI reviewbabysit this PR through review

Argumenty

/watch <pr-number> [--mode request-review|single|poll]
Oryginalny opis (EN)

This skill should be used when the user asks to "watch a PR", "watch PR #123", "watch for AI review comments", "auto-handle AI review", or "babysit this PR through review", or wants to continuously monitor a pull request for AI reviewer (bot) comments and automatically reply to and fix them until the reviewer reports no further comments.

Jak działa

  1. How AI comments are detected
  2. Loop modes
  3. Helper Scripts
  4. Workflow
  5. Important Guidelines
  6. Script Reference
Sekcje z nagłówków SKILL.md, w oryginale · 203 linii, 2 098 słów
Podgląd SKILL.md
---
description: This skill should be used when the user asks to "watch a PR", "watch PR #123", "watch for AI review comments", "auto-handle AI review", or "babysit this PR through review", or wants to continuously monitor a pull request for AI reviewer (bot) comments and automatically reply to and fix them until the reviewer reports no further comments.
argument-hint: "<pr-number> [--mode request-review|single|poll]"
disable-model-invocation: true
allowed-tools: Bash, Read, Write, Edit, Grep, Glob
---

# GitHub PR AI-Review Watcher

Continuously watch a pull request for review comments from AI reviewers — bot accounts such as GitHub Copilot or `coderabbitai[bot]`, as well as this plugin's own `/code-review` skill. Each time new comments appear, reply to them and apply fixes by driving the `reply` and `fix` skills, then keep watching. The `--mode` argument tunes the loop — re-request the reviewer each round, run a single cycle, or plain polling (see Loop modes). Stop when the reviewer signals the review is complete (e.g. a summary comment matching "there are no comments"), the PR is closed/merged, or the reviewer stays quiet through a grace period (see Step 4).

This skill orchestrates a loop; the actual reply and fix work follows the `reply` and `fix` skills' documented workflows (read and execute their `SKILL.md` files) rather than reimplementing them.

## How AI comments are detected

A review thread is **actionable** when it is unresolved and one of the following holds:

- The **latest comment is authored by an AI reviewer** — any GitHub App/Bot, detected by actor type (`Bot`) with a fallback to the `[bot]` login convention. Detecting by type matters because GitHub Copilot posts under the login `copilot-pull-request-reviewer` with **no** `[bot]` suffix — a login-only check would miss it.
- The **latest comment carries this plugin's `github-devflow:code-review` signature** — the `/code-review` skill posts under a user account (not a bot), so its comments are matched by signature instead of author type.
- The thread is an **answered question** — this skill parked a `github-devflow:watch` question on it in an earlier round (see Step 3), and the user has since replied. The user's reply carries no plugin signature, so it is recognized as the answer to act on.

Once `reply`/`fix` respond, the latest comment is one of their signed replies, so the thread stops being actionable. A still-**unanswered** parked question (latest comment is the `github-devflow:watch` question) is intentionally **not** actionable — it waits for the user. The `--author-filter` option narrows or widens the bot side of this (see Script Reference); `/code-review` threads and answered questions are detected in every mode.

## Loop modes

The optional `--mode` argument selects how the loop behaves after each handled round (default `poll`):

| Mode | Behavior |
|------|----------|
| `poll` | Keep polling across windows; wait out the grace period before ending on inactivity (Step 4). **Default.** |
| `request-review` | Like `poll`, but at the end of every round, re-request the reviewer (e.g. GitHub Copilot) so it re-reviews the pushed fixes. Use when the reviewer does not re-review new commits on its own. |
| `single` | Run one poll-and-handle cycle, then finish — no re-polling and no grace period. |

## Helper Scripts

| Script | Location | Purpose |
|--------|----------|---------|
| `watch-pr-comments.sh` | `skills/watch/scripts/` | Poll the PR until there are actionable AI-reviewer threads, a stop signal, a closed PR, or a timeout |
| `rerequest-review.sh` | `skills/watch/scripts/` | Re-request the PR's bot reviewer(s) (e.g. Copilot) so they re-review. Used only in `request-review` mode |
| `fetch-review-threads.sh` | `scripts/` (plugin root) | Fetch PR review threads. Wrapped by `watch-pr-comments.sh`; also used directly by the `reply`/`fix` workflows |
| `post-reply.sh` | `scripts/` (plugin root) | Post replies to threads. Used by the `reply`/`fix` workflows, and directly by this skill (`--skill watch`) to park questions for the user |

`watch-pr-comments.sh` owns all timing and detection so the loop stays deterministic. A single invocation polls for a bounded window and returns a JSON `status`; this skill re-invokes it to keep watching.

## Workflow

### Step 1: Validate Input

Parse `$ARGUMENTS` into the **PR number** and the optional **`--mode`** (`request-review`, `single`, or `poll`; default `poll` — see Loop modes). If the PR number is missing, ask the user which PR to watch. Pass only the PR number to the helper scripts. Verify `gh` is authenticated (`gh auth status`); if not, tell the user to run `gh auth login`.

### Step 2: Poll for Activity

Run the watch script. It blocks until something actionable happens, so allow the full Bash time budget:

```bash
PR_NUMBER=$ARGUMENTS
bash ${CLAUDE_PLUGIN_ROOT}/skills/watch/scripts/watch-pr-comments.sh $PR_NUMBER
```

The script self-bounds each invocation to `--max-wait` (default 480s / 8 min) and returns `timeout` on its own. Invoke this Bash call with a `timeout` of `600000` (10 min) as a ceiling — the headroom above 480s ensures the script returns before Bash cuts it off.

The script prints a JSON object with a `status` field:

| `status` | Meaning | Next action |
|----------|---------|-------------|
| `threads` | Actionable AI-reviewer threads are waiting | Go to Step 3 |
| `stop` | Reviewer signalled the review is complete | Go to Step 5 |
| `closed` | PR is merged or closed | Go to Step 5 |
| `timeout` | No activity within the poll window (reviewer is quiet) | Go to Step 4 |

### Step 3: Classify and Handle Threads

When `status` is `threads`, classify each actionable thread, then act. The `reply` and `fix` skills set `disable-model-invocation: true`, so they cannot be triggered as skills from here; instead, **execute their documented workflows** — read `${CLAUDE_PLUGIN_ROOT}/skills/reply/SKILL.md` and `${CLAUDE_PLUGIN_ROOT}/skills/fix/SKILL.md` and follow their steps, which use the shared `fetch-review-threads.sh` and `post-reply.sh` scripts.

**Classify each thread:**

- **Answered question** — the thread already contains a `github-devflow:watch` question from an earlier round and the latest comment is the user's reply. The user has stated how to proceed; apply their guidance without asking again.
- **Clear-cut** — a reviewer comment whose fix is obvious (typo, missing null check, mechanical refactor).
- **Uncertain** — a reviewer comment whose fix is ambiguous, risky, touches broad or shared code, or has multiple reasonable approaches.

**For uncertain threads, ask on the PR — do not block the session for an answer.**

Post the question as a reply on that thread so the user can answer inline on GitHub, and leave the code unchanged for that thread this round:

```bash
bash ${CLAUDE_PLUGIN_ROOT}/scripts/post-reply.sh --skill watch "<thread-id>" "<question stating the options and what needs to be decided>"
```

The question's `github-devflow:watch` signature becomes the thread's latest comment, so the `reply` and `fix` workflows automatically skip it until the user replies (and the watch poller does not re-surface it while it waits).

**For clear-cut and answered-question threads, reply then fix:**

1. **Reply**: Execute the reply workflow in `${CLAUDE_PLUGIN_ROOT}/skills/reply/SKILL.md`. It posts thoughtful responses without changing code.
2. **Fix**: Execute the fix workflow in `${CLAUDE_PLUGIN_ROOT}/skills/fix/SKILL.md`. It makes code changes, commits, pushes, and posts a per-thread report. For answered-question threads, apply the approach the user chose in their reply.

**Notify about parked questions.**

If any questions were posted this round, tell the user which threads await a reply — include each comment URL returned by `post-reply.sh` (the `comment.url` field). For example: "Posted 2 questions on PR #123 — reply on these threads and I'll apply your decision on the next check: <url1>, <url2>."

After the fix pass pushes, proceed according to the loop mode:

- **`request-review`**: re-request the reviewer so it re-reviews the new commits, then return to **Step 2**:

  ```bash
  bash ${CLAUDE_PLUGIN_ROOT}/skills/watch/scripts/rerequest-review.sh $PR_NUMBER
  ```

  Report the reviewers re-requested (from the script's `requested` field); if it returns `errors`, surface them but keep watching.
- **`poll`**: return to **Step 2**.
- **`single`**: go to **Step 5** to finish — do not poll again.

When the user replies to a parked question, a later round detects it as an *answered question* and applies the fix.

Keep a **running tally across all rounds** — replies posted, fixes committed (with SHAs), issues created, and questions parked (with URLs) — so the end-of-watch summary in Step 5 can cover the whole session.

### Step 4: Handle Timeout (grace period)

A `timeout` means the poll window elapsed with no new activity.

In **`single`** mode, do not wait — go straight to **Step 5** to finish.

In **`poll`** and **`request-review`** modes, do **not** stop immediately — a reviewer can be slow, and one poll window is only a few minutes. Re-invoke **Step 2** to keep watching, and give up only once the reviewer has been continuously quiet for the **grace period**.

- Default grace period: **about 10 minutes**. Track how long the reviewer has been quiet by summing the `waitedSeconds` each consecutive `timeout` reports (roughly 1–2 windows).
- **Reset** the elapsed-quiet time to zero whenever a round produces activity (a `threads` result). The grace period applies to *continuous* silence, not total watch time.
- Once the grace period is exhausted with no activity, go to **Step 5** to finish. AI reviewers such as Copilot often do not re-review new commits unless their review is re-requested — call this out in the summary so the user can re-request the review on GitHub and run `/watch` again.

### Step 5: Finish

The watch loop ends when the reviewer signals completion (`stop`), the PR is closed/merged (`closed`), or the reviewer stays quiet through the grace period (`timeout`, see Step 4). On any of these, report an activity summary **in the Claude Code session — do not post it as a PR comment.** The per-thread replies, fixes, and questions were already posted to the PR during the rounds; this end-of-watch summary is for the session only.

Draw it from the running tally kept across rounds (Step 3) and cover the whole watch:

- Why watching ended (reviewer signalled completion, quoting the matched comment; PR closed/merged; or reviewer stayed quiet through the grace period)
- Total watch rounds handled, and replies posted across all rounds
- Fixes committed and pushed across all rounds (with commit SHAs), and any issues created by `fix`
- **Any parked questions still awaiting the user's reply** (with their thread URLs) — a review can end while a question is still open, so call these out explicitly rather than letting them be forgotten
- Any threads left unaddressed or errors encountered

## Important Guidelines

### Confirmation Policy

- Proceed autonomously on clear-cut fixes (obvious bugs, typos, missing null checks, mechanical refactors).
- When a fix is ambiguous, risky, touches broad/shared code, or has multiple reasonable approaches, **do not change code and do not block the session waiting for an answer**. Instead, post the question as a reply on that PR thread (signed `github-devflow:watch`) and notify the user that a thread awaits their reply. Pick the fix up on a later round once they answer.
- Never apply a fix the user declined; if they decline in their reply, note it in the thread and summary and move on.

### Loop Safety

- The loop stops on the reviewer's stop signal, a closed/merged PR, the reviewer staying quiet through the grace period (~10 min of continuous inactivity), or the user ending the session — it does not poll indefinitely.
- Respect the user if they ask to stop watching at any point.
- Do not lower the poll interval below a minute; frequent polling wastes API calls without helping.

### Stop Signal Tuning

The default stop pattern matches phrases like "no comments", "no new comments" (Copilot's wording is "…generated no new comments"), "no further comments", "no issues found", and "LGTM" in reviewer summary/issue comments. If a specific reviewer uses different wording, pass a custom `--stop-pattern` (see Script Reference).

### Error Handling

- If `gh` is not authenticated, tell the user to run `gh auth login`.
- If the PR number is invalid, report the error clearly and stop.
- If the `reply` or `fix` step fails for a round, report the error and stop rather than silently looping.

## Script Reference

### watch-pr-comments.sh

```
Usage: watch-pr-comments.sh <pr-number> [options]

Options:
  --interval <seconds>     Poll interval (default: 180)
  --max-wait <seconds>     Max time to poll in this invocation (default: 480).
                           Keep below the Bash tool's per-call limit.
  --author-filter <value>  Who counts as an AI reviewer:
                             bot     - any GitHub App/Bot (actor type Bot, or a
                                       "...[bot]" login). Catches GitHub Copilot.
                                       Default.
                             any     - handle threads from any author (skips
                                       threads already answered by this plugin's
                                       skills). The stop signal is still only
                                       honored from bot reviewers.
                             <login> - a specific reviewer login.
  --stop-pattern <regex>   Case-insensitive regex marking "no more comments"
                           in a reviewer summary/issue comment.

Output: JSON with a "status" field:
  threads  -> owner, repo, prNumber, threads[], totalCount
  stop     -> matched (the reviewer comment that ended the watch)
  closed   -> prState
  timeout  -> waitedSeconds
```

### rerequest-review.sh

```
Usage: rerequest-review.sh <pr-number> [--reviewer <login>]...

Options:
  --reviewer <login>   Reviewer login to re-request (repeatable). When given,
                       auto-detection is skipped.

Without --reviewer, re-requests the bot reviewers previously requested on the
PR (auto-detected from its review-request history; e.g. "Copilot"), falling
back to "Copilot" if none are found.

Output: JSON { requested: [logins], skipped: [logins], errors: [strings] }
```
Pliki w paczce (3)
  • SKILL.md 14 KB
  • scripts/rerequest-review.sh 3 KB
  • scripts/watch-pr-comments.sh 9 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · hhiroshell/gh-devflow-plugins84MIT
SethGammon/Citadel100MIT
mathews-tom/armory100MIT
maddexritter-rgb/vibe-editing100MIT
hidai25/eval-view100Apache-2.0
Soul-Brews-Studio/arra-oracle-skills-cli100MIT
INo-xious/stockbit-mcp100MIT
thecraighewitt/skills100MIT
masumi-network/sokosumi95MIT

Migawka bazy z 13.11.2026 · wersja paczki d6b44ec98ca2 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 95t3-babysit-pr
    Monitoruje pull request podczas przeglądu i CI, aż do zakończenia.
  • 100babysit-pr
    Monitoruje pull request do gotowości do scalenia: sprawdza status CI, przegląda komentarze do PR i automatycznie naprawia problemy.
  • 100babysit-pr
    Monitoruje pull request w trakcie przeglądu i CI, gdy użytkownik prosi o obserwowanie PR.
  • 100babysit-pr
    Prowadzi pull request przez rundy review botów: weryfikuje uwagi, wprowadza poprawki, odpowiada i zamyka wątki.
  • 100babysit-pr
    Prowadzi pull request przez rundy review botów: weryfikuje uwagi, wprowadza poprawki, odpowiada i zamyka wątki.
  • 100babysit-pr
    Monitoruje pull request przez przegląd i CI, gdy użytkownik prosi o śledzenie lub podtrzymywanie PR.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.