Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

mz-debug-ci

БесплатноБез исполняемых скриптовНе проверен

Investigate CI failures on PR via gh + Buildkite MCP or bk CLI. Trigger: failing checks, Buildkite failures, CI issues — "why is CI red", "build broken"…

MaterializeIncот MaterializeInc★ 6 417 звёзд на GitHub

Об этом скилле

Investigate CI failures for a Materialize PR or Buildkite build.

If the input is a Buildkite build URL rather than a PR (a scheduled nightly on main, a release-qualification build), start directly at "Listing a build's failed jobs directly", taking <PIPELINE> and <BUILD_NUMBER> straight from the URL: https://buildkite.com/materialize/<PIPELINE>/builds/<BUILD_NUMBER>, then continue from Step 2.

Prerequisites

This skill requires gh (GitHub CLI), authenticated, plus one of two ways to reach Buildkite: the Buildkite MCP server's tools (preferred, next section) or bk (Buildkite CLI), authenticated. If any of these turns out to be missing or unauthenticated, stop immediately and tell the user what to fix (bk configure or bk auth login for the Buildkite CLI, or the MCP setup below). Do not attempt to use the REST API directly or any other workaround.

Buildkite MCP: preferred when available

When the Buildkite MCP server's tools are available in the session (tool names like get_build_failure_summary, search_logs, ...), prefer them over bk everywhere below: structured JSON with the job-state semantics already applied, and no log cleanup needed. The server documents its own tools; this section adds only what it does not know:

  • org_slug is materialize. get_build_failure_summary replaces "Listing a build's failed jobs directly", Step 2, and often Step 3; search_logs/read_logs/tail_logs replace the bk job log pipelines; the artifact and annotation tools replace the corresponding bk commands. Everything Materialize-specific (annotation contents, bin/ci-failures, bin/ci-shards, Steps 4-5) applies unchanged.
  • The summary's job list is bounded by the response's job_limit (10 on the hosted server, where a larger max_jobs is silently clamped), with terminal problem jobs sorted before downstream broken ones. On jobs_truncated: true, get the definitive failed-job list from list_jobs with state: "failed,timed_out" and include_retried_jobs: false. That last parameter is what preserves triage semantics: the server defaults it to true, which counts every failed attempt of a retried job separately, including jobs that passed on retry. The summary bounds annotation content too: on content_truncated: true, fetch the full set with list_annotations.

If the MCP is absent, read bk-fallback.md in this skill's directory for the bk command recipes and continue with those. At the end, mention to the user that they can set the server up (hosted read-only endpoint: claude mcp add --scope user --transport http buildkite https://mcp.buildkite.com/mcp/readonly; it saves tool calls but costs somewhat more tokens).

Search existing failures by pattern

Search for already recorded failures in CI with a short, stable error substring. The output is JSON whose content blobs are huge, so project it down, and read the total from .meta.totalRowCount, which ignores the row cap and is the "how chronic is this?" number:

bin/ci-failures 'foobar' 2>/dev/null | jq -r '.meta.totalRowCount,
  (.data[] | [.build_date[0:10], .build_identifier, .test_suite, .issue] | @tsv)'

The positional pattern matches failure content. --search <text> replaces the positional pattern and matches across build, test, issue, content, and branch at once. Narrow results with --branch main, --version, --issue, --test (the Buildkite job name), --build, --start-date, or --end-date; --size raises the row cap (default 31, max 100).

Reviews in the CI ledger

Failed jobs of main and of release builds (release candidates included) as well as proven flakes in PRs (failed first, then succeeded in rerun) are also in the CI ledger, grouped into patterns that are reviewed once: a status (unreviewed, claimed, reviewed, fixed), a type (deterministic, flaky, infrastructure), a cause, a related bug, and the fixing PR. A review is shared by main and every release the pattern fails in. Before investigating such a failure, check whether someone reviewed it already. A Buildkite job URL names the entries that job failed with, and show needs an entry id when there are several:

bin/ci-ledger show 'https://buildkite.com/materialize/<PIPELINE>/builds/<BUILD_NUMBER>#<JOB_ID>'
bin/ci-ledger list --scope main
bin/ci-ledger update <ENTRY_ID> ...

Step 1: Find the build

Parse $ARGUMENTS to get the PR number (a plain number or a https://github.com/MaterializeInc/materialize/pull/<PR_NUMBER> URL), then list the failing checks:

gh pr checks <PR_NUMBER> 2>&1

Failing rows link to https://buildkite.com/materialize/<PIPELINE>/builds/<BUILD_NUMBER>#<JOB_ID>, the identifiers used throughout this skill.

Listing a build's failed jobs directly

Buildkite mirrors each job's result into GitHub as a buildkite/<pipeline>/<job> commit status (never-dispatched jobs post nothing), but gh pr checks reads the PR's current head

Полный SKILL.md на GitHub

Установить mz-debug-ci в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

bk-fallback.mdrare-failures.md

FAQ

Что делает скилл mz-debug-ci?

Investigate CI failures on PR via gh + Buildkite MCP or bk CLI. Trigger: failing checks, Buildkite failures, CI issues — "why is CI red", "build broken", "checks failing", "what went wrong in CI", "nightly broke", "tests failing on this PR", or pasted Buildkite URL. Also PR number + why failing, and reviewing failures of main and releases in the CI ledger ("mark the nightly failures fixed").

Как установить скилл mz-debug-ci?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл mz-debug-ci запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить mz-debug-ci с