fix-ci-until-green
БесплатноЗапускает вложенные скриптыНе проверенDrive a failing GitHub Actions run to green in as few CI runs as possible, with a bounded fix-critique-commit-push-recheck loop that batches every evidenced…
от jim60105★ 22 звезды на GitHubОб этом скилле
Fix CI Until Green
Take a red GitHub Actions run and iterate until it is green: read every failure, form root-cause hypotheses, get the plan critiqued, fix, commit, push, read the next run. Repeat.
Optimise for the fewest CI runs, not the smallest diff. Every push spends real runner time, so each iteration should try to fix everything wrong with the branch — including failures that are still hidden behind the ones CI reported.
Hard cap: 10 iterations. Report and hand control back when the cap is reached.
Prerequisites
The scripts enforce the mechanical checks themselves and say what is wrong on stderr: missing
gh/jq, an unauthenticated gh (keyring or GH_TOKEN/GITHUB_TOKEN), and a checkout whose
remotes do not point at the run's repository. Exit 3 with such a message means fix the
invocation or the working copy — do not pre-run gh auth status, jq --version, or
git remote -v by hand.
The one check left to you: the working tree is clean, or the pending changes are understood and intended to ship.
Loop Invariants
These hold in every iteration. Violating one turns a fixed build into a hidden regression.
- Fix the cause, never the check. Deleting, skipping, or
xfail-ing a test, addingcontinue-on-error, appending|| true, lowering a coverage or lint threshold, or pinning around a real breakage are all forbidden unless the user explicitly asks for them. - Every failure is a real defect. Do not write anything off as flaky and do not
gh run rerunto make it disappear. Timeouts, OOM kills, and registry errors have real causes and real fixes — seereferences/failure-triage.md. - Fix everything you can see, in one push. Each iteration costs a full CI run, so the goal is the fewest runs to green, not the smallest diff per run. Triage every failing job, fix every cause the evidence supports, and push them together.
- Batch evidenced fixes; never batch guesses. Two fixes for two different failures both belong in this push. Two competing hypotheses for the same failure do not — stacking alternatives means the next run cannot tell you which one was right. Pick the best-supported one and note the other in the ledger.
- The plan is critiqued before any edit. No exceptions, no "this one is obvious".
- Append-only history. Never
--forcepush, and never amend or rebase a commit that is already pushed. Each iteration is one new commit.
Step 0 — Resolve the target
The user supplies a run URL or a bare run ID. Both forms are accepted directly by the scripts;
https://github.com/OWNER/REPO/actions/runs/ID also carries the repo, so -R is only needed for a
bare ID outside the target repository.
Given a PR instead of a run, get to the run first: gh pr checks <pr> or
gh run list --branch <branch> --limit 10. See references/gh-cli.md.
Step 1 — Read the failure
scripts/ci_failure_report.sh <run-url-or-id> [-R OWNER/REPO]
Reports every failure in every failed job, which is what the batching policy needs. Per job it prints the failed steps, then:
- Failure blocks — one full body per distinct failure. Repeats collapse to one representative plus the complete list of their variants, so ten near-identical assertions stay readable without losing any single identifier.
- Other error lines — annotations and failure keywords from elsewhere in the log, filtered against the blocks so nothing is printed twice.
- Log excerpt — the narrative around
##[error], read backwards, for failures no test framework reported.
Every cap announces what it hid (... N more ... hidden). If you see such a line, the failure set is
incomplete — raise --block-lines, --max-blocks, or --signature-lines and re-read before
planning, rather than fixing a subset.
| Exit | Meaning | Next |
|---|---|---|
| 0 | Run is green | Loop is done — go to Reporting |
| 1 | Run failed, report printed | Continue to Step 2 |
| 2 | Still queued or running | Wait (Step 6), then re-read |
| 3 | Bad reference, auth, or lookup error | Fix the invocation; do not guess at a fix |
When the excerpt is not enough — the error is far from the annotation, or a matrix leg needs
comparing against a green leg — pull the full job log and related evidence using the recipes in
references/gh-cli.md.
Step 2 — Triage into a root-cause hypothesis
Read references/failure-triage.md for signature-to-cause mappings and the "only fails in CI"
checklist.
Before moving on, be able to state all four:
- The failing job and step.
- The decisive log line, quoted verbatim.
- The root cause — the defect itself, not the symptom the runner reported.
- The smallest change that removes that cause.
Do this for every failing job in the run, not just the first one the report prints.
Then look for the failures CI has not reported yet — finding them now saves a whole round trip:
- Cancelled siblings. Under `fail-fas
Установить fix-ci-until-green в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл fix-ci-until-green?
Drive a failing GitHub Actions run to green in as few CI runs as possible, with a bounded fix-critique-commit-push-recheck loop that batches every evidenced fix into each push. Use when the user supplies a GitHub Actions run URL or run ID and wants the failure fixed, or asks to "make CI green", "fix the failing workflow/build/tests", "fix the red build", or to keep iterating on a branch or pull request until its checks pass. Pulls run results and failed-job logs through the gh CLI, and sends every fix plan to the rubber-duck reviewer before any code is touched.
Как установить скилл fix-ci-until-green?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fix-ci-until-green запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic