Agent skill

CI Failure Triage and Repair

by Chachamaru127 in Chachamaru127/claude-code-harness

Diagnoses failing CI pipelines and tests, deciding first whether the test or the implementation is at fault, and hands hard cases to a dedicated fixer subagent.

MITAuto-check: notesDevOps & Cloud

SKILL.md written in Japanese; this summary is our English description.

Install CI Failure Triage and Repair

skills CLI
$ npx skills add Chachamaru127/claude-code-harness --skill ci -a claude-code

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

GitHub CLI
$ gh skill install Chachamaru127/claude-code-harness ci --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/Chachamaru127/claude-code-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ci .claude/skills/ci && 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
GitHub stars
3.2k
Used in
1 other repo
Token cost
~1.1k tokens
SKILL.md length
104 words
Files
3 (incl. references)
Skills in repo
25
Repo updated
First seen
Licence
MIT

At a glance

Diagnoses failing CI pipelines and tests, deciding first whether the test or the implementation is at fault, and hands hard cases to a dedicated fixer subagent.

  • Works in 5 steps: テスト vs 実装判定(Step 0) → ユーザーの意図を分類(分析 or 修正) → 複雑度を判定(下記参照) → …
  • A CI run or GitHub Actions job has gone red
  • SKILL.md covers 発動条件, 機能詳細, 実行手順 and サブエージェント連携, plus 1 more section
  • Calls git

What it does

Written in Japanese, the skill reacts to reports such as a failed CI run, a failed GitHub Actions job, a build error or tests that will not pass. Step 0 is a quality gate that separates test faults from implementation faults before anything is changed. The agent then classifies your intent as analysis or repair, judges the complexity, reads the matching reference (`references/analyzing-failures.md` or `references/fixing-tests.md`) and checks the result, rerunning if needed.

Guard rails prevent tampering: failures are never fixed by skipping tests or deleting assertions, unconfirmed causes are labeled as hypotheses, and changing test expectations or settings requires an approval request with reasons. Structured `git log` options help locate the offending commit. When a fix-and-rerun loop fails twice or errors span several files, a `ci-cd-fixer` subagent is started, defaulting to dry-run mode.

When your agent uses it

  • A CI run or GitHub Actions job has gone red
  • Tests fail and you need to know whether the code or the test is wrong
  • A fix-and-rerun loop keeps failing across several files

Example prompts

  • “CI is red on my pull request; read the logs and tell me what broke.”
  • “The tests will not pass after my refactor, so work out whether the test or the implementation is wrong.”
  • “Fix the failing pipeline, but ask me before changing any test expectations.”

Requirements

  • Pre-approved tools (allowed-tools): Read, Grep, Bash, Task, Monitor

Workflow steps

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

  1. テスト vs 実装判定(Step 0)
  2. ユーザーの意図を分類(分析 or 修正)
  3. 複雑度を判定(下記参照)
  4. 上記の「機能詳細」から適切な参照ファイルを読む、または ci-cd-fixer サブエージェント起動
  5. 結果を確認し、必要に応じて再実行

What it can do on your machine

Read from SKILL.md and the folder at commit 2b2b748. 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
    • Bash
    • Task
    • Monitor

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

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

  • Network

    No URLs in SKILL.md. Its commands use git, 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 Failure Triage and Repair loads about 1.1k tokens when it runs, and up to ~3.7k if it reads all its reference files. Until then it costs about 54 tokens; SKILL.md has 104 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.7k

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Grep, Bash, Task, Monitor

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 Chachamaru127/claude-code-harness at commit 2b2b748, republished under its MIT licence (© Chachamaru127). 104 words, ~1,056 tokens.

Download SKILL.mdSave it as .claude/skills/ci/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
ci
description
CI red? Call us. Pipeline fire brigade deploys. Use when user mentions CI failures, build errors, test failures, or pipeline issues. Do NOT load for: local builds, standard implementation work, reviews, or setup.
allowed-tools
Read, Grep, Bash, Task, Monitor
description-en
CI red? Call us. Pipeline fire brigade deploys. Use when user mentions CI failures, build errors, test failures, or pipeline issues. Do NOT load for: local…
description-ja
CIが赤くなったら呼んで。パイプライン消防隊、出動します。Use when user mentions CI failures, build errors, test failures, or pipeline issues. Do NOT load for: local builds, standard…
user-invocable
true
context
fork
argument-hint
[analyze|fix|run]

