arbiterforge/ca-watch
Watch a PR's CI to completion — diagnose on red, notify and offer the merge on green. Never auto-merges.
npx skills add https://github.com/arbiterForge/codeArbiter --skill ca-watch
Watch a pull request's checks to completion without babysitting them by hand. The
wait happens server-side, so it costs nothing while CI runs; arbiter wakes once, on
the verdict — diagnoses a red, or offers you the merge on a green. Arbiter never
pulls the merge trigger.
Requires the GitHub CLI authenticated (gh auth status). If gh is absent or
unauthenticated, report the precondition failure naming gh and STOP — do not start
a phantom watcher.
$ARGUMENTS (number, URL, or branch; default to thecurrent branch's PR).
the server-side block:
gh pr checks <PR> --watch
This blocks until every check finishes and then exits non-zero on failure. It is
NOT a polling loop — there is no interval-based wake-up. Arbiter is re-invoked once
when the watch process exits.
gh run view --log-failed /gh pr checks) and act at the configured depth. Resolve that depth with the
canonical resolver rather than reading the env var by hand (so the accepted
values can't drift):
python3 "${CLAUDE_PLUGIN_ROOT}/hooks/babysit.py" --root "<project-root>" || python "${CLAUDE_PLUGIN_ROOT}/hooks/babysit.py" --root "<project-root>"
It prints one JSON line; act at its on_red value (CODEARBITER_BABYSIT_ONRED,
default propose):
propose — name the likely cause and propose a concrete fix. Do NOT editany tracked file; applying the fix routes through $ca-fix or $ca-feature.
branch — additionally open a spike/fix-* branch carrying the proposedchange for review. That branch is a spike: it can never PR or merge. The default
branch is left untouched.
gh pr mergecommand, ready to run). The watcher itself NEVER merges. If the PR targets the
default branch, the merge routes through the merge-to-default hard gate — the offer
cannot bypass it.
A global flag, CODEARBITER_BABYSIT (default off, mirrors CODEARBITER_PRUNE),
governs auto-attachment: when on, $ca-pr auto-attaches a watcher to the PR it
opens. $ca-watch <PR> works ad-hoc regardless of the flag. The flag is never set on
the user's behalf — enabling it is the user's explicit choice. Both the command and
the flag are dormant in a repo without arbiter: enabled.
$ca-pr.$ca-fix (or $ca-feature).$ca-review.gh pr merge.
the green offer cannot and does not bypass it.
is the server-side gh pr checks --watch block.
gh as a precondition failure, not a silentno-op.
propose MUST NOT edit any tracked file; at depth branch the proposedchange lands only on an unmergeable spike/fix-* branch.
Take arbiterforge/ca-watch from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.