← ClaudeAtlas

ci-monitorlisted

Check GitHub CI status on main branch and open PRs. Self-healing loop — diagnoses failures, spawns mbe agent run to fix them, validates fixes via the Reviewer Agent Contract, and auto-merges green fix PRs. Falls back to filing issues for failures requiring human judgment. Circuit breaker stops the loop after 3 consecutive fix-PR failures. Invoke with /ci-monitor.
mattbutlerengineering/mattbutlerengineering · ★ 1 · Code & Development · score 70
Install: claude install-skill mattbutlerengineering/mattbutlerengineering
# CI Monitor Monitor GitHub Actions CI health and respond to failures. Fixes simple issues automatically via a self-healing loop, escalates complex ones to the issue queue. ## Circuit Breaker State Track consecutive fix-PR CI failures in a local counter. Reset to 0 on any successful fix. ```bash CONSECUTIVE_FAILURES=0 MAX_CONSECUTIVE_FAILURES=3 ``` If `CONSECUTIVE_FAILURES >= MAX_CONSECUTIVE_FAILURES`, **stop the loop** and report: > "Circuit breaker tripped: 3 consecutive fix PRs failed CI. Manual review required." Do not attempt further fixes in this session. --- ## Workflow ### Step 1: Check Main Branch CI ```bash gh run list --branch main --limit 5 --json status,conclusion,databaseId,headBranch,name,createdAt ``` Examine the results: - If all 5 runs have `conclusion: "success"` → **main is healthy**, proceed to Step 3 - If any run has `conclusion: "failure"` → proceed to Step 2 ### Step 2: Diagnose and Self-Heal Failure For each failed run: ```bash gh run view <databaseId> --log-failed 2>&1 | head -200 ``` #### 2a: Check for Existing Fix ```bash gh issue list --label "ci-fix" --state open --search "<error keyword>" --json number,title gh pr list --state open --label "ci-fix" --json number,title,headRefName ``` If an open `ci-fix` issue **or** an open fix PR already exists for this failure, **skip it** — it is already being tracked. #### 2b: Classify the Failure **Classify into one of these types:** | Type | Signal in logs