スキル一覧に戻る
mcncl

step-analysis

by mcncl

A Claude Code plugin for Buildkite.

0🍴 0📅 2026年1月19日
GitHubで見るManusで実行

SKILL.md


name: step-analysis description: Analyzes why Buildkite pipeline steps were skipped, didn't run, or behaved unexpectedly. Use when a user asks why a step didn't execute, was skipped, or wants to understand step dependencies.

Step Analysis

You are helping a user understand why a pipeline step didn't run as expected, was skipped, or behaved unexpectedly.

Approach

  1. Get Build Information

    • Use buildkite_get_build to fetch the build with all job details
    • Look at each job's state field to understand what happened
    • Check for skipped, blocked, waiting, waiting_failed states
  2. Analyze Step States

    StateMeaning
    scheduledWaiting to be assigned to an agent
    assignedAssigned to agent, waiting to start
    acceptedAgent accepted, starting soon
    runningCurrently executing
    passedCompleted successfully
    failedCommand returned non-zero exit
    blockedWaiting for manual unblock
    canceledUser or system cancelled
    cancelingIn process of cancelling
    skippedSkipped due to condition
    not_runDependency failed, step not run
    waitingWaiting for dependency
    waiting_failedWaiting but will not run
    timed_outExceeded timeout
  3. Check Pipeline Configuration

    • If the user has a pipeline.yml, read it to understand the intended flow
    • Look for these step-control fields:
      • if: Conditional expression that must evaluate to true
      • depends_on: Steps that must complete first
      • allow_dependency_failure: Whether to run if dependency failed
      • branches: Branch filter patterns
      • skip: Explicit skip condition
  4. Investigate Specific Scenarios

Step Skipped

  • Check the if condition - what variables were evaluated?
  • Look at branch filters - does this branch match?
  • Check if skip: true or a skip message was set
  • Review build metadata that might affect conditions

Step Didn't Run (not_run state)

  • Identify which dependency failed using depends_on
  • Check if allow_dependency_failure: true was set
  • Look at the dependency chain - find the root failure

Step Stuck in Waiting

  • Check what it's waiting for: dependency, agent, or block
  • If waiting for agents: check queue and agent tags
  • If blocked: check who can unblock and current state

Step Timed Out

  • Check timeout_in_minutes setting
  • Look at logs to see what was happening when timeout hit
  • Consider if the step is legitimately slow or stuck

Understanding Conditionals

Buildkite if conditions can reference:

  • build.branch - Branch name
  • build.tag - Tag name (if tag build)
  • build.message - Commit message
  • build.source - What triggered the build (webhook, ui, api, schedule)
  • build.env.* - Environment variables
  • build.meta_data.* - Build metadata
  • build.pull_request.* - PR information

Example conditions:

# Only on main
if: build.branch == "main"

# Skip for PRs from forks
if: build.pull_request.repository.fork != true

# Only when specific files changed
if: build.env.BUILDKITE_PLUGINS =~ /docker/

Response Format

  1. What Happened: Clear explanation of the step's state
  2. Why: The specific condition or dependency that caused this
  3. Evidence: Point to the exact configuration or build data
  4. Resolution: How to change behavior if desired

Important Notes

  • Always fetch the actual build data - don't guess about step states
  • If the pipeline YAML is available, cross-reference with actual execution
  • Consider that dynamic pipelines may modify steps at runtime
  • Group steps can affect how dependencies are interpreted

スコア

総合スコア

55/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

0/5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です