go-sdk: Skill for Claude Code

.agents/skills/ci-analyze/SKILL.md

ci-analyze is a skill for Claude Code from qiniu/go-sdk. It costs 56 tokens per session (1,728 once invoked), scanned A, original, MIT.

A guide for investigating failed continuous integration (CI), the automated checks that build and test code for a project. It covers formatting, static analysis, compilation, and tests in GitHub Actions.

In plain words
What is it for?
Use it to analyze failed pull-request checks or workflow runs, review all failures, and recommend fixes.
Why use it?
It turns failed pipeline checks and logs into root-cause findings and concrete repair suggestions instead of treating failures as unexplained noise.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

This is qiniu/go-sdk's own configuration. It tells Claude Code how to work on go-sdk itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything go-sdk configures →

View source ↗ qiniu/go-sdk
Reuse

Borrowing it

Nothing to install: this file belongs to qiniu/go-sdk. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/qiniu/go-sdk/master/.agents/skills/ci-analyze/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/qiniu/go-sdk

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ci-analyze

README.md
[![agentmods](https://agentmods.dev/badge/skills/qiniu/go-sdk/ci-analyze.svg)](https://agentmods.dev/skills/qiniu/go-sdk/ci-analyze)
Your own site
<a href="https://agentmods.dev/skills/qiniu/go-sdk/ci-analyze"><img src="https://agentmods.dev/badge/skills/qiniu/go-sdk/ci-analyze.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,728 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.01728
Opus 5 $0.00028 $0.00864
Sonnet 5 $0.00011 $0.00346
Haiku 4.5 $0.00006 $0.00173

Measured 7d ago against content hash 1dc9d6eebae2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ci-analyze scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Bash(curl *)
.agents/skills/ci-analyze/SKILL.md · 192 lines

How it starts

The opening of the file, as written. The whole thing — 192 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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。"

使用示例

# 按 PR 编号分析
ci-analyze 123

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

核心原则

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

执行流程

步骤 1:获取失败列表

# 获取 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 状态概览:

gh pr view <PR编号> --repo qiniu/go-sdk \
  --json statusCheckRollup \
  --jq '.statusCheckRollup[]? | {name: .context, state: .state, url: .targetUrl}'

步骤 2:获取失败日志

# 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 字;只保留值得写的项。
## CI 失败分析报告

### 失败汇总

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

### 详细分析

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

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

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

根因分析:
<分析过程>

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

相关代码:
<文件路径:行号>

步骤 5:提出修复方案

Read the full file on GitHub · 192 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 192 lines · 56 tokens per session scan A 1dc9d6eebae2

Subscribe to this mod's changes

ci-analyze is a skill published in the GitHub repository qiniu/go-sdk (157 stars, last pushed 1mo ago), licensed MIT. It adds 56 tokens to every session and 1,728 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

Verification & Quality Assurance

Comprehensive truth scoring, code quality verification, and automatic rollback system with 0.95 accuracy threshold for ensuring high-quality agent outputs and codebase reliability.

ruvnet/RuView · 36 tokens

smoke-test

Health smoke tests + auto-fix for gbrain installs (and OpenClaw services when present). Run after machine/container restarts or whenever something seems broken. Tests critical services, auto-fixes bounded local issues, and reports worker topology without starting daemons. Extensible via user-defined test scripts in…

garrytan/gbrain · 79 tokens

mcore-create-issue

Investigate a failing GitHub Actions run or job and create a GitHub issue for the failure.

NVIDIA/skills · 26 tokens

debug-task

Diagnose and fix moon tasks that are broken, misconfigured, or behaving unexpectedly. Use this skill when a moon task is failing, not running, skipped, hanging, producing stale or wrong output, cached when it shouldn't be, re-running every time when it should be cached, or when outputs are empty or missing after a…

moonrepo/moon · 231 tokens

github-ci-fix

Fix failing GitHub CI / Actions checks via fixgithubprci and push to the existing PR head, or fix a branch's failing CI via a linked repair worktree.

Tracer-Cloud/opensre · 40 tokens

github-ci-fix

Use when the user asks OpenSRE to fix failing GitHub CI, GitHub Actions checks, failing pull request checks, a broken PR branch, or CI on a named branch such as main.

Tracer-Cloud/opensre · 45 tokens