Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ZaxbyHub/opencode-swarm --skill ci-failure-batching -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/ci-failure-batching/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ci-failure-batching/

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.

ci-failure-batching ZaxbyHub The ci-failure-batching skill blocks the agent from reporting tests as passing until the whole suite has run with the command the repo actually uses. CX Codex +1 ★ 539repo stars diagnosing-ci-and-merge-bottlenecks PostHog The diagnosing-ci-and-merge-bottlenecks Claude Code skill examines CI health and the path from pull request creation to merge. It spots slow workflows, stalled PRs, and CI spend. CX Codex +1 320installs pr-watch SethGammon pr-watch monitors pull request CI status in the terminal, inspects failure logs, applies code fixes, and prompts to merge. CX Codex +1 ★ 937repo stars iterate-pr getsentry iterate-pr is a Claude Code skill that iterates on open pull requests until actionable CI checks pass and review comments are fixed, handling test failures and feedback without waiting for human approval. CX Codex +1 4,800installs gh-axi Kun Chen (kunchenguid) gh-axi is a Claude Code skill that handles GitHub tasks through a CLI, from issues and pull requests to releases and Actions. The agent uses it for work involving GitHub. CX Codex +1 10,400installs github openclaw Skill for GitHub through CLI: view and create pull requests, manage issues, check CI status, handle reviews and releases. Works on Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode. CX Codex +1 6,100installs om-auto-fix-pr open-mercato om-auto-fix-pr drives an open pull request to merge-ready by syncing base, fixing CI, and running review loops. Never merges changes on its own. CX Codex +1 4,500installs

From the same set121

The whole set →
skill-edit-validation skill-edit-validation sweeps test suites for stale assertions after modifying skill markdown files, preventing unexpected CI breaks. CX Codex +1 ★ 539repo stars discover This skill delegates repository discovery and maps project rules, code structure, and risk areas. Use it before a complex change when you need to understand the existing project first. CX Codex +1 ★ 539repo stars ci-fix-monitor ci-fix-monitor is a Claude Code skill that monitors pull request check runs and resolves CI failures. It tracks builds until every required job turns green. CX Codex +1 ★ 539repo stars swarm-resume swarm-resume is a Claude Code skill that restores swarm plan state and clears stale git branches to resume work on an approved plan. CX Codex +1 ★ 539repo stars mock-to-internals-migration mock-to-internals-migration is a Claude Code skill for moving mocks from Vitest to Bun and checking the _internals seam. It activates for mock migrations and related test-structure changes. CX Codex +1 ★ 539repo stars gate-attribution gate-attribution assigns reviewer and test engineer verdicts to individual plan tasks during swarm batch runs. Activates when dispatches return multi-task rows. CX Codex +1 ★ 539repo stars merge-queue-readiness The merge-queue-readiness skill simulates a PR merged with the latest main before it enters a GitHub merge queue. Use it to catch integration failures that isolated PR checks can miss. CX Codex +1 ★ 539repo stars issue-tracer issue-tracer — a subagent that carries a GitHub issue from report to fix plan. It collects evidence, pinpoints the root cause, and touches no code until you approve the plan. CX Codex +1 ★ 539repo stars

Project sponsors

Companies that keep this analytics open