# Monitor CI

> Monitor GitHub Actions for an existing PR or pushed branch until CI is passing, pending/not_ready, or blocked. Use for "watch CI", "monitor GitHub Actions", "watch checks", "monitor this PR's Actions", or CI handoff from monitor. Do not use to open PRs or independently repair CI; in monitor gated-trigger mode, return actionable failure evidence so monitor can repair before another empty `#CI` trigger commit.

- Skill: `willakins/monitor-ci` (Agent Skill, multi-file: 9 files)
- Install (CLI): `npx skillmds@latest add willakins/monitor-ci`
- Raw SKILL.md: https://api.skillmd.com/api/skills/willakins/monitor-ci/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: willakins (https://skillmd.com/u/willakins)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/willakins/monitor-ci

---


# Monitor CI

**UTILITY SKILL. INVOKES:** `gh`; `fix-pr-until-green` only when repair is authorized and the caller did not require gated-trigger/Codex-before-CI behavior.

Read [monitoring policy](references/monitoring-policy.md) before polling, cancelling, rerunning, or classifying failures.

## USE FOR:

- Watching Actions on an existing PR.
- Monitoring an already-pushed branch.
- Reporting CI as `passing`, `pending`, `not_ready`, or `blocked`.

## DO NOT USE FOR:

- Opening or refreshing a PR.
- Fixing CI without repair authorization.
- Cancelling or rerunning Actions without authorization.

## Workflow

1. Resolve the PR or pushed branch. Prefer a provided PR; otherwise use the current branch PR, then branch runs.
2. Capture remote head SHA and report unpushed commits.
3. Inspect checks with `gh pr checks`, `gh pr view`, `gh run list`, and `gh run view`.
4. Poll bounded sleeps. Pending stays pending; unchanged red required checks, including unrelated or locally reproducible failures outside the watched branch, stay `not_ready` while watching can continue.
5. With repair authorization and no gated-trigger requirement, delegate actionable branch-caused failures to `fix-pr-until-green`. In monitor gated-trigger mode, return the failing check, logs, URLs, and actionable files instead of committing repairs.
6. If repair changes the head, capture the new SHA and restart.

## Troubleshooting

- Missing tools, auth, status, logs, permissions, or required judgment is `blocked`.
- Shards running 30 minutes follow the reference policy.

## Examples

- PR or branch watch -> monitor checks.
- "Commit and monitor" -> top-level `monitor` passes repair context.

## Output

Return target, monitored head SHA, CI state, failing checks and URLs, repair status, and latest head SHA if changed.

