ci-watch
Skill4 starsChanged 7 months agoMITView on GitHub
Use when watching CI/CD checks complete — `gh pr checks`, `gh run watch`, polling PR conclusion, waiting for builds to finish before merge. Triggers: 'watch CI', 'wait for build', 'poll PR', 'check CI status', 'is the build done', '/ci-watch'.
In this repository124 other files it gives its agents.
- apple-contactsSkill
- atlassian-cli-jiraSkill
- bellardSkill
- brainstormingSkill
- career-interviewSkill
- carmackSkill
- cavecrewSkill
- caveman-commitSkill
- caveman-compressSkill
- caveman-helpSkill
- caveman-reviewSkill
- cavemanSkill
- caveman-statsSkill
- clone-configSkill
- cloudflare-emailSkill
- course-correctSkill
- datastar-patternsSkill
- datastarSkill
- datastar-taoSkill
- defuddleSkill
- description-linterSkill
- deterministic-simulation-testingSkill
- dispatching-parallel-agentsSkill
- dopplerSkill
- dx-auditSkill
- evolution-changelogSkill
- evolution-engineSkill
- executing-plansSkill
- farleySkill
- finishing-a-bones-leafSkill
- frontend-component-decision-treesSkill
- gh-project-charterSkill
- gh-project-operationsSkill
- gh-project-setupSkill
- gh-project-sharedSkill
- goal-completeSkill
- golang-patternsSkill
- hellandSkill
- hickeySkill
- hippSkill
- investigating-agent-sessionsSkill
- landingSkill
- linear-cliSkill
- linear-methodSkill
- memorizeSkill
- midscene-testingSkill
- monitoring-the-operatorSkill
- normanSkill
- obsidian-basesSkill
- obsidian-canvasSkill
- obsidian-markdownSkill
- orchestrator-modeSkill
- orchestrator-suitSkill
- ousterhoutSkill
- pikchr-generatorSkill
- pocock-cavemanSkill
- pocock-diagnoseSkill
- pocock-git-guardrailsSkill
- pocock-handoffSkill
- pocock-setup-pre-commitSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
Use this for polling. It's cheap (one HTTP call), it's stable (no streaming connection to keep alive), and the exit code is the answer.
- Very specific: line 42
Prefer the non-watch form inside a poll loop — --watch ties up the shell and doesn't compose with ScheduleWakeup.
- Very specific: line 46
When you have a specific run ID (from gh run list or returned by a workflow trigger), gh run watch blocks until the run finishes and …
- Very specific: line 56
When you don't have a run ID (PR-level checks, multi-workflow), poll gh pr checks on a cadence.
- Distinctive: line 60
Never poll at 300s — pay the cache miss without amortizing
- Distinctive: line 106
Don't report "CI is still running" repeatedly.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ci-watch: Watching CI to Completion
CI is the canonical "external event you're waiting on" — pair this skill with the wait-watch mode for cadence rules. This skill covers the mechanics: which gh command for which situation, how to read exit codes, how to tell a real failure from a flake.
Surface
gh pr checks <PR> — rolling status
Returns the current state of every check on a PR. Exit codes carry the verdict:
- 0 — all checks passed
- 1 — at least one check failed
- 8 — checks still pending
Use this for polling. It's cheap (one HTTP call), it's stable (no streaming connection to keep alive), and the exit code is the answer.
gh pr checks 168 # human-readable
gh pr checks 168 --watch # blocks, prints updates as checks resolvePrefer the non-watch form inside a poll loop — --watch ties up the shell and doesn't compose with ScheduleWakeup.
gh run watch <run-id> --exit-status — block to completion
When you have a specific run ID (from gh run list or returned by a workflow trigger), gh run watch blocks until the run finishes and returns 0 on success / non-zero on failure. Right for "I just kicked off this run, wake me when it's done":
gh run watch 12345678 --exit-statusPair with Bash run_in_background: true so the wait doesn't burn the foreground turn.
Polling without gh run watch
When you don't have a run ID (PR-level checks, multi-workflow), poll gh pr checks on a cadence. Defer to the wait-watch mode's cadence rules:
- Build expected within ~5 min → poll every 60–270s
- Idle / unknown completion time → poll every 1200–1800s
- Never poll at 300s — pay the cache miss without amortizing
until gh pr checks 168 --required; do sleep 270; done(Run this via Monitor so each check turns into a notification, not a foreground block.)
Distinguishing flakes from real failures
Red checks aren't all the same. Before declaring a PR broken, look for the failure shape:
gh run view <run-id> --log-failed | tail -200Flakes look like:
npm ERR! network/ETIMEDOUTagainst the registry- Runner provisioning errors (
Error: The runner has received a shutdown signal) connection refusedagainst an external service- Action-version-not-found (registry hiccup)
Real failures look like:
- Test assertions
- Type errors / lint errors
- Build / compile failures
- Missing files
For a flake, gh run rerun <run-id> and re-poll. Wait at least 30 seconds after a rerun before polling — the new run needs time to register, and a too-fast poll will read the old (failed) status and falsely report still-broken.
Gating actions on green CI
Surface these separately from the watch loop — they're "what to do once it's green", not "how to wait":
gh pr ready <PR>— flip draft to ready for reviewgh pr merge <PR> --merge --delete-branch— merge and clean up the branch in one shot. Add--autoto queue the merge for whenever CI goes green.
The --delete-branch flag deletes the remote branch on merge; combine with git branch -d <name> locally and git fetch --prune to clear the stale ref.
Reporting
When CI completes:
- Pass: one line — "PR #168 green (7/7 checks)" — and proceed to the gating action.
- Fail (real): summarize which check failed and the failure mode. Don't dump the whole log.
- Fail (flake suspected): name the flake pattern, rerun, set the next check-back per cadence rules.
Don't report "CI is still running" repeatedly. The user knows; the polling cadence is the report.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

