pr-watch

pr-watch is a skill for Claude Code from s977043/PlanGate. It costs 54 tokens per session (2,048 once invoked), scanned A, original, MIT.

A reusable procedure for watching an open pull request, which is a proposed code change, until it is merged or closed. It checks automated tests, review comments, and merge conflicts.

In plain words
What is it for?
Use it after opening a pull request to detect CI failures, new inline review comments, and conflicting changes, then guide the required responses.
Why use it?
It reduces the chance that failed checks, missed review feedback, or conflicts leave a pull request waiting for attention.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it after opening a pull request to detect CI failures, new inline review comments, and conflicting changes, then guide the required responses.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/s977043/plangate/pr-watch
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add s977043/PlanGate --skill pr-watch
Clone the repo
git clone --depth 1 https://github.com/s977043/PlanGate

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pr-watch

README.md
[![agentmods](https://agentmods.dev/badge/skills/s977043/plangate/pr-watch/github.svg)](https://agentmods.dev/skills/s977043/plangate/pr-watch)
Your own site
<a href="https://agentmods.dev/skills/s977043/plangate/pr-watch"><img src="https://agentmods.dev/badge/skills/s977043/plangate/pr-watch/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pr-watch

Your own site · 80×15
<a href="https://agentmods.dev/skills/s977043/plangate/pr-watch"><img src="https://agentmods.dev/badge/skills/s977043/plangate/pr-watch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,048 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.02048
Opus 5 $0.00027 $0.01024
Sonnet 5 $0.00011 $0.00410
Haiku 4.5 $0.00005 $0.00205

Measured 7d ago against content hash 55ef20ebd201, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

pr-watch scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/pr-watch/SKILL.md · 147 lines

How it starts

The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PR Watch

PR 作成後、マージまたは close されるまで監視し、CI エラー・レビューコメント・ コンフリクトの 3 点セットに対応する再利用単位の定型。

1. 監視 3 点セット

観点 検知方法 対応
CI エラー gh pr checks <PR番号>fail §3 CI FAIL 対応
レビューコメント gh api repos/<owner>/<repo>/pulls/<PR番号>/comments の ID 差分(inline review comments。gh pr view --json comments は issue コメントのみでボット指摘を取りこぼす) §3 レビューコメント対応
コンフリクト gh pr view <PR番号> --json mergeableCONFLICTING §3 CONFLICTING 対応

3 点いずれも未検知かつ stateMERGED / CLOSED になった時点で監視終了。

2. Monitor スクリプト定型

<PR番号> は実行時に対象 PR 番号へ置換する。60 秒間隔でポーリングし、 コメントは seen_file に既知 ID を保存して差分検知する。

#!/usr/bin/env bash
set -euo pipefail

PR_NUMBER="<PR番号>"
SEEN_FILE="/tmp/pr-watch-${PR_NUMBER}-seen-comments.txt"
touch "${SEEN_FILE}"

CURRENT_FILE="/tmp/pr-watch-${PR_NUMBER}-current.txt"

while true; do
  # 一時的な gh 失敗(ネットワーク・レート制限)でクラッシュさせない
  state=$(gh pr view "${PR_NUMBER}" --json state --jq .state 2>/dev/null || echo "")
  if [ "${state}" = "MERGED" ] || [ "${state}" = "CLOSED" ]; then
    echo "PR #${PR_NUMBER} is ${state}. Stop watching."
    exit 0
  fi
  if [ -z "${state}" ]; then
    sleep 60
    continue
  fi

  # (1) コンフリクト検知
  mergeable=$(gh pr view "${PR_NUMBER}" --json mergeable --jq .mergeable 2>/dev/null || echo "")
  if [ "${mergeable}" = "CONFLICTING" ]; then
    echo "CONFLICTING detected on PR #${PR_NUMBER}"
  fi

  # (2) CI FAIL検知
  if gh pr checks "${PR_NUMBER}" 2>/dev/null | grep -qi "fail"; then
    echo "CI FAIL detected on PR #${PR_NUMBER}"
  fi

  # (3) 新規レビューコメント検知(inline review comments = ボット指摘を含む)
  # 取得成功時のみ SEEN_FILE を更新する(失敗時に空で上書きすると
  # 次回成功時に既読コメントを全件「新規」と誤検知するため)
  if gh api --paginate "repos/<owner>/<repo>/pulls/${PR_NUMBER}/comments" \
       --jq '.[].id' > "${CURRENT_FILE}" 2>/dev/null; then
    new_ids=$(comm -13 <(sort "${SEEN_FILE}") <(sort "${CURRENT_FILE}"))
    if [ -n "${new_ids}" ]; then
      echo "New review comments: ${new_ids}"
    fi
    cp "${CURRENT_FILE}" "${SEEN_FILE}"
  fi

  sleep 60
done

Read the full file on GitHub · 147 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 147 lines · 54 tokens per session scan A 55ef20ebd201

Subscribe to this mod's changes

pr-watch is a skill published in the GitHub repository s977043/PlanGate (2 stars, last pushed today), licensed MIT. It adds 54 tokens to every session and 2,048 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories