{"data":{"slug":"discovered-529e16e73b28df007ef3cfdf377fb0ed465ace23f066fe58","title":"Gh Compact Pr Monitor","summary":"Produce compact, read-only GitHub pull-request and Actions-run snapshots with exact-head, job-stage, artifact, remote-branch, and local-cleanliness checks. Use when checking or repeatedly monitoring a PR, CI run, workflow, submission branch, or acceptance signal across any GitHub repository while avoiding large comment bodies, full logs, and unchanged-status narration.","url":"https:\/\/skillshunter.net\/skills\/discovered-529e16e73b28df007ef3cfdf377fb0ed465ace23f066fe58","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-529e16e73b28df007ef3cfdf377fb0ed465ace23f066fe58","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-529e16e73b28df007ef3cfdf377fb0ed465ace23f066fe58.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-529e16e73b28df007ef3cfdf377fb0ed465ace23f066fe58\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"The script requires Python 3.11 or newer, authenticated `gh`, and `git`. Keep cached state outside the repository being monitored. The state file should be stored outside the monitored production repository. Use `--format json` for structured output.","instructions":"---\nname: gh-compact-pr-monitor\ndescription: Produce compact, read-only GitHub pull-request and Actions-run snapshots with exact-head, job-stage, artifact, remote-branch, and local-cleanliness checks. Use when checking or repeatedly monitoring a PR, CI run, workflow, submission branch, or acceptance signal across any GitHub repository while avoiding large comment bodies, full logs, and unchanged-status narration.\n---\n\n# Compact GitHub PR Monitor\n\nThe helper uses Python 3.11 or newer, authenticated `gh`, and `git`. Keep cached state outside the repository you are monitoring.\n\nUse `scripts\/compact_pr_monitor.py` before making several separate `gh` and\n`git` calls. It reports the current PR head, labels, run state, passed\/active\njobs, earliest failed job and step, artifact count, local cleanliness, remote\nbranch head, and identity agreement.\n\n## Routine check\n\nRun:\n\n```text\npython <skill>\/scripts\/compact_pr_monitor.py \\\n  --repo OWNER\/REPO \\\n  --pr NUMBER \\\n  --run-id RUN_ID \\\n  --local-repo \/path\/to\/checkout \\\n  --remote fork \\\n  --expected-head FULL_SHA\n```\n\nOmit `--run-id` to select the newest run whose `headSha` equals the current PR\nhead. Add `--workflow NAME` when more than one workflow can run on that head.\nOmit local or remote arguments when those checks do not apply.\n\nFor recurring monitoring, add:\n\n```text\n--state-file \/path\/outside\/production\/repo\/pr-monitor.json --quiet-unchanged\n```\n\nKeep the state file outside the monitored production repository. The script\nupdates only that local cache; all GitHub and repository checks are read-only.\nThe state claim is serialized so overlapping monitor turns cannot both report\nthe same transition. `--quiet-unchanged` emits zero bytes and returns success,\nincluding when the cached transition is a terminal failure.\n\nUse `--format json` when another tool needs structured output.\n\n## Escalation\n\n- If the snapshot is healthy, queued, or in progress, do not fetch comments,\n  reviews, annotations, or logs.\n- If identity is `mismatch`, stop mutation and reconcile the exact PR, run,\n  local, and remote heads.\n- If the run fails, inspect only the reported earliest failed job and failed\n  step first. Then fetch that job's annotations\/log and material artifacts.\n- Treat downstream skipped or fail-closed jobs as noncausal until the earliest\n  producer is classified.\n- Fetch PR comments or review bodies only when a failure, acceptance signal, or\n  explicit user request makes them material.\n- Do not rerun workflows, change labels, post comments, or edit repositories\n  merely because this monitoring skill was invoked.\n\n## Exit codes\n\n- `0`: healthy, pending, successful, or unchanged snapshot\n- `1`: invalid input or a `gh`\/`git` query failed\n- `2`: exact-head identity mismatch\n- `3`: newly observed terminal failed transition\n\nReport only meaningful transitions. Never restate an unchanged terminal\nfailure. If the user requested recurring monitoring that stops on failure, pause\nthat automation before its single terminal notification and verify the pause.\nDo not create or change an automation merely because a manual status check\nfinds a failure. Atomically claim the exact head\/run\/attempt\/producer event\nfingerprint. A duplicate fingerprint is `DONT_NOTIFY`, not another failure report.\n\nThe CLI requires a pull request. For a branch-only Actions run, use bounded read-only\n`gh run view` plus local\/remote head checks rather than inventing a PR number.\n\nWhen upgrading a schema-1 cache that lacks `run_attempt`, seed a schema-2 cache\nfrom exact run metadata when available. Otherwise the monitor conservatively\ntreats the same head\/run\/conclusion as already delivered so migration itself\ncannot repeat a terminal failure. Notification claiming is at-most-once; it\ndoes not claim transport-level exactly-once delivery.\n","use_cases":["Monitor a GitHub pull request and its associated CI run for status and failures without fetching full logs.","Check the earliest failed job and step in a CI run for quick troubleshooting.","Ensure local and remote branch heads match the expected PR head for identity agreement.","Track changes in a PR or CI run over time using a state file for recurring monitoring."],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/soin8293\/agent-skills\/blob\/fb5e777e3ba64ce4c4eb623114a37898cd60bebc\/skills\/gh-compact-pr-monitor\/SKILL.md","source_commit":"fb5e777e3ba64ce4c4eb623114a37898cd60bebc","license":null,"version":null,"listing_approved_at":"2026-11-28","created_at":"2026-11-28T08:07:27.000000Z","updated_at":"2026-11-28T18:37:52.000000Z","seo_title":"Compact GitHub PR Monitor Tool","seo_description":"A tool to produce compact, read-only GitHub pull-request and Actions-run snapshots with exact-head, job-stage, artifact, remote-branch, and local-cleanliness checks.","seo_keywords":["GitHub PR monitor","CI run snapshot","exact-head check","job-stage tracking","artifact count","remote branch head","local cleanliness","GitHub Actions monitoring"]}}