dagster: Command for Claude Code

.claude/commands/diagnose_bk_failure.md

diagnose_bk_failure is a command for Claude Code from dagster-io/dagster. It costs 0 tokens per session (410 once invoked), scanned A, original, Apache-2.0.

A command that investigates failed Buildkite builds, which are automated build and test runs, using a specialized failure-analysis agent.

In plain words
What is it for?
Use it to find failing builds, analyze common error patterns, identify whether the issue is functional or infrastructure-related, and suggest fixes.
Why use it?
It gathers the pull request status and detailed logs so developers do not have to trace failing checks manually.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is dagster-io/dagster's own configuration. It tells Claude Code how to work on dagster 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 dagster configures →

About the project

Dagster is a platform for developing, running, and observing data assets, such as datasets and the processes that produce them. It is used to organize and automate data workflows.

dagster-io/dagster · 16,132 stars · on GitHub · dagster.io

Reuse

Borrowing it

Nothing to install: this file belongs to dagster-io/dagster. 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/dagster-io/dagster/master/.claude/commands/diagnose_bk_failure.md
Clone the repo
git clone --depth 1 https://github.com/dagster-io/dagster

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 diagnose_bk_failure

README.md
[![agentmods](https://agentmods.dev/badge/commands/dagster-io/dagster/diagnose_bk_failure/github.svg)](https://agentmods.dev/commands/dagster-io/dagster/diagnose_bk_failure)
Your own site
<a href="https://agentmods.dev/commands/dagster-io/dagster/diagnose_bk_failure"><img src="https://agentmods.dev/badge/commands/dagster-io/dagster/diagnose_bk_failure/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for diagnose_bk_failure

Your own site · 80×15
<a href="https://agentmods.dev/commands/dagster-io/dagster/diagnose_bk_failure"><img src="https://agentmods.dev/badge/commands/dagster-io/dagster/diagnose_bk_failure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 410 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00000 $0.00410
Opus 5 $0.00000 $0.00205
Sonnet 5 $0.00000 $0.00082
Haiku 4.5 $0.00000 $0.00041

Measured 10d ago against content hash 5f73f85e89c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

diagnose_bk_failure scanned grade A with 0 findings 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 10d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/diagnose_bk_failure.md · 53 lines

What it actually says

Diagnose Buildkite Failure

Fast automated diagnosis of Buildkite build failures using the specialized buildkite-error-detective agent.

Usage

/diagnose_bk_failure

What it does

Delegates to buildkite-error-detective agent for:

  • Fast parallel analysis of failing builds (30-45 second target)
  • Pattern-first diagnosis of common failure types
  • Specific actionable fixes with file paths and line numbers
  • Distinction between functional failures vs. test infrastructure issues

Process:

  1. Get PR Status: Uses gh CLI to fetch the current PR's status checks
  2. Find Failing Builds: Identifies failing Buildkite builds and extracts build numbers
  3. Fetch Failure Logs: Uses Buildkite MCP server to get detailed logs from the most recent failing build
  4. Analyze Failures: Examines error patterns and provides diagnosis
  5. Suggest Solutions: Recommends specific fixes or next steps

Requirements

Example Output

Executive Summary: Cache Performance Regression in Asset Partition Status Methods

Root Cause: AssetMixin extraction broke caching behavior - get_materialized_partitions() called more times than expected

Priority Fixes:

  1. Verify AssetMixin Integration: Check cached method delegation in asset mixin structure
  2. Cache Mechanism: Ensure partition status queries properly cached through new mixin
  3. Method Resolution: Confirm cache decorators preserved after method extraction

Affected Tests:

  • test_get_cached_partition_status_changed_time_partitions
  • test_get_cached_partition_status_by_asset
  • Storage & GraphQL partition caching tests (8 failed jobs)

Investigation Time: ~35 seconds ✅

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. 10d ago First seen · 53 lines · 0 tokens per session scan A 5f73f85e89c6

Subscribe to this mod's changes

diagnose_bk_failure is a command published in the GitHub repository dagster-io/dagster (16,132 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 410 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.