nubjs/nub✦ 精选0°

ci-triage

仓库创建 2026年6月4日最近提交 2 小时前SkillHot 收录 1 小时前
▸ 精选理由

能在不依赖外部链接下准确回答“为什么 CI 失败”。

▸ 风险提示

依赖 gh CLI 和仓库权限,需提供 GitHub token。

这个 Skill 做什么

用 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).

开发编程CI诊断GitHub故障排查通用
3.9k
Stars
54
Forks
38
仓库内 Skill
积累中
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/nubjs/nub/main/.claude/skills/ci-triage/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/nubjs/nub/main/.claude/skills/ci-triage/SKILL.md"
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
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有