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
-
Get Build Information
- Use
buildkite_get_buildto fetch the build with all job details - Look at each job's
statefield to understand what happened - Check for
skipped,blocked,waiting,waiting_failedstates
- Use
-
Analyze Step States
State Meaning 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 -
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
-
- If the user has a
-
Investigate Specific Scenarios
Step Skipped
- Check the
ifcondition - what variables were evaluated? - Look at branch filters - does this branch match?
- Check if
skip: trueor 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: truewas 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_minutessetting - 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
- What Happened: Clear explanation of the step's state
- Why: The specific condition or dependency that caused this
- Evidence: Point to the exact configuration or build data
- 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
chat Comments (0)
Sign in to join the discussion and leave a comment.
Skill Details
GitHub Stars
0
GitHub Forks
0
Created
Jan 2026
Last Updated
5 months ago
tools
tools productivity tools
Related Skills
Build your own?
Join 12,000+ developers contributing to the Claude ecosystem.
No comments yet. Be the first to share your thoughts!