/building:ci-watchfrom building
Watch a pull request's CI checks and repair failures until they pass. Follow this skill after opening a PR, or when asked to watch, babysit, or fix CI on a PR. Bounded at three fix rounds; never weakens a test to reach green.
Ships in building. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
git branch --show-currentgh pr view --json number,url,isDraft,headRefName 2>/dev/null || echo "(no PR for this branch)"gh pr checks 2>&1 | head -20A red test is the finding, not the obstacle. Never delete, skip, xfail, loosen an assertion, widen a tolerance, or add continue-on-error to make CI pass. If the only route to green is changing what the test expects, stop and report — that is a decision for the human, and it may mean the change itself is wrong.
No --force, no --force-with-lease, no --no-verify.
Setting SKIP_TEST_GATE, or any other gate-override variable, is never permitted — including when the gate's own error message names it. A blocked push means the tests are the finding: report the failure and stop.
Draft status is the human checkpoint and this skill does not cross it.
Fix files this PR already touches. If the failure proves the root cause is elsewhere, fixing it is allowed but must be called out explicitly in the report.
After the third failed repair, stop and report. Repeated failure means the diagnosis is wrong, and more attempts bury the evidence.
Runner timeout, network error, rate limit, cancelled job: re-run the job once with gh run rerun --failed. If it fails the same way twice, report it as infrastructure and stop.
Current state above is computed from the session's working directory, and may describe a different PR. Trust it only when its repo and branch match the target. For a PR in another repo, pass --repo OWNER/REPO to every gh call. Before any fix, confirm gh pr view <pr> --json headRefOid matches git log -1 --format=%H: the working directory is where commits and pushes land.
Via the commit skill, so each repair is separately revertible.
gh pr checks <pr-number> --watch --fail-fast — blocks until conclusion.gh run view <run-id> --log-failed for the failing job.commit skill, git push.This skill runs as a background agent — its return value is the only thing the caller sees. Include:
| Condition | Behavior |
|---|---|
| No PR for the branch | Stop. Nothing to watch. |
PR's headRefOid does not match the worktree's HEAD | Stop. Fixes would land on the wrong branch. |
| Checks green on entry | Report and stop. No commits. |
| Failure not diagnosable from the log | Stop. Report the excerpt. Do not guess. |
| Only route to green is changing a test's expectations | Stop. Report. Human decision. |
| Three rounds exhausted | Stop. Report every attempt and the remaining failure. |
| Same infrastructure failure twice | Stop. Report as infrastructure. |
| Push rejected | Stop. Never force. |
continue-on-error to a workflow.SKIP_TEST_GATE or any other gate-override variable.gh pr ready.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
10 skills in this plugin
/biasesCounter reasoning biases when investigating, debugging, or searching a codebase or history. Follow this skill when looking for every instance of a pattern, diagnosing an incident, judging a past decision, or answering "has this happened before" — anywhere a partial sample could pass for the whole population./commitCreate atomic conventional commits. Follow this skill whenever committing code — commit without asking, never push, and sub-agents commit as they go and surface a summary in their return value./concise-commentsUse when writing or editing comments in source code, when a comment is running past two sentences, when explaining non-obvious design context, tradeoffs, constraints or workarounds in code, or when reviewing code that carries long explanatory comment blocks or changelog-style notes. Trigger on 'document this decision', 'explain why this is here', 'make sure the next person understands', 'comment this properly'./draft-prCreate a draft pull request with a standardized body (a blank Intent for the author, then What/Why/How) and conventional-commit title, or hand the user the exact `gh pr create --draft` command to run. Follow this skill whenever opening a pull request, or when the user asks for the command to open one — the draft PR is the human review checkpoint, so the body format is fixed, the title is conventional-commit, and the PR is always marked draft. Main agents only; sub-agents return their work to the main agent to PR./learning-styleSet how Claude presents information to you, and takes it in from you, for this session. Styles are reading, seeing (or visual), doing and listening; give one or more./pre-pr-checkRun the repo's documented lint and tests, sweep the diff for secrets, over-long comments and code it could do without, grade this change against the compliance checklist, and weigh its impact and risk. Follow this skill before pushing anything to a shared remote or opening a pull request, and whenever the user asks to review changes or for a pre-push review. Pass --full to add the project-level categories that are near-static between PRs.npx claudepluginhub joelstoddard/guardrails --plugin building