CI 失败归因与修复路径核对
原名:diagnose-ci-gate
依据完整日志和基准分支记录,区分代码、偶发、环境及流水线问题。
中文 Skills 技能说明
本地测试通过而 CI 失败时,先查清失败发生在哪条命令、哪个提交。提供有权读取的完整作业日志、运行版本、当前改动及基准分支记录,技能从首个错误开始整理问题分类、归因证据和下一步处理。它侧重判断当前改动是否造成失败,补充现有 CI 日志排查用途。没有历史或复现证据就标明未知,不把一次重跑变绿当成原因消失;不靠删除测试、跳过检查或放宽门禁制造通过。GitHub CLI 和仓库权限另配,日志脱敏,只在批准的临时副本复现,工作流修改及重跑前遵守项目授权。
上游能力依据
上游原始适用说明:Determine whether a failing CI check was caused by the current change, then recommend exactly one action. Use when a required check fails on a pull request, when asked "is this failure mine?", when a job passes locally but fails in CI, or before retrying a red build. Covers fetching the real log, reading the first error instead of the tail, classifying bug / flaky / environment / pipeline, comparing against the base branch and recent runs, reproducing with CI versions, and fixing a flaky test rather than re-running it forever.
上游 SKILL.md 主要章节(保留原文标题):
- When to Use This Skill
- Prerequisites
- Workflow
- 1. Get the failing job, not the check summary
- 2. Read from the first error
- 3. Classify the failure
- 4. Decide whether this change caused it
- 5. Reproduce with CI's versions
- 6. Choose exactly one action
- 7. Verify and report
使用边界
先复现问题并固定测试范围,再生成或执行测试。测试通过只能证明已覆盖的场景,不能代替生产环境验收。
作者、翻译与许可证
- 原作者
- GitHub, Inc. 与 awesome-copilot contributors
- 中文翻译
- CEOFans翻译
- 许可证
- MIT
- 上游来源
- https://github.com/github/awesome-copilot/tree/96543145e9cb97711020b57b9d88f968062c4fc7/skills/diagnose-ci-gate
适用范围
平台:linux、macos、windows;标签:CI归因、基准对照、失败复现
安全提示
基础静态扫描不等于绝对安全。技能可能调用命令、浏览器、云服务或本地文件,请在最小权限环境中使用,高风险操作必须人工确认。
如发现侵权、许可证或安全问题,可在本页前台提交投诉,管理员复核后可立即下架。