Wait for CI
Sequencing Checklist
Block until all GitHub Actions CI checks pass or fail on the current PR.
Prerequisites
IMPORTANT: Check every prerequisite below BEFORE doing any work. If any check fails, stop immediately, tell the user which prerequisite is not met, and ask them to fix it. Do NOT proceed, improvise, or attempt workarounds.
- The
gh CLI must be installed and authenticated (gh auth status must succeed)
- You must be on a branch with an open PR (
gh pr view must succeed)
Usage
Run this single blocking command:
gh pr checks --watch --fail-fast
- Blocks until all checks complete
- Exits 0 if all checks pass
- Exits non-zero and stops early (
--fail-fast) if any check fails
When no checks are reported
If gh pr checks returns immediately with "no checks reported", CI hasn't started yet. Wait briefly and retry:
sleep 30 && gh pr checks --watch --fail-fast
If after 2 retries (~1 minute) there are still no checks, diagnose:
- Merge conflicts — resolve them, push, then retry the wait.
- No matching workflow triggers — confirm the repo's
.github/workflows/ files actually trigger on this PR's conditions (push, pull_request, path filters, etc.). If nothing should trigger, CI can be considered green.
- GitHub outage — check https://www.githubstatus.com. If GitHub Actions is degraded, let the user know and bail out.
Integrating into your workflow
This skill is designed to be invoked after pushing commits to a PR, so that Claude can block and wait for the result before proceeding. Typical sequence:
- Make changes and commit
- Push to the PR branch
- Invoke
/wait-for-ci
- If CI passes, continue with next steps (e.g. merge, deploy)
- If CI fails, read the failing check logs with
gh run view <run-id> --log-failed and fix
1---2name: wait-for-ci3description: Block until CI passes or fails on the current PR. Use this skill every time you push a commit and intend to tell the user the work is done — never present a pushed commit as complete without first confirming CI is green. Also use it when waiting on CI before merging, deploying, or moving on to the next task in a multi-step plan.4---56# Wait for CI78## Sequencing Checklist910- [ ] Verify prerequisites (`gh auth status`, branch has an open PR)11- [ ] Run `gh pr checks --watch --fail-fast`12- [ ] If no checks reported, wait 30s and retry (up to 2 retries)13- [ ] If still no checks, diagnose (merge conflicts, no matching workflows, GitHub outage)14- [ ] If CI fails, read failing check logs (`gh run view <run-id> --log-failed`) and fix15- [ ] Report result: CI passed, CI failed (with details), or no checks expected1617Block until all GitHub Actions CI checks pass or fail on the current PR.1819## Prerequisites2021**IMPORTANT: Check every prerequisite below BEFORE doing any work. If any check fails, stop immediately, tell the user which prerequisite is not met, and ask them to fix it. Do NOT proceed, improvise, or attempt workarounds.**2223- The `gh` CLI must be installed and authenticated (`gh auth status` must succeed)24- You must be on a branch with an open PR (`gh pr view` must succeed)2526## Usage2728Run this single blocking command:2930```bash31gh pr checks --watch --fail-fast32```3334- Blocks until all checks complete35- Exits 0 if all checks pass36- Exits non-zero and stops early (`--fail-fast`) if any check fails3738## When no checks are reported3940If `gh pr checks` returns immediately with "no checks reported", CI hasn't started yet. Wait briefly and retry:4142```bash43sleep 30 && gh pr checks --watch --fail-fast44```4546If after 2 retries (~1 minute) there are still no checks, diagnose:47481. **Merge conflicts** — resolve them, push, then retry the wait.492. **No matching workflow triggers** — confirm the repo's `.github/workflows/` files actually trigger on this PR's conditions (`push`, `pull_request`, path filters, etc.). If nothing should trigger, CI can be considered green.503. **GitHub outage** — check https://www.githubstatus.com. If GitHub Actions is degraded, let the user know and bail out.5152## Integrating into your workflow5354This skill is designed to be invoked after pushing commits to a PR, so that Claude can block and wait for the result before proceeding. Typical sequence:55561. Make changes and commit572. Push to the PR branch583. Invoke `/wait-for-ci`594. If CI passes, continue with next steps (e.g. merge, deploy)605. If CI fails, read the failing check logs with `gh run view <run-id> --log-failed` and fix