Agent skill

Watch CI

by sd0xdev in sd0xdev/sd0x-harness

Monitor GitHub Actions CI runs until completion. An agent skill from sd0xdev/sd0x-harness.

MITAuto-check passedDevOps & Cloud

Install Watch CI

skills CLI
$ npx skills add sd0xdev/sd0x-harness --skill watch-ci -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sd0xdev/sd0x-harness watch-ci --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sd0xdev/sd0x-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/watch-ci .claude/skills/watch-ci && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
watch-ci
GitHub stars
192
Token cost
~2.5k tokens
SKILL.md length
911 words
Files
1
Skills in repo
91
Repo updated
First seen
Licence
MIT

At a glance

Monitor GitHub Actions CI runs until completion. An agent skill from sd0xdev/sd0x-harness.

  • Works in 3 steps: Resolve Target → Find CI Runs → Verdict
  • : watching CI after push
  • SKILL.md covers Trigger, When NOT to Use, Workflow and Prohibited Actions, plus 4 more sections
  • Calls gh and git; reaches github.com

What it does

Watch CI is an agent skill from sd0xdev/sd0x-harness. Monitor GitHub Actions CI runs until completion. Use when: watching CI after push, checking build status, monitoring PR checks, waiting for CI completion, user says 'watch CI', 'check CI', 'CI status', 'monitor build', or /watch-ci. Not for: pushing code (use push-ci), creating PRs (use create-pr). Output: per-run verdict (pass/fail/timeout).

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Pull requests and CI/CD. It works with GitHub Actions. The repository describes itself as: The harness layer for Claude Code — a reference implementation of harness engineering with hook-enforced dual review, state-machine gates that survive context compaction, and… The licence is MIT.

When your agent uses it

  • : watching CI after push
  • Checking build status
  • Monitoring PR checks
  • Waiting for CI completion

Example prompts

  • “watch CI”
  • “check CI”
  • “CI status”
  • “/watch-ci”

Requirements

  • Pre-approved tools (allowed-tools): Bash(gh:*), Bash(git:*), Read, Monitor

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Resolve Target
  2. Find CI Runs
  3. Verdict

What it can do on your machine

Read from SKILL.md and the folder at commit c9a2036. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(gh:*)
    • Bash(git:*)
    • Read
    • Monitor

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Watch CI loads about 2.5k tokens when it runs. Until then it costs about 88 tokens; SKILL.md has 911 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~88
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sd0xdev/sd0x-harness at commit c9a2036, republished under its MIT licence (© sd0xdev). 911 words, ~2,502 tokens.

