fix-ci-failures
Skill5 starsChanged 11 days agoMITView on GitHub
Read a branch's latest failed CI runs, triage each failure from its existing logs, and fix the real ones.
- Commits and pushes
7 other projects use a version of this.
Adopted by
Most recently taken up by
- microsoft/vscodetheir own version, first seen Nov 2, 2026
- tstapler/dotfilestheir own version, first seen Oct 10, 2026
- NeuralInverse/neuralinversetheir own version, first seen Oct 8, 2026
- OpenCortexIDE/cortexidetheir own version, first seen Oct 8, 2026
- posit-dev/positrontheir own version, first seen Oct 8, 2026
- xAmirHamza77/OmniCodetheir own version, first seen May 21, 2026
Used with
Projects with it also use add-policy, tool-rename-deprecation and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
OpenCortexIDESkilladd-policy
Use when adding, modifying, or reviewing VS Code configuration policies. Covers the full policy lifecycle from registration to export to platform-specific artifacts. Run on ANY change that adds a `policy:` field to a configuration property.
Also in 4 projects that use this
gitpod-ioSkilltool-rename-deprecation
Ensure renamed built-in tool references preserve backward compatibility. Use when renaming a toolReferenceName, tool set referenceName, or any tool identifier. Run on ANY change to tool registration code. Covers legacyToolReferenceFullNames for tools and legacyFullNames for tool sets.
Also in 4 projects that use this
gitpod-ioSkillhygiene
Use when making code changes to ensure they pass VS Code's hygiene checks. Covers the pre-commit hook, unicode restrictions, string quoting rules, copyright headers, indentation, formatting, ESLint, and stylelint. Run the hygiene check before declaring work complete.
Also in 4 projects that use this
- +1 more from gitpod-io
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- microsoft/vscode★ 195ksame name
- posit-dev/positron★ 4.3ksame name
- NeuralInverse/neuralinverse★ 221same name
- OpenCortexIDE/cortexide★ 175same name
- cpkt9762/opencode-vscode-ide★ 17same name
- xAmirHamza77/OmniCode★ 12same name
- tstapler/dotfiles★ 8same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository57 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- architecture-satisfactionSkill
- autopilotSkill
- browser-testSkill
- chatter-scoutSkill
- closeoutSkill
- codebase-designSkill
- code-reviewSkill
- code-smells-auditSkill
- commitSkill
- dependency-auditSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- fix-github-issuesSkill
- fix-nightwatch-issuesSkill
- fix-posthog-issuesSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- harness-toolsSkill
- housekeeperSkill
- implementSkill
- implement-specSkill
- improve-codebase-architectureSkill
- laravel-herd-worktreesSkill
- panelSkill
- prototypeSkill
- prSkill
- prune-testsSkill
- releaseSkill
- repository-cleanupSkill
- researchSkill
- resolve-review-commentsSkill
- resolving-merge-conflictsSkill
- retroSkill
- run-afterSkill
- scratch-cleanupSkill
- scratch-statusSkill
- setupSkill
- sweepSkill
- tddSkill
- teachSkill
- to-questionnaireSkill
- to-specSkill
- to-ticketsSkill
- triage-github-prSkill
- triageSkill
- ui-designSkill
- upgrade-planSkill
- verifySkill
- wait-whatSkill
- wayfinderSkill
- which-skillSkill
- wizardSkill
- writing-for-agentsSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 5 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Project context: Follow the repo's AGENTS.md / CLAUDE.md rules for tests, lint, cache clears, and a dirty tree.
- Distinctive: line 22
Run git fetch origin, then one script, which reads existing runs and logs and never triggers CI:
- Very specific: line 37
Read git log --oneline <headSha>..origin/B first: commits since the failed run may already fix it.
- Distinctive: line 52
When the command cannot run locally (a missing service or secret), classify from the log and the code alone, and say that it is …
- Distinctive: line 59
No LEGIT left: go to step 5.
- Very specific: line 86
When step 3 worked in the main checkout on a local B, it is now in step with origin/B.
- Very specific: line 95
If step 3 created a worktree and its commits are on origin/B (or in the open pull request), remove it without asking, from the main …
- Distinctive: line 105
Start each job line with a mark: ✅ fixed or stale, ⚠️ flaky, infra, or unreproduced.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fix CI Failures
Take the branch named in the input, or main when none is given. Find its most recent
CI failures, triage each one from the logs that already exist, and fix what is
real. The logs are the whole evidence: CI is a record you read, never a thing you
trigger. Your own proof that a fix works is the failing command run green locally.
Text after the branch name is overriding guidance.
Project context. Follow the repo's AGENTS.md / CLAUDE.md rules for tests, lint,
cache clears, and a dirty tree.
1. Find the latest failures
Run git fetch origin, then one script, which reads existing runs and logs and never triggers CI:
bash <this-skill-dir>/scripts/failed-jobs.sh B --out <scratch>/ci-logsFor each workflow it takes only the newest completed run on the branch that was not cancelled, looking back at most 10 runs: an older failure whose workflow has passed since is already fixed, and a run still in progress or cancelled is not evidence. It prints one JSON entry per failing workflow (workflow, run_id, url, head_sha, conclusion) with each failed job's name, url, first_errors (the runner's ##[error] annotations, then test-runner and compiler failure lines; never the trailing exit code 1), and log, the full failed-job log on disk. Read the log around an error when the first lines do not settle it. A workflow whose last 10 completed runs were all cancelled comes back as all_cancelled with no jobs: report it with no verdict, since it has no log to triage.
[] means the branch's latest completed runs are green: report that, and stop.
Completion criterion: every failed job is listed with its workflow, run URL, headSha,
and the first real error from its log (not the trailing exit code 1).
2. Classify every failure
Read git log --oneline <headSha>..origin/B first: commits since the failed run may
already fix it. Then write one line per failed job:
Failure N: [LEGIT | STALE | FLAKY | INFRA] — <one-line evidence>- LEGIT: the error points at code on the branch, and it reproduces at
origin/Bwhen you run the same command locally. - STALE: a later commit fixed it. Cite the sha, or show the command passing locally.
- FLAKY: it passes locally at the same sha, and the log shows timing, ordering, or a network call.
- INFRA: runner, cache, registry, secret, or quota errors, and anything that needs a CI setting or a human decision. Name what it needs.
When the command cannot run locally (a missing service or secret), classify from the log and the code alone, and say that it is unreproduced.
Completion criterion: every failed job has a line.
3. Fix the legit ones
No LEGIT left: go to step 5.
Work on the branch without disturbing a dirty tree or another worktree's checkout. When
the tree is dirty or the branch is checked out elsewhere, use
git worktree add .claude/worktrees/ci-<branch> origin/B (at that path, never a sibling
directory), then make it runnable with laravel-herd-worktrees' Bootstrap a bare worktree section before running anything in it. Leave it in place until step 5. Per
LEGIT failure: make the minimal change, run the failing command locally until it is
green, then commit with explicit staging (Conventional Commits, naming the job).
Completion criterion: every LEGIT failure has a commit that turned its command green locally.
4. Land the fixes
A commit on the worktree fixes nothing until it is on B. Show the commits, say where
they will go, and land them without asking:
- Default: push to
Bwithgit push origin HEAD:B(no--force). If it is refused becauseorigin/Bmoved,git fetch origin, rebase ontoorigin/B, re-run each fixed command, and push again. - Direct pushes forbidden (branch protection, or the repo's rules): push a
fix/ci-<branch>branch and open a pull request intoBwith a body in theprskill's template. - A user instruction in the input or the conversation ("open a PR", "don't push") overrides both.
The push starts new CI runs. Leave them running and do not come back for their result.
When step 3 worked in the main checkout on a local B, it is now in step with
origin/B; when it worked in a worktree, leave the user's local B as it is and say
it is behind.
Completion criterion: every fix commit is on origin/B, in an open pull request, or
kept local by the user's instruction.
5. Clean up and report
If step 3 created a worktree and its commits are on origin/B (or in the open pull
request), remove it without asking, from the main checkout, by laravel-herd-worktrees' Remove a served worktree
(it never forces). If it refuses,
or the commits are kept local, keep it and ask one yes/no question: "Can I delete the
worktree I created?" Remove it only on yes, never with --force; otherwise name it in
the report as kept.
One line per failed job: fixed in <sha>, stale (<sha>), flaky, infra (what it
needs), or unreproduced. Then say where the commits landed, and each worktree removed
or kept.
Start each job line with a mark: ✅ fixed or stale, ⚠️ flaky, infra, or unreproduced.
Guardrails
CI evidence comes only from runs that already exist. Do not run gh run rerun,
gh workflow run, or gh run watch, do not push an empty or retry commit, and do not
wait on a run.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

