poll-ci

poll-ci is a command for Claude Code from oalders/kitchen-sink. It costs 21 tokens per session (851 once invoked), scanned A, original, MIT.

A command that checks the latest GitHub Actions CI run for the current Git branch. CI is the automated process that builds and tests code after changes.

In plain words
What is it for?
Use it to find the newest branch run with GitHub's gh command-line tool, report its status, and wait for a matching run when requested.
Why use it?
It gives a clear pass, failure, or still-running result when the project's dedicated CI-monitoring command is unavailable. It also checks whether the run belongs to the current commit.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the kitchen-sink plugin — 9 skills, 20 commands, 12 hooks shipped together

Good fit Use it to find the newest branch run with GitHub's gh command-line tool, report its status, and wait for a matching run when requested.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/oalders/kitchen-sink/poll-ci
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.

Clone the repo
git clone --depth 1 https://github.com/oalders/kitchen-sink

Made for: Claude Code.

Or install kitchen-sink, the plugin that ships this one along with the rest of its 9 skills, 20 commands, 12 hooks.

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 poll-ci

README.md
[![agentmods](https://agentmods.dev/badge/commands/oalders/kitchen-sink/poll-ci.svg)](https://agentmods.dev/commands/oalders/kitchen-sink/poll-ci)
Your own site
<a href="https://agentmods.dev/commands/oalders/kitchen-sink/poll-ci"><img src="https://agentmods.dev/badge/commands/oalders/kitchen-sink/poll-ci.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 851 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.00021 $0.00851
Opus 5 $0.00010 $0.00426
Sonnet 5 $0.00004 $0.00170
Haiku 4.5 $0.00002 $0.00085

Measured 8d ago against content hash 47c5fffab1df, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

poll-ci 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 8d 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.

commands/poll-ci.md · 46 lines

What it actually says

Poll the status of the current branch's CI run and report back when it finishes.

Use this as a fallback for monitoring CI when a /monitor-ci command is not present in the environment. If /monitor-ci is available, prefer it — it is purpose-built for this project. poll-ci is the generic, gh-based fallback.

Steps:

  1. Determine the current branch:

    git rev-parse --abbrev-ref HEAD
    
  2. Find the most recent CI run for that branch (<branch> is the value from step 1):

    gh run list --branch "<branch>" --limit 1 \
      --json databaseId,status,conclusion,workflowName,headSha,url
    
    • If no runs are found, tell the user no CI run exists for the branch yet (CI may not have started, or the branch may not be pushed). Suggest git push if the branch has no remote counterpart, then stop.
    • If the latest run's headSha does not match git rev-parse HEAD, warn the user that the newest commit has not triggered a run yet, and ask whether to poll the existing run or wait. If they choose to wait, re-run this gh run list command every ~20 seconds (capped at ~30 minutes, as in step 3) until a run whose headSha matches the current HEAD appears, then poll that run.
  3. Poll until the run completes. Prefer gh run watch, which blocks until the run finishes:

    gh run watch <databaseId> --exit-status
    
    • --exit-status makes the command exit non-zero if the run fails, so you can branch on the result.
    • gh run watch streams per-job progress to the terminal on its own, so no extra status reporting is needed on that path.
    • If gh run watch is unavailable or you need finer control, poll manually instead: re-run the gh run list command from step 2 every ~20 seconds until status is completed, reporting queued -> in_progress -> completed transitions as they happen. Cap polling at a sensible limit (e.g. 30 minutes) and stop with a timeout message if exceeded.
  4. Report the final status to the user:

    • Passconclusion is success. State that CI passed and include the run URL. Treat skipped and neutral as non-failing outcomes too: report success but note the qualifier.
    • Failconclusion is failure, cancelled, timed_out, startup_failure, or stale. State that CI failed, include the run URL, and surface the failing jobs:
      gh run view <databaseId> --json jobs \
        -q '.jobs[] | select(.conclusion != "success") | .name'
      
      Offer to show failing logs with gh run view <databaseId> --log-failed.
    • Needs attentionconclusion is action_required (e.g. a job awaiting manual approval). This is not a failure; report that the run is paused pending action and include the run URL so the user can approve or investigate.
    • In progress — only if polling was stopped early (timeout or user interrupt). Report the current status and the run URL so the user can resume checking.
    • Any other conclusion — report the raw value verbatim along with the run URL rather than guessing, so no terminal state is silently swallowed.

Notes:

  • Operate on the current branch's CI; do not switch branches.
  • On the manual-polling path, report status changes as they happen rather than only at the end, so the user has visibility into long-running pipelines.
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. 8d ago First seen · 46 lines · 21 tokens per session scan A 47c5fffab1df

Subscribe to this mod's changes

poll-ci is a command published in the GitHub repository oalders/kitchen-sink (4 stars, last pushed 8d ago), licensed MIT. It adds 21 tokens to every session and 851 once invoked, about $0.0001 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.