CI/CD Skills

CI/CD パイプラインに関する問題を解決するスキル群です。


発動条件

  • 「CIが落ちた」「GitHub Actionsが失敗」
  • 「ビルドエラー」「テストが通らない」
  • 「パイプラインを直して」

機能詳細

機能詳細トリガー
失敗分析See references/analyzing-failures.md「ログを見て」「原因を調べて」
テスト修正See references/fixing-tests.md「テストを直して」「修正案を出して」

実行手順

  1. テスト vs 実装判定(Step 0)
  2. ユーザーの意図を分類(分析 or 修正)
  3. 複雑度を判定(下記参照)
  4. 上記の「機能詳細」から適切な参照ファイルを読む、または ci-cd-fixer サブエージェント起動
  5. 結果を確認し、必要に応じて再実行
Step 0: テスト vs 実装判定(品質判定ゲート)

CI 失敗時、まず原因の切り分けを行う:

CI 失敗報告
    ↓
┌─────────────────────────────────────────┐
│           テスト vs 実装判定             │
├─────────────────────────────────────────┤
│  エラーの原因を分析:                    │
│  ├── 実装が間違い → 実装を修正          │
│  ├── テストが古い → ユーザーに確認      │
│  └── 環境問題 → 環境修正                │
└─────────────────────────────────────────┘
禁止事項(改ざん防止)
markdown
⚠️ CI 失敗時の禁止事項

以下の「解決策」は禁止です:

| 禁止 | 例 | 正しい対応 |
|------|-----|-----------|
| テスト skip 化 | `it.skip(...)` | 実装を修正 |
| アサーション削除 | `expect()` を消す | 期待値を確認 |
| CI チェック迂回 | `continue-on-error` | 根本原因修正 |
| lint ルール緩和 | `eslint-disable` | コードを修正 |
判断フロー

ログ、再現条件、仕様、差分を読み、実装不具合・期待値と仕様の不一致・環境不備を自分で切り分ける。 原因調査だけの依頼は診断と根拠を返す。修正依頼なら、承認済み範囲の実装修正を進める。 テスト期待値や設定の変更が必要な場合は、下記の承認手順に従う。原因分類そのものをユーザーに委ねない。 未確認の原因は仮説と明記し、テストの skip 化やアサーション削除で解決しない。

承認が必要な場合

テスト/設定の変更がやむを得ない場合:

markdown
## 🚨 テスト/設定変更の承認リクエスト

### 理由
[なぜこの変更が必要か]

### 変更内容
[差分]

### 代替案の検討
- [ ] 実装の修正で解決できないか確認した

ユーザーの明示的な承認を待つ
Git log 拡張フラグの活用(CC 2.1.49+)

CI 失敗時の原因コミット特定に構造化ログを活用します。

原因コミットの特定
bash
# 構造化フォーマットでコミット分析
git log --format="%h|%s|%an|%ad" --date=short -10

# トポロジカル順序で時系列分析
git log --topo-order --oneline -20

# 変更ファイルと原因の紐付け
git log --raw --oneline -5
主な活用場面
用途フラグ効果
失敗原因の特定`--format="%h%s"`
時系列での追跡--topo-orderマージ順序を考慮した追跡
変更影響の把握--rawファイル変更の詳細表示
マージ除外分析--cherry-pick --no-merges実コミットのみを抽出
出力例
markdown
🔍 CI 失敗原因分析

最近のコミット(構造化):
| Hash | Subject | Author | Date |
|------|---------|--------|------|
| a1b2c3d | feat: update API | Alice | 2026-02-04 |
| e4f5g6h | test: add tests | Bob | 2026-02-03 |

変更ファイル(--raw):
├── src/api/endpoint.ts (Modified) ← 型エラー発生
├── tests/api.test.ts (Modified)
└── package.json (Modified)

→ a1b2c3d のコミットが原因の可能性大
  型エラー: src/api/endpoint.ts:42

サブエージェント連携

以下の条件を満たす場合、Task tool で ci-cd-fixer を起動:

  • 修正 → 再実行 → 失敗のループが 2回以上 発生
  • または、エラーが複数ファイルにまたがる複雑なケース

