diagnose-ci-failures
GitHub用于诊断 CI 失败(如 GitHub Actions),通过提取日志和证据生成修复计划。仅分析不修改代码,支持 PR、分支或运行 ID 输入,按构建、测试等类别分类根因并提供验证步骤。
Trigger Scenarios
Install
npx skills add Terry-Mao/AICodingFlow --skill diagnose-ci-failures -g -y
SKILL.md
Frontmatter
{
"name": "diagnose-ci-failures",
"description": "Diagnose a PR, branch, run, or GitHub Actions URL from CI evidence and produce a fix plan without changing code."
}
diagnose-ci-failures
Use this when the user asks to inspect failing CI. This skill is diagnosis-only: it produces a reviewable plan and does not edit, commit, push, or create PRs.
Find and inspect the target
Use the user's run URL, run ID, or branch when provided. Otherwise inspect the current branch's PR and failed checks, then fall back to recent failed runs for that branch. If no failing target exists, report that and stop.
gh run view <run-id> --verbose
gh run list --branch <branch> --status failure --limit 5
gh pr view --json number,title,url,state,statusCheckRollup
For the selected PR/run, identify completed, pending, passed, and failed checks. If checks are still running, report the partial state instead of guessing. Pull failed-step logs first:
gh run view <run-id> --log-failed
Inspect a specific job or download artifacts only when the failed-step output is insufficient. Extract observed paths, line numbers, error messages, failing tests, stack traces, and environment/permission failures.
Produce the plan
Group evidence into build/compile, test, lint/format, and environment/setup failures. Do not assume a language, tool, or root cause before repository files or logs establish it. Write a plan containing:
- problem statement and affected checks;
- current evidence and locations;
- likely root cause grounded in the logs;
- specific proposed changes;
- validation steps for the follow-up implementation.
Prefer CI evidence over local guesses. Treat multiple unrelated failures as separate categories and recommend resolving them one category at a time.
Version History
-
d3fef11
Current 2026-09-03 03:51
重构了定位 CI 目标的逻辑,简化了从 URL/ID/分支获取信息的流程;优化了 PR 状态检查和失败步骤日志提取的描述,使其更精简明确。
- e53c5ac 2026-07-24 11:35


