ci-failure-batching · zaxbyhub — Claude Code skill: CI failures and setup
ci-failure-batching collects failed PR checks before planning fixes. Use it to group related CI problems and avoid a separate push cycle for each one.
MIT ★ 539 updated 2026-10-29
npx skills add ZaxbyHub/opencode-swarm --skill ci-failure-batching -a claude-codeWhat ci-failure-batching does
The skill responds to a pr.ci.failed event. It first checks gh pr checks <PR> --repo <repo> and waits if jobs are still running. Once the run is complete, it retrieves a failed log for each check with gh run view <run-id> --log-failed and builds a combined failure list.
Failures are grouped by root cause so they can be fixed together and verified locally. Before committing or pushing, the skill hands commit-message, PR-body, and push-protocol work to commit-pr. GitHub can add checks after the initial collection, so a newly surfaced failure calls for another push cycle.
What it helps with
- collect logs for every failed PR check
- wait for outstanding CI jobs to finish
- group failures that share a root cause
- plan one combined set of PR fixes
Example prompts for the agent
- Collect every CI failure for this PR and wait for running checks to finish.
- Review the failed-check logs, group the problems by cause, and plan the fixes.
- Check whether new CI failures appeared after the fixes were pushed.
How to install ci-failure-batching
1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill ci-failure-batching -a claude-code2Manually: put the files in place
~/.claude/skills/ci-failure-batching/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/ci-failure-batching/
1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill ci-failure-batching -a codex2Manually: put the files in place
.agents/skills/ci-failure-batching/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill ci-failure-batching -a cursor2Manually: put the files in place
.cursor/skills/ci-failure-batching/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ZaxbyHub/opencode-swarm .opencode/skills/ci-failure-batching2Manually: put the files in place
.github/skills/ci-failure-batching/SKILL.md1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill ci-failure-batching -a gemini-cli2Platform CLI
gemini skills install https://github.com/ZaxbyHub/opencode-swarm --path .opencode/skills/ci-failure-batchingManually: put the files in place
.devin/skills/ci-failure-batching/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill ci-failure-batching -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about ci-failure-batching
How do I install ci-failure-batching in Claude Code?
Run npx skills add ZaxbyHub/opencode-swarm --skill ci-failure-batching -a claude-code. The skill file is located at ~/.claude/skills/ci-failure-batching/SKILL.md.
What does ci-failure-batching do?
It gathers logs for failed PR checks, groups the failures by cause, and plans fixes as one batch before pushing.
Why does the skill check PR status before fixing failures?
GitHub may add merge-group or matrix jobs after a failure first appears. The skill checks gh pr checks <PR> --repo <repo> before starting the fix plan.
Source text
SKILL.md · MIT
--- name: ci-failure-batching description: Batch collection and fix protocol for CI failures. Triggered when any CI check fails on a PR. Prevents serial diagnose-fix-push cycles by collecting all failures before fixing. metadata: audience: swarm-plugin --- # CI Failure Batching ## Trigger When the PR monitor surfaces `pr.ci.failed`. The event is batched after the check set is complete and includes all known failed checks in `failedChecks`. ## Protocol 1. **DO NOT immediately fix the first failure.** Check if other jobs are still running: ``` gh pr checks <PR> --repo <repo> ``` 2. **If jobs are still running:** Note the failure, WAIT for the run to complete 3. **Once the run completes, collect ALL failures:** - Identify every check with `fail` status - For each: `gh run view <run-id> --log-failed` - Build a complete failure ledger 4. **Fix ALL failures in one changeset:** Cluster by root cause, fix each cluster, verify locally 5. **Publish through `commit-pr`.** This skill owns diagnosis and fix-planning ONLY (issue #2131 criterion E): before any commit or push, compose the `commit-pr` skill for the commit message, PR body/invariant-audit/test-plan discipline, and the push protocol. The batching goal is ONE push cycle (collect all → fix all → push once), not literally one commit — a single new commit containing all batched fixes satisfies the goal. Guardrail facts (verified in the tool-before push guardrail): bare `git push --force` and `-f` are deny-pattern-blocked; `--force-with-lease` is EXEMPT because it refuses to overwrite remote work gained since your last fetch — commit-pr mandates it for fork/rebase flows. Even so, prefer a normal new fix commit over amending an already-pushed commit. 6. **Only re-push if NEW failures surface** that were not in the original batch. ## Why this matters Without batching, N failures produce N push cycles. With batching, N failures produce 1 push cycle. Example from session #1685: - Without batching: 6 pushes (format → stale-assertion-1 → stale-assertion-2 → integration → merge-group → clean) - With batching: 2 pushes (collect all → fix all → push once → clean) ## Pr-monitor expectation The pr-monitor should fire one `pr.ci.failed` event for the completed failing check set, not one event per check. Still verify with `gh pr checks` before fixing, because GitHub can append late merge-group or matrix jobs.
© ZaxbyHub · MIT · ZaxbyHub/opencode-swarm
Similar skills
All skills for DevOps and infrastructure →ci-failure-batching by other authors comes first.