跳到正文
Skillpedia
部署与云(DevOps)16k · #10828

ci-triage

它能做什么

这个技能帮你理解 GitHub Actions 中失败的构建或工作流。适合想知道失败是自己的问题、不稳定测试还是基础设施问题的开发者。

适用场景

  • ✓当拉取请求上的检查显示失败,你想知道原因的时候。
  • ✓当某个工作流失败,你需要在日志中找到第一个真正错误的时候。
  • ✓当你怀疑某个测试不稳定,想把它与真正的失败区分开的时候。

技能链接

https://github.com/ParadevAI/Paradev/blob/main/plugins/github/skills/ci-triage/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ParadevAI/Paradev/blob/main/plugins/github/skills/ci-triage/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的拉取请求检查显示失败。你能告诉我是哪个任务失败的,以及这是不是我的问题吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会列出运行中的各个任务,找出最早失败的那一个,再找到其日志中的第一个错误。然后它会把这个错误归为真正的失败、环境问题、不稳定测试,或是原本就存在的问题。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Diagnose a failing CI run

The goal is one sentence a human can act on: which job failed, on what, and whether it is this PR's fault. A screenshot of red checks is not a diagnosis.

1. Find the first failure, not the loudest one

List the run's jobs and take the earliest failing one. Later jobs usually fail because an earlier one did, and their logs are longer and more alarming — which is why people diagnose the wrong job.

Within that job, find the first error, not the last. Build tooling prints a summary at the end that names the last thing to fail; the first error is what actually broke.

Skip past the noise that always appears in failing logs: deprecation warnings, peer dependency notices, cache misses. None of them fail a build on their own.

2. Classify before investigating

Read the first error and put it in one of four buckets. They have different fixes and mixing them up wastes the most time.

Bucket Signal What to do
Real failure Assertion, type error, or compile error naming code this PR touched Report the file and line
Environment Network timeout, registry 5xx, disk full, runner image change Re-run; if it persists, it is infrastructure
Flake Timing, ordering, or concurrency; passes on re-run See step 4 — do not stop at "re-run passed"
Pre-existing Fails identically on the base branch Not this PR's problem; say so explicitly

Check pre-existing early. Fetch the most recent run on the base branch and compare the failing job. A PR blamed for a failure it inherited burns an afternoon.

3. Attribute it to a change

For a real failure, connect the error to a diff. Get the PR's changed files and check whether the failing test or module is among them, or imports something that is.

If the failing area is untouched by the PR, the likely causes in order are: a dependency that moved, a merge with a base that already broke, or a genuine action-at-a-distance bug — which is the most interesting outcome and worth saying out loud.

4. Do not launder a flake into a pass

A re-run that goes green proves the failure is intermittent. It does not prove the code is correct, and intermittent failures in CI are usually real race conditions that will also happen in production.

When you re-run and it passes, say that plainly, name the test, and check whether it has failed before on other PRs. A test that flakes on many PRs is a bug report about that test. Re-running until green and reporting success is how a real concurrency bug survives review.

5. Report

Give the requester, in this order: the job, the first error with its file and line, the bucket from step 2, and what you recommend. Link the specific failing step, not the run — the run page makes them hunt for what you already found.

If the fix is small and obvious, say what it is. If the failure is pre-existing or infrastructural, say who needs to know, since the PR author usually cannot fix it.

Anti-patterns

  • Pasting the whole log. If you could not find the relevant twenty lines, the diagnosis is not finished.
  • Reporting the last error in the file.
  • "CI is flaky" without naming the test.
  • Re-running more than twice without reading the log in between.
常见问题

为什么不看最后的错误?

后面的任务往往是因为前面的任务失败才失败的,所以第一个错误通常才是真正的原因。

什么是不稳定测试?

不稳定测试是由时序或顺序引起的失败,在另一次运行中可能会通过。这个技能不会只靠简单重跑就结束。

它会修复失败吗?

这个技能专注于诊断,目标是指出任务、第一个错误以及导致失败的提交。

详情

作者的原始描述

Diagnose a failing GitHub Actions run — find the first real error in the logs, tell a flake apart from a genuine failure, and identify the commit that broke it. Use when checks are red on a PR, a workflow failed, the build is broken, CI is flaky, or the user asks why a run failed or whether a failure is real.

repo: ParadevAI/Paradev

热度

GitHub 星标
16k
排名
#10828
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能