起動パターン:

Task tool:
  subagent_type="ci-cd-fixer"
  prompt="依頼種別: {診断のみ|承認済み修正}\n目的と理由: {expected_behavior_and_why}\n担当範囲: {owned_paths}\n完了条件: {DoD_and_required_checks}\n仕様と承認の参照: {spec_and_user_instruction}\n観測ログと再現条件: {error_log_and_reproduction}\n範囲内で原因を調べ、依頼種別に応じて診断または修正を完了してください。判断理由、変更箇所、実行コマンドと結果、未確認点を返してください。テスト/設定の変更は既存の承認ゲートに従ってください。"

ci-cd-fixer は安全第一で動作(デフォルト dry-run モード)。 詳細は agents/ci-cd-fixer.md を参照。 必要なチェックが通った後の再実行や検証範囲の拡大は、新しい変更、失敗、未解決の懸念がある場合に限る。


VibeCoder 向け

markdown
🔧 CI が壊れたときの言い方

1. **「CI が落ちた」「赤くなった」**
   - 自動テストが失敗している状態

2. **「なんで失敗してるの?」**
   - 原因を調べてほしい

3. **「直して」**
   - 自動で修正を試みる

💡 重要: テストを「ごまかす」修正は禁止です
   - ❌ テストを消す、スキップする
   - ⭕ コードを正しく直す

「テストが間違ってそう」と思ったら、
まず確認してから対応を決めましょう

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

Files

SKILL.md and 2 other files (references) in skills/ci of Chachamaru127/claude-code-harness.

  • SKILL.md
  • references/analyzing-failures.md
  • references/fixing-tests.md

Open the folder on GitHubat commit 2b2b748

Used in 1 other repository

We found 3 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in Chachamaru127/claude-code-harness, which our catalogue first saw on October 7, 2026.

Compare with similar skills

CI Failure Triage and Repair 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 Failure Triage and Repair compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
CI Failure Triage and Repair this skillChachamaru127/claude-code-harness3.2k1 repos~1.1kAutomated safety check: NotesMIT
Megatron-LM CI Failure TriageNVIDIA/Megatron-LM18k—~1.6kAutomated safety check: PassApache-2.0
Lina Community Fix CIlinaproai/linapro160—~1.8kAutomated safety check: PassApache-2.0
ReleaseSma1lboy/rove146—~3.1kAutomated safety check: WarnMIT
GreptimeDB Fuzz CI Failure InvestigationGreptimeTeam/greptimedb6.7k—~4.4kAutomated safety check: PassApache-2.0
CI Triagecanton-network/splice118—~1.4kAutomated safety check: PassApache-2.0