Download SKILL.mdSave it as .claude/skills/watch-ci/SKILL.md (or your agent's skills folder).
name
watch-ci
description
Monitor GitHub Actions CI runs until completion. Use when: watching CI after push, checking build status, monitoring PR checks, waiting for CI completion, user says 'watch CI', 'check CI', 'CI status', 'monitor build', or /watch-ci. Not for: pushing code (use push-ci), creating PRs (use create-pr). Output: per-run verdict (pass/fail/timeout).
allowed-tools
Bash(gh:*), Bash(git:*), Read, Monitor

Watch CI

Monitor GitHub Actions CI runs for the current HEAD (or a specified SHA) until completion, then report verdict.

Trigger

  • Keywords: watch CI, check CI, CI status, monitor build, build status, is CI passing, watch actions, CI result

When NOT to Use

  • Pushing code to remote (use /push-ci)
  • Creating pull requests (use /create-pr)
  • Running local tests (use /verify or /precommit)

Workflow

Auto-detect (branch + SHA) → Find matching runs → Quick-check status → Watch or Report → Verdict
Step 1: Resolve Target

Determine which CI runs to monitor. Use arguments if provided, otherwise auto-detect.

bash
BRANCH=${ARG_BRANCH:-$(git rev-parse --abbrev-ref HEAD)}
HEAD_SHA=${ARG_SHA:-$(git rev-parse HEAD)}
TIMEOUT=${ARG_TIMEOUT:-10}
INTERVAL=${ARG_INTERVAL:-30}

If --run-id <id> is specified, skip run discovery and monitor that specific run directly.

Step 2: Find CI Runs

Find runs matching the target SHA on the target branch:

bash
gh run list --branch "$BRANCH" --limit 30 \
  --json databaseId,headSha,status,name,url

Note: Use --limit 30 (not 10) to avoid missing target SHA runs on busy branches. Filter results client-side by HEAD_SHA.

Filter results to those matching HEAD_SHA.

Retry logic: If no matching runs found, retry up to 3 times by re-running the gh run list command. The natural processing delay between retries provides sufficient wait time — do not use sleep N (N ≥ 2) as the first command, the harness will block it. All retry commands must start with gh or git to match allowed-tools. CI workflows may take a few seconds to trigger after push.

If still no runs found after retries:

⚠️ No CI run detected for SHA <sha>. Possible causes:
- No workflow configured for this branch
- Path-filtered workflow didn't trigger
- Check: gh run list --branch <branch>
Step 3a: Quick Status Check

Before starting a long-running watch, check if runs are already completed:

bash
gh run view <run-id> --json status,conclusion,name,url
ResultAction
All runs completedSkip to Step 4 (Verdict) immediately — no watching needed
Some completed, some in progressReport completed verdicts, watch remaining (Step 3b)
All in progressProceed to Step 3b
Step 3b: Watch Runs

For each in-progress run, monitor with gh run watch:

bash
gh run watch <run-id> --exit-status -i "$INTERVAL"

Poll interval: $INTERVAL defaults to 30 seconds (configurable via --interval). gh's own default is 3 seconds; at that rate, Monitor streaming surfaces ~20 notifications per minute, which has been reported as noisy. 30 seconds reduces poll noise by ~90% at the cost of ≤ 27 s additional completion-detection lag, which is negligible for typical multi-minute CI runs. Pass --interval 3 to restore the old cadence when near-real-time feedback matters.

Execution mode: Monitor streaming is the default — non-blocking, reliable notifications for each status line.

ModeWhenBehavior
Monitor (default)No mode flagStream gh run watch via Monitor tool. Each stdout line arrives as a notification. Claude processes verdict on completion. Non-blocking.
Foreground (--blocking)--blocking flag passedExecute gh run watch inline (blocking). Claude waits for completion, then reports verdict. Use when Monitor is unavailable or for simple single-run cases.
Background (--background)--background flag passedLaunch with Bash(run_in_background: true). Legacy fallback only — run_in_background delivers a single completion event, not streaming progress, so Monitor is preferred for rich updates. Provide a manual check command.

Monitor mode (default) — behavior:

  1. Launch gh run watch <run-id> --exit-status -i "$INTERVAL" via Monitor tool with description: "CI run <run-id> (<name>)" and timeout_ms: TIMEOUT * 60 * 1000
  2. Each stdout line (status update) arrives as a streaming notification — $INTERVAL controls how often those lines fire
  3. On exit (run completes or fails), parse final output for pass/fail status
  4. Report verdict

Foreground mode (--blocking) — behavior:

  1. Execute gh run watch <run-id> --exit-status -i "$INTERVAL" inline via Bash
  2. Wait for completion (blocking) — $INTERVAL only affects how often gh polls the API, not wall-clock completion
  3. Parse output for pass/fail status
  4. Report verdict

Background mode (--background) — legacy fallback only:

Show full SKILL.md (361 more words)Show less
  1. Quick-check (Step 3a) first — if already completed, report immediately and skip background
  2. If still running, launch gh run watch <run-id> --exit-status -i "$INTERVAL" with Bash(run_in_background: true); $INTERVAL still applies (same gh call), but because background mode only surfaces a single completion event, poll cadence has no user-visible effect here
  3. Inform the user honestly: "CI monitoring launched in background for run <id>. Background notifications may not auto-report reliably. To check manually: gh run view <id> or re-run /watch-ci"
  4. Do NOT promise streaming progress updates — Bash(run_in_background: true) only delivers a single completion event, not per-status-line streaming; for rich updates, use Monitor mode

Multiple runs: If multiple workflow runs match (e.g. CI + Auto Release), launch parallel Monitor instances — one per run. Each Monitor reports its own per-run verdict via notifications. Overall verdict = worst individual result (any fail → overall fail). In --blocking mode, watch sequentially. In --background mode, launch each as a separate background task.

Timeout enforcement: Default 10 minutes (configurable via --timeout). In Monitor mode, set timeout_ms: TIMEOUT * 60 * 1000 (Monitor tool enforces deadline). In --blocking mode, enforce via Bash tool's timeout parameter (milliseconds). If a timeout occurs, report the run as timed out. Timeout applies per individual run invocation, not to the entire monitoring session.

Step 4: Verdict
CI ResultOutput
All pass"✅ CI passed" + per-run URLs
Any failFailing jobs + gh run view <id> --log-failed summary
Timeout"⚠️ CI still running after <N>min — gh run watch <id>"

Overall verdict = worst individual result (any fail → overall fail).

Prohibited Actions

❌ Running `gh run view` once and treating that as "monitoring" — one-shot status check is NOT watching
❌ Promising per-status-line streaming updates in background mode — `Bash(run_in_background: true)` only delivers a single completion event; use Monitor for rich streaming
❌ Skipping the quick-check step (Step 3a) — always check status before deciding to watch
❌ Reporting "CI monitoring started" without actually launching `gh run watch`
❌ Using `gh run list` results as the final verdict — list shows status at query time, not completion
❌ Using `sleep N` (N ≥ 2) as the first Bash command — harness blocks it; retry by re-running `gh run list` directly
❌ Using commands outside `allowed-tools` (only `gh`, `git`, `Read`, and `Monitor` are permitted)
❌ Using `Bash(run_in_background: true)` when Monitor is available — Monitor is the preferred streaming mechanism

Arguments

ArgumentDescriptionDefault
--sha <sha>SHA to monitorgit rev-parse HEAD
--branch <branch>Branch to filter runsgit rev-parse --abbrev-ref HEAD
--timeout <min>Watch timeout in minutes10
--interval <sec>Poll interval for gh run watch -i — controls how often gh queries the API and emits a status line (Monitor mode surfaces each line as one notification)30
--run-id <id>Monitor a specific run ID directlyauto-detect
--blockingUse foreground blocking mode instead of Monitor streamingMonitor
--backgroundLegacy fallback: launch in background (unreliable auto-reporting)Monitor

Output

markdown
## CI Monitor Report

**Branch**: `<branch>`
**SHA**: `<sha>`

| Run | Name | Status | URL |
|-----|------|--------|-----|
| 123 | CI | ✅ Pass | https://github.com/.../runs/123 |
| 124 | Auto Release | ✅ Pass | https://github.com/.../runs/124 |

## Verdict: ✅ All Pass / ⛔ N failures

Verification

  • Target SHA resolved (from argument or auto-detect)
  • CI runs matched by SHA (not "latest")
  • All matching runs monitored
  • Verdict reported (pass/fail/timeout)

Examples

Input: /watch-ci
Action: Auto-detect HEAD SHA → find matching runs → quick-check status
  If completed → report verdict immediately
  If still running → launch Monitor stream per run → receive status notifications → report verdict on completion

Input: /watch-ci --sha abc1234
Action: Find runs for SHA → quick-check → Monitor stream if needed → verdict

Input: /watch-ci --run-id 12345678
Action: Quick-check run 12345678 → Monitor stream if still running → verdict

Input: /watch-ci --blocking
Action: Auto-detect → find runs → quick-check
  If completed → report immediately
  If still running → foreground watch (blocking) → wait → report verdict

Input: /watch-ci --background
Action: Auto-detect → find runs → quick-check
  If completed → report immediately (no background needed)
  If still running → launch background watch (legacy) → "CI monitoring launched, check manually with `gh run view <id>`"

Input: Is CI passing?
Action: Auto-detect → find runs → quick-check → Monitor stream if needed → verdict

© sd0xdev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/watch-ci of sd0xdev/sd0x-harness.

Open the folder on GitHubat commit c9a2036

Compare with similar skills

Watch CI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Watch CI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Watch CI this skillsd0xdev/sd0x-harness192—~2.5kAutomated safety check: PassMIT
GitHub Workflow AutomationFNOSP/FlyNarwhal4957 repos~5.4kAutomated safety check: PassAGPL-3.0
CIaiblueprinthq/ai-blueprint458—~2.2kAutomated safety check: PassMIT
CI Adhoc Testnubjs/nub4.4k—~1.7kAutomated safety check: PassMIT
CI Watchnubjs/nub4.4k—~2.2kAutomated safety check: PassMIT
Michel Monitor Pull Request GitHub ActionsPackmindHub/packmind317—~2.6kAutomated safety check: PassApache-2.0

Similar skills

  • Automate GitHub workflows with AI assistance. An agent skill from FNOSP/FlyNarwhal.

    495 GitHub starsUsed in 7 repos~5.4k tokens
    DevOps & CloudAuto-check passed
  • CI

    aiblueprinthq/ai-blueprint

    Set up or normalize one project Verify command and matching GitHub Actions checks while preserving existing CI, with an optional local pre-push hook.

    458 GitHub stars~2.2k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • CI Adhoc Test

    nubjs/nub

    Run ad-hoc / exploratory tests on a real OS or platform via CI when the behavior CANNOT be reproduced on the local host or in Docker — macOS Seatbelt / sandbox-exec / codesigning, Windows cmd.exe /…

    4.4k GitHub stars~1.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • CI Watch

    nubjs/nub

    Watch GitHub Actions CI correctly with the gh CLI — block until a run / PR check rollup is TRULY terminal, then trust the exit code.

    4.4k GitHub stars~2.2k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Diagnose a failed, stuck, or never-triggered CI run on a GitHub PR, apply a local fix if possible, push it, and document the result in a single running PR comment.

    317 GitHub stars~2.6k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • CI

    openJiuwen-ai/sciencediscovery

    Read, diagnose, and change the CI pipeline: GitHub Actions on pull requests, the nightly schedule and the release tag.

    148 GitHub stars~2.2k tokensUpdated 6 days ago
    DevOps & CloudAuto-check passed

More from sd0xdev/sd0x-harness

All 91 skills in this repo
  • Adr

    sd0xdev/sd0x-harness

    Write an Architecture Decision Record (ADR) for a feature — Context / Decision / Status / Consequences / Alternatives, filed as docs/features/<feature/adr-<NNN-<title.md with a 3-digit zero-padded…

    192 GitHub stars~4.8k tokensUpdated yesterday
    Auto-check passed
  • Load PR Review

    sd0xdev/sd0x-harness

    Load GitHub PR review comments into AI session — analyze, triage, plan.

    192 GitHub stars~4.4k tokensUpdated yesterday
    Auto-check passed
  • Next Step

    sd0xdev/sd0x-harness

    Change-aware next step advisor. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Obsidian CLI

    sd0xdev/sd0x-harness

    Obsidian vault integration via official CLI. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Orchestrate

    sd0xdev/sd0x-harness

    Agent-driven workflow orchestration (v1 report-only). An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • PR Comment

    sd0xdev/sd0x-harness

    Post friendly review comments to a GitHub PR — prepare locally, preview, then submit as atomic review.

    192 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Watch CI

What does Watch CI do?

Monitor GitHub Actions CI runs until completion. An agent skill from sd0xdev/sd0x-harness. Watch CI is an agent skill from sd0xdev/sd0x-harness. Monitor GitHub Actions CI runs until completion.

When should I use Watch CI?

Watch CI fits situations like: : watching CI after push; checking build status; monitoring PR checks; waiting for CI completion.

How do I install Watch CI in Claude Code?

Run `npx skills add sd0xdev/sd0x-harness --skill watch-ci -a claude-code`. Or copy the skill folder (skills/watch-ci in sd0xdev/sd0x-harness) into .claude/skills/watch-ci in your project. Claude Code loads it when a task matches its description.

How do I install Watch CI in Codex?

Run `npx skills add sd0xdev/sd0x-harness --skill watch-ci -a codex`. Or copy the skill folder (skills/watch-ci in sd0xdev/sd0x-harness) into .agents/skills/watch-ci in your project. Codex loads it when a task matches its description.

Can I use Watch CI in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sd0xdev/sd0x-harness --skill watch-ci -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/watch-ci, .gemini/skills/watch-ci, .github/skills/watch-ci and .opencode/skills/watch-ci in your project.

What does Watch CI need to run?

Going by SKILL.md and its folder, Watch CI needs the command-line tools its instructions call (gh and git). Its frontmatter pre-approves these tools: Bash(gh:*), Bash(git:*), Read, Monitor.

Does Watch CI access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Watch CI safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Watch CI use?

Watch CI is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Watch CI use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Watch CI?

Skills that share tags, products or a category with Watch CI: GitHub Workflow Automation (FNOSP/FlyNarwhal, 495 stars), CI (aiblueprinthq/ai-blueprint, 458 stars), CI Adhoc Test (nubjs/nub, 4.4k stars) and CI Watch (nubjs/nub, 4.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Watch CI?

sd0xdev (a GitHub user) maintains it in sd0xdev/sd0x-harness, which has 192 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on October 6, 2026.

Source: sd0xdev/sd0x-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.