← ClaudeAtlas

fix-cilisted

Drive a red PR back to green — find the current branch's PR, read each failing check's log, apply the smallest fix, push, re-watch. Bounded to ~3 iterations, then reports. Never merges. Use this when a PR's CI is failing (e.g. after /ship's CI watch or a Stop-hook ci-failing nag), or invoke it manually as /fix-ci.
braedensc/claude-project-kit · ★ 0 · Code & Development · score 73
Install: claude install-skill braedensc/claude-project-kit
## Repo state (injected before you start) - Branch: !`git rev-parse --abbrev-ref HEAD 2>/dev/null` - Status: !`git status --short` - PR: !`gh pr view --json number,title,mergeStateStatus -q '"#\(.number) \(.title) [\(.mergeStateStatus)]"' 2>/dev/null || echo "none for this branch"` ## Instructions Fix the failing CI on this branch's PR, following the kit's conventions exactly. `$ARGUMENTS` may name a PR number; otherwise resolve it from the current branch. 1. **Resolve the PR:** `gh pr view --json number,mergeStateStatus,url`. No PR for this branch → stop and say so (open one first — that's `/ship`'s job, not this skill's). 2. **Triage DIRTY first.** If `mergeStateStatus` is `DIRTY`, the PR has merge conflicts — **fixing code cannot fix a conflict**, and while conflicted the required CI never even runs (side checks like CodeQL can still look green). Hand off to the canonical rebase recipe before touching anything else: ``` git fetch origin main && git rebase origin/main # resolve conflicts, then: git push --force-with-lease ``` Then continue below — the force-push re-runs the required CI. **Inside a dispatcher's sandbox this recipe can fail on the environment, not on the conflict.** Worktrees share one `.git/config` outside any single worktree's write allowlist, so commands that write it — `git branch --set-upstream` is the one seen live, 2026-09-08 — come back `Operation not permitted`. That is a hard environment block: sa