Similar skills

  • Official

    Investigates a failing GitHub Actions run or job for Megatron-LM, finds the root cause plus the PR and test author involved, and files a structured bug issue.

    18k GitHub stars~1.6k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Lina Community Fix CI

    linaproai/linapro

    排查并修复给定的 LinaPro GitHub Actions 失败问题;修复完成后保留本地改动, 禁止自动提交、推送或创建 PR。

    160 GitHub stars~1.8k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Release

    Sma1lboy/rove

    Autonomously cut a Rove (@sma1lboy/rove) release end-to-end — detect the semver bump from pending changesets (flagging an upstream minor you didn't intend), run the release gates, dispatch the…

    146 GitHub stars~3.1k tokensUpdated today
    DevOps & CloudAuto-check: warnings
  • Diagnoses a failed GreptimeDB fuzz CI job by pulling its GitHub Actions logs and fuzz artifacts, then matching the evidence to the local source code.

    6.7k GitHub stars~4.4k tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • CI Triage

    canton-network/splice

    Triage a failed splice GitHub Actions job (cn-test-failures ref) into a reproducible evidence packet - fetch job log and artifact, isolate the flagged lines, check the known flake families for…

    118 GitHub stars~1.4k tokensUpdated today
    Testing & QAAuto-check passed
  • CI Fix

    warpdotdev/oz-skills

    Diagnose and fix GitHub Actions CI failures. An agent skill from warpdotdev/oz-skills.

    825 GitHub stars~790 tokensUpdated 1 mo ago
    DevelopmentAuto-check passed

More from Chachamaru127/claude-code-harness

All 25 skills in this repo
  • Cursor Composer Task Delegate

    Chachamaru127/claude-code-harness

    Hands one implementation task to Cursor Composer in an isolated git worktree, then reviews its diff and cherry-picks the result into the main branch.

    3.2k GitHub stars~4.4k tokensUpdated 2 days ago
    Auto-check: notes
  • Acceptance Demo Generator

    Chachamaru127/claude-code-harness

    Renders a single HTML page showing each acceptance criterion as verified or not, with a ship, wait, or reject recommendation for non-engineers.

    3.2k GitHub stars~3.4k tokensUpdated 2 days ago
    Auto-check: notes
  • Harness Long-Running Task Loop

    Chachamaru127/claude-code-harness

    Repeats a long task as a series of scheduled wake-ups, each re-entering with fresh context and calling harness-work for one task per cycle.

    3.2k GitHub stars~2.3k tokensUpdated 2 days ago
    Auto-check: notes
  • Harness Plan

    Chachamaru127/claude-code-harness

    Creates and maintains Plans.md task plans with a spec delta, updates task markers and syncs plan progress with the implementation.

    3.2k GitHub stars~3.7k tokensUpdated 2 days ago
    Auto-check: notes
  • Harness Release

    Chachamaru127/claude-code-harness

    Runs a release for any project that keeps a Keep a Changelog file on GitHub, from version bump to merge, tag and GitHub Release after a single approval.

    3.2k GitHub stars~4.4k tokensUpdated 2 days ago
    Auto-check: notes
  • Harness Review Dispatcher

    Chachamaru127/claude-code-harness

    Routes a review request to the right mode and reference file in the claude-code-harness project: code, plan or scope review, a quick closeout, a dual Claude-and-Codex opinion, or a security-only pass.

    3.2k GitHub stars~3.6k tokensUpdated 2 days ago
    Auto-check: notes

Questions about CI Failure Triage and Repair

What does CI Failure Triage and Repair do?

Diagnoses failing CI pipelines and tests, deciding first whether the test or the implementation is at fault, and hands hard cases to a dedicated fixer subagent. Written in Japanese, the skill reacts to reports such as a failed CI run, a failed GitHub Actions job, a build error or tests that will not pass. Step 0 is a quality gate that separates test faults from implementation faults before anything is changed.

When should I use CI Failure Triage and Repair?

CI Failure Triage and Repair fits situations like: A CI run or GitHub Actions job has gone red; tests fail and you need to know whether the code or the test is wrong; A fix-and-rerun loop keeps failing across several files.

How do I install CI Failure Triage and Repair in Claude Code?

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

How do I install CI Failure Triage and Repair in Codex?

Run `npx skills add Chachamaru127/claude-code-harness --skill ci -a codex`. Or copy the skill folder (skills/ci in Chachamaru127/claude-code-harness) into .agents/skills/ci in your project. Codex loads it when a task matches its description.

Can I use CI Failure Triage and Repair 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 Chachamaru127/claude-code-harness --skill ci -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, .gemini/skills/ci, .github/skills/ci and .opencode/skills/ci in your project.

What does CI Failure Triage and Repair need to run?

Going by SKILL.md and its folder, CI Failure Triage and Repair needs the command-line tools its instructions call (git). Its frontmatter pre-approves these tools: Read, Grep, Bash, Task, Monitor.

Does CI Failure Triage and Repair access the network?

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

Is CI Failure Triage and Repair safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does CI Failure Triage and Repair use?

CI Failure Triage and Repair 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 Failure Triage and Repair use?

About 1.1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.6k tokens, read only when the agent opens those files.

What are the alternatives to CI Failure Triage and Repair?

Skills that share tags, products or a category with CI Failure Triage and Repair: Megatron-LM CI Failure Triage (NVIDIA/Megatron-LM, 18k stars), Lina Community Fix CI (linaproai/linapro, 160 stars), Release (Sma1lboy/rove, 146 stars) and GreptimeDB Fuzz CI Failure Investigation (GreptimeTeam/greptimedb, 6.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains CI Failure Triage and Repair?

Chachamaru127 (a GitHub user) maintains it in Chachamaru127/claude-code-harness, which has 3,153 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 5, 2026.

Source: Chachamaru127/claude-code-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.