watch-commit

watch-commit is a skill for Claude Code, Codex from justincampbell/gh-watch. It costs 48 tokens per session (739 once invoked), scanned A, original, MIT.

A command that watches a GitHub commit's automated checks and reports when they pass or fail. GitHub checks are automated builds and tests that run after code changes.

In plain words
What is it for?
Use it to monitor a commit by its ID or GitHub URL, wait for all checks to finish, and optionally stop only when they pass.
Why use it?
It saves you from repeatedly refreshing GitHub while waiting for a build or test run to finish.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/justincampbell/gh-watch/watch-commit
Any agent
npx skills add justincampbell/gh-watch --skill watch-commit
Clone the repo
git clone --depth 1 https://github.com/justincampbell/gh-watch

Made for: Claude Code, Codex.

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 watch-commit

README.md
[![agentmods](https://agentmods.dev/badge/skills/justincampbell/gh-watch/watch-commit.svg)](https://agentmods.dev/skills/justincampbell/gh-watch/watch-commit)
Your own site
<a href="https://agentmods.dev/skills/justincampbell/gh-watch/watch-commit"><img src="https://agentmods.dev/badge/skills/justincampbell/gh-watch/watch-commit.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 739 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00048 $0.00739
Opus 5 $0.00024 $0.00369
Sonnet 5 $0.00010 $0.00148
Haiku 4.5 $0.00005 $0.00074

Measured 4d ago against content hash 7248ed4cf6e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

watch-commit 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 4d 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.

plugin/skills/watch-commit/SKILL.md · 81 lines

How it starts

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

Watch a Commit

Monitor a commit's CI checks for state changes using the gh watch CLI extension. It polls GitHub and emits one JSON event per line to stdout, which makes it a natural fit for the Monitor tool — each event arrives in the conversation as a notification. Exits automatically when all checks complete.

Prerequisites

Check if the extension is installed:

gh watch --help

If not installed:

gh extension install justincampbell/gh-watch

Usage

Run with the Monitor tool (not Bash with run_in_background). The first notification is the initial-state snapshot; the next is the terminal ci-passed or ci-failed, after which gh-watch exits.

Watch a commit by SHA (current repo):

  • command: gh watch commit $ARGUMENTS
  • description: Commit $ARGUMENTS CI status
  • persistent: false
  • timeout_ms: 1800000 (30 min — raise for slow CI)

Watch a commit by GitHub URL:

  • command: gh watch commit https://github.com/owner/repo/commit/abc1234

Exit only if CI passes (use --exit-on to ignore failures):

  • command: gh watch commit $ARGUMENTS --exit-on ci-passed

Flags

Flag Description Default
--interval <duration> Polling interval 60s
--exit Exit after any state change false
--exit-on <events> Exit after specific event types (comma-separated)

Event types

Event Description
initial-state Snapshot of commit CI state at the moment watching started (always emitted first)
ci-passed All CI checks passed (terminal — always exits)
ci-failed CI failed (at least one check failed) (terminal — always exits)

Output format

One JSON object per line on stdout. The first line is always initial-state — a snapshot of the commit's CI at the moment watching began:

{"timestamp":"...","event":"initial-state","summary":"Commit abc1234: Message — CI: 3/5 passed, 2 pending","details":{"sha":"abc1234...","checks":5,"passed":3,"failed":0,"pending":2}}

Read the full file on GitHub · 81 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. 4d ago First seen · 81 lines · 48 tokens per session scan A 7248ed4cf6e0

Subscribe to this mod's changes

watch-commit is a skill published in the GitHub repository justincampbell/gh-watch (4 stars, last pushed 16d ago), licensed MIT. It adds 48 tokens to every session and 739 once invoked, about $0.0002 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-08-31.