ci-triage
能在不依赖外部链接下准确回答“为什么 CI 失败”。
依赖 gh CLI 和仓库权限,需提供 GitHub token。
用 gh CLI 从分支或提交定位并诊断 GitHub Actions 的失败原因。
用 gh CLI 从分支或提交定位并诊断 GitHub Actions 的失败原因,回答‘有没有红的?为什么红’这类问题。发布前、有人说 CI 失败或要确认某个提交是否真的通过时就用它。重点是不会只看 run-level 的 conclusion,而是查 commit 的 check-runs,避免漏掉真实失败。
▸ 展开 SKILL.md 英文原文
Find and diagnose RED CI with the gh CLI — answer "is anything failing?" and "why?" correctly, without being handed a URL. Invoke (via the Skill tool) whenever you need to check whether a branch, commit, or PR is green, whenever someone reports failing CI, before cutting a release, and before claiming any commit is green. THE FAILURE THIS SKILL EXISTS TO PREVENT: `gh run list` reports a RUN-level `conclusion`, and a run whose rollup is `cancelled` can contain a job whose conclusion is `failure` — so filtering runs on `conclusion=="failure"` silently misses real red, and taking the latest run per workflow hides an older failed run on the same SHA. The authoritative instrument is the commit's CHECK-RUNS, which is what the GitHub UI renders. Pairs with `ci-watch` (blocking until a run is terminal) and `ci-adhoc-test` (running a probe on a real OS).
帮我安装这个 skill:https://raw.githubusercontent.com/nubjs/nub/main/.claude/skills/ci-triage/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/nubjs/nub/main/.claude/skills/ci-triage/SKILL.md"# Investigating CI `ci-watch` answers *"has it finished, and did it pass?"* for one run you are waiting on. This skill answers the two questions you get asked cold: **"is anything red?"** and **"why is this red?"** — starting from a branch name or a commit, never from a URL someone hands you. ## The rule **Never answer "is it green?" from run-level `conclusion`. Query the commit's check-runs.** A GitHub Actions *run* rolls up its jobs into one conclusion, and that rollup is lossy in the exact case that matters: | What happened | Run `conclusion` | Job conclusions | `gh run list` shows | | --- | --- | --- | --- | | A job failed | `failure` | one `failure` | ✅ red — you see it | | **A job