ci-fix-looplisted
Install: claude install-skill oleg-koval/agent-skills
<!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
> 🤖 *Auto-generated by **weekly-pattern-learner** · qodoloop and coderabbitloop share the push→poll→diagnose→fix→repeat loop; CI failures have the same shape but no dedicated skill existed*
# CI Fix Loop
Drive a GitHub Actions CI run from red to green: fetch failure logs, diagnose, apply
a targeted fix, push, and repeat until all required checks pass or a blocker is hit.
## Inputs
- **PR number** (optional): detect from current branch if not given.
- **Check names** (optional): limit to specific failing checks instead of all.
- **Max iterations** (default: 5)
## Workflow
### 1. Identify the PR and current CI state
```bash
# Detect PR from current branch
gh pr view --json number,headRefName,headRefOid \
-q '{number, branch: .headRefName, sha: .headRefOid}'
# Current check status
gh pr checks --json name,state,conclusion 2>/dev/null \
|| gh run list --branch <branch> --limit 5
```
Classify each check as: `pass`, `fail`, `pending`, or `skipped`.
**Exit immediately if all required checks already pass**: nothing to do.
### 2. Loop (max 5 iterations)
#### A. Identify failing checks
```bash
gh pr checks --json name,state,conclusion \
--jq '.[] | select(.conclusion == "failure" or .state == "FAILURE")'
```
For each failing check, record: check name, workflow file, job name.
Stop if the working set is empty: all required checks are green.
#### B. Check for base-branch regression first
Befor