Agent skill

CI Analyze

by qiniu in qiniu/go-sdk

分析 CI 失败原因并给出修复建议。在用户提到 CI 失败、pipeline 失败、构建失败、测试失败时使用。典型场景:PR 合前 CI 红、需要根因与修复建议时。

MITAuto-check passedDevOps & Cloud

Install CI Analyze

skills CLI
$ npx skills add qiniu/go-sdk --skill ci-analyze -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install qiniu/go-sdk ci-analyze --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/qiniu/go-sdk.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/ci-analyze .claude/skills/ci-analyze && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ci-analyze
GitHub stars
158
Token cost
~904 tokens
SKILL.md length
222 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

分析 CI 失败原因并给出修复建议。在用户提到 CI 失败、pipeline 失败、构建失败、测试失败时使用。典型场景:PR 合前 CI 红、需要根因与修复建议时。

  • Works in 6 steps: gofmt 检查(仅 stable):gofmt -s -l . 检查未格式化文件 → staticcheck(仅 stable):make staticcheck → 编译 examples(仅 stable):go build… → …
  • Tasks that involve CI/CD
  • SKILL.md covers 项目 CI 概览, 何时不要使用(Do NOT use), 触发样例与非样例 and 使用示例, plus 7 more sections
  • Calls gh, make and go

What it does

CI Analyze is an agent skill from qiniu/go-sdk. 分析 CI 失败原因并给出修复建议。在用户提到 CI 失败、pipeline 失败、构建失败、测试失败时使用。典型场景:PR 合前 CI 红、需要根因与修复建议时。

Its SKILL.md is about 900 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering CI/CD. The licence is MIT.

When your agent uses it

  • Tasks that involve CI/CD

Example prompts

  • “/ci-analyze”

Requirements

  • Pre-approved tools (allowed-tools): Read, Grep, Glob, Bash(gh run list:*), Bash(gh run view:*), Bash(gh pr view:*), Bash(gh pr checks:*), Bash(gh api *), Bash(git *), Bash(curl *), Bash(jq *), Bash(cat *), Bash(wc *), Bash(head *), Bash(tail *), Bash(grep *)

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. gofmt 检查(仅 stable):gofmt -s -l . 检查未格式化文件
  2. staticcheck(仅 stable):make staticcheck
  3. 编译 examples(仅 stable):go build ./examples/...
  4. 单元测试(Go 1.22 + stable):make unittest
  5. Windows 单元测试:Linux 通过后运行
  6. macOS 单元测试:Windows 通过后运行

What it can do on your machine

Read from SKILL.md and the folder at commit e1fe1ce. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep
    • Glob
    • Bash(gh run list:*)
    • Bash(gh run view:*)
    • Bash(gh pr view:*)
    • Bash(gh pr checks:*)
    • Bash(gh api *)
    • Bash(git *)
    • Bash(curl *)

    …and 6 more on the same allowed-tools line.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh
    • make
    • go

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

CI Analyze loads about 904 tokens when it runs. Until then it costs about 23 tokens; SKILL.md has 222 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~23
When it runs · the whole SKILL.md, loaded when a task matches
~904

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from qiniu/go-sdk at commit e1fe1ce, republished under its MIT licence (© qiniu). 222 words, ~904 tokens.

Download SKILL.mdSave it as .claude/skills/ci-analyze/SKILL.md (or your agent's skills folder).
name
ci-analyze
description
分析 CI 失败原因并给出修复建议。在用户提到 CI 失败、pipeline 失败、构建失败、测试失败时使用。典型场景:PR 合前 CI 红、需要根因与修复建议时。
allowed-tools
Read, Grep, Glob, Bash(gh run list:*), Bash(gh run view:*), Bash(gh pr view:*), Bash(gh pr checks:*), Bash(gh api *), Bash(git *), Bash(curl *), Bash(jq *), Bash(cat *), Bash(wc *), Bash(head *), Bash(tail *), Bash(grep *)
argument-hint
<PR 编号或 CI URL>

CI 失败分析

开始时声明:"我正在使用 ci-analyze skill 分析 CI 失败原因。"

项目 CI 概览

本项目使用 GitHub Actions(.github/workflows/ci-test.yml),CI 流程:

  1. gofmt 检查(仅 stable):gofmt -s -l . 检查未格式化文件
  2. staticcheck(仅 stable):make staticcheck
  3. 编译 examples(仅 stable):go build ./examples/...
  4. 单元测试(Go 1.22 + stable):make unittest
  5. Windows 单元测试:Linux 通过后运行
  6. macOS 单元测试:Windows 通过后运行

何时不要使用(Do NOT use)

  • 用户仅请求"实现功能/改代码",且未提供任何 CI 失败上下文。
  • CI 状态为全部通过,仅需常规代码审查或功能验证。

触发样例与非样例

  • 应触发:
  • "这个 PR 的 CI 红了,帮我定位根因并给修复建议。"
  • "pipeline failed,给我一份失败分析报告。"
  • 不应触发:
  • "帮我实现这个接口并补测试。"
  • "帮我 review 这个 PR。"

使用示例

bash
# 按 PR 编号分析
ci-analyze 123

# 按 run URL 分析
ci-analyze https://github.com/qiniu/go-sdk/actions/runs/999999

核心原则

  1. 每个失败都视为潜在真实 bug,不要轻易归因为 infra flakiness
  2. 必须给出根因和修复建议,不能只收集日志不给结论
  3. 分析所有失败,不只是第一个

执行流程

步骤 1:获取失败列表
bash
# 获取 PR 的 CI checks
gh pr checks <PR编号> --repo qiniu/go-sdk

# 或获取最近一次 workflow run 的失败
gh run list --repo qiniu/go-sdk --branch <branch> --limit 5
gh run view <run-id> --repo qiniu/go-sdk --log-failed

获取 CI 状态概览:

bash
gh pr view <PR编号> --repo qiniu/go-sdk \
  --json statusCheckRollup \
  --jq '.statusCheckRollup[]? | {name: .context, state: .state, url: .targetUrl}'
步骤 2:获取失败日志
bash
# GitHub Actions 失败日志
gh run view <run-id> --repo qiniu/go-sdk --log-failed
步骤 3:分析每个失败

对每个失败的 check/job:

  1. 获取完整错误日志
  2. 定位失败的测试或步骤
  3. 在代码中找到对应位置
  4. 检查 git blame 看最近改动
  5. 判断根因类别:
    • regression:我们的代码改动导致
    • flaky:间歇性基础设施问题(需要证据:同一测试在 3+ 次其他运行中通过)
    • environment:配置或依赖问题
    • format:gofmt 或 staticcheck 不通过
步骤 4:输出分析报告
  • 失败汇总表:最多列出 20 条,超出用「其余见日志」概括。
  • 详细分析:每项「根因分析 + 修复建议」合计不超过 300 字;只保留值得写的项。
plaintext
## CI 失败分析报告

### 失败汇总

| 序号 | 测试/Job | 错误类型 | 根因 | 置信度 |
|------|----------|----------|------|--------|
| 1    | ...      | ...      | ...  | 高/中/低 |

### 详细分析

#### 失败 1: <测试名>

错误信息:
<具体错误日志>

日志来源:
<GitHub Actions URL 或 API 端点>

根因分析:
<分析过程>

修复建议:
<具体修复方案>

相关代码:
<文件路径:行号>
步骤 5:提出修复方案
  • 对于 regression 类型:给出具体代码修复
  • 对于 flaky 类型:说明判断依据,建议重跑或标记 flaky
  • 对于 environment 类型:说明配置修复方案
  • 对于 format 类型:运行 gofmt -s -w . 或修复 staticcheck 报告的问题

常见失败模式(本项目特有)

失败类型典型表现修复方式
gofmt"Files not formatted"gofmt -s -w .
staticcheckSA/S/ST 开头的错误码按 staticcheck 建议修复
examples 编译go build ./examples/... 失败检查 examples 依赖的包是否有 breaking change
单元测试FAIL + 具体测试函数名定位测试代码和被测代码
Windows/macOS平台相关路径、换行符问题使用 filepath.Join 等跨平台写法

判断 flaky 的证据要求

只有满足以下条件才能判定为 flaky:

  1. 同一测试在同一分支的最近 3+ 次运行中至少有 1 次通过
  2. 错误信息显示明确的基础设施问题(网络超时、资源不足等)
  3. 代码路径没有最近改动
bash
# 检查历史运行
gh run list --repo qiniu/go-sdk --branch <branch> --workflow "Run Test Cases" --limit 10

禁止事项

  • 不要在没有证据的情况下说"可能是 flaky"
  • 不要只列出失败不给结论
  • 不要忽略任何一个失败

验收标准(统一)

  • 输入前提:参数与上下文可解析;缺省参数按 skill 默认值执行,并在输出中注明。
  • 产出要求:按 skill 约定的输出模板给出结果,并包含关键证据(命令、路径、链接或日志摘要)。
  • 通过判定:主流程步骤已完成且无阻塞;若有未完成项,必须明确标注影响范围与下一步。
  • 默认策略(非交互):需要确认但用户未及时响应时,采用"推荐默认值/最小风险项"继续;需要交互选择时优先推荐项。
  • 阻塞升级:遇到权限、凭证、外部依赖缺失时立即停止该步骤,输出"阻塞点 + 已尝试 + 需要用户提供的信息"。

系统规范(AGENTS.md)

执行本 skill 时同时遵守 AGENTS.md 中的系统规范;与本 skill 冲突时以本 skill 为准。

© qiniu, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/ci-analyze of qiniu/go-sdk.

Open the folder on GitHubat commit e1fe1ce

Compare with similar skills

CI Analyze next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

CI Analyze compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
CI Analyze this skillqiniu/go-sdk158—~904Automated safety check: PassMIT
Monitor CInrwl/nx29k6 repos~4.7kAutomated safety check: PassMIT
Terraform and OpenTofu Guideagentscope-ai/QwenPaw36k6 repos~4.2kAutomated safety check: PassApache-2.0
Analyze GitHub Action Logswithastro/astro63k1 repos~1.3kAutomated safety check: PassCustom licence
Azure Pipelines Log Downloaderansible/ansible71k—~825Automated safety check: PassGPL-3.0
GitHub Actions Templatesbartstc/vite-ts-react-template12214 repos~1.9kAutomated safety check: PassMIT

Similar skills

  • Monitor CI

    nrwl/nx

    Monitor Nx Cloud CI pipeline and handle self-healing fixes. An agent skill from nrwl/nx.

    29k GitHub starsUsed in 6 repos~4.7k tokens
    DevOps & CloudAuto-check passed
  • Terraform and OpenTofu Guide

    agentscope-ai/QwenPaw

    Guidance for writing and testing Terraform and OpenTofu code: module structure, naming, test approaches, CI/CD workflows, state handling and security scanning.

    36k GitHub starsUsed in 6 repos~4.2k tokens
    DevOps & CloudAuto-check passed
  • Official

    Analyze recent GitHub Actions workflow runs to identify patterns, mistakes, and improvements.

    63k GitHub starsUsed in 1 repo~1.3k tokens
    DevOps & CloudAuto-check passed
  • Downloads Azure Pipelines CI logs for an Ansible pull request or build so the agent can analyze test failures, after asking you first.

    71k GitHub stars~825 tokensUpdated today
    DevOps & CloudAuto-check passed
  • GitHub Actions Templates

    bartstc/vite-ts-react-template

    Create production-ready GitHub Actions workflows for automated testing, building, and deploying applications.

    122 GitHub starsUsed in 14 repos~1.9k tokens
    DevOps & CloudAuto-check passed
  • Nushell

    ccusage/ccusage

    Guides ccusage Nushell scripts. An agent skill from ccusage/ccusage.

    19k GitHub stars~938 tokensUpdated today
    DevOps & CloudAuto-check passed

More from qiniu/go-sdk

  • Gh View

    qiniu/go-sdk

    分析 GitHub issues、PRs 与 discussions,提供见解或实施指导。在用户提供 GitHub URL、issue/PR 编号或询问仓库内容时使用。典型场景:看 issue/PR 状态、拉 diff 与 checks、要结论与建议下一步时。

    158 GitHub stars~627 tokensUpdated 19 days ago
    Auto-check passed
  • Git Commit

    qiniu/go-sdk

    遵循 Angular 规范生成 git commit 消息。在用户请求创建 commit、写 commit message 或暂存并提交时使用。典型场景:改完代码要提交前、或要求按 Angular 规范写 message 时。

    158 GitHub stars~666 tokensUpdated 19 days ago
    Auto-check passed
  • Release Check

    qiniu/go-sdk

    检查发布版本号是否在三处保持一致(conf/conf.go、CHANGELOG.md、README.md)。在准备发布新版本时使用。

    158 GitHub stars~195 tokensUpdated 19 days ago
    Auto-check passed
  • Check

    qiniu/go-sdk

    运行提交前检查:代码格式化验证、静态检查和单元测试。在准备提交代码、检查代码质量或验证修改是否通过时使用. An agent skill from qiniu/go-sdk.

    158 GitHub stars~159 tokensUpdated 19 days ago
    Auto-check passed
  • Gen

    qiniu/go-sdk

    运行代码生成并检查变更。在修改 API 规范(api-specs/ YAML)或 sandbox OpenAPI/protobuf 后使用。

    158 GitHub stars~189 tokensUpdated 19 days ago
    Auto-check passed

Categories

Questions about CI Analyze

What does CI Analyze do?

分析 CI 失败原因并给出修复建议。在用户提到 CI 失败、pipeline 失败、构建失败、测试失败时使用。典型场景:PR 合前 CI 红、需要根因与修复建议时。. CI Analyze is an agent skill from qiniu/go-sdk.

When should I use CI Analyze?

CI Analyze fits situations like: tasks that involve CI/CD.

How do I install CI Analyze in Claude Code?

Run `npx skills add qiniu/go-sdk --skill ci-analyze -a claude-code`. Or copy the skill folder (.agents/skills/ci-analyze in qiniu/go-sdk) into .claude/skills/ci-analyze in your project. Claude Code loads it when a task matches its description.

How do I install CI Analyze in Codex?

Run `npx skills add qiniu/go-sdk --skill ci-analyze -a codex`. Or copy the skill folder (.agents/skills/ci-analyze in qiniu/go-sdk) into .agents/skills/ci-analyze in your project. Codex loads it when a task matches its description.

Can I use CI Analyze in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add qiniu/go-sdk --skill ci-analyze -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ci-analyze, .gemini/skills/ci-analyze, .github/skills/ci-analyze and .opencode/skills/ci-analyze in your project.

What does CI Analyze need to run?

Going by SKILL.md and its folder, CI Analyze needs the command-line tools its instructions call (gh, make and go). Its frontmatter pre-approves these tools: Read, Grep, Glob, Bash(gh run list:*), Bash(gh run view:*), Bash(gh pr view:*), Bash(gh pr checks:*), Bash(gh api *), Bash(git *), Bash(curl *), Bash(jq *), Bash(cat *), Bash(wc *), Bash(head *), Bash(tail *), Bash(grep *).

Does CI Analyze access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is CI Analyze safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does CI Analyze use?

CI Analyze is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does CI Analyze use?

About 904 tokens (SKILL.md is roughly 3.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to CI Analyze?

Skills that share tags, products or a category with CI Analyze: Monitor CI (nrwl/nx, 29k stars), Terraform and OpenTofu Guide (agentscope-ai/QwenPaw, 36k stars), Analyze GitHub Action Logs (withastro/astro, 63k stars) and Azure Pipelines Log Downloader (ansible/ansible, 71k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains CI Analyze?

qiniu (a GitHub organization) maintains it in qiniu/go-sdk, which has 158 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on September 20, 2026.

Source: qiniu/go-sdk on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.