askill
build-debugging

build-debuggingSafety 95Repository

Analyzes failed Buildkite builds to identify root causes and provide fixes.

0 stars
1.2k downloads
Updated 1/29/2026

Package Files

Loading files...
SKILL.md

Build Debugging

Analyze failed Buildkite builds to identify root causes and provide actionable fixes.

When to use

  • "Why did build X fail?"
  • "Debug this build"
  • "What's wrong with my CI?"
  • "Fix this build failure"
  • "Help me understand this error"
  • /buildkite:debug

Available MCP Tools

ToolPurpose
get_buildFetch build details including all jobs and their states
read_logsGet full log output for a specific job
search_logsSearch for patterns within job logs
tail_logsShow last N log entries
get_build_test_engine_runsGet Test Engine results for the build
get_failed_executionsGet details of failed tests
list_artifacts_for_buildList uploaded artifacts
get_artifactDownload a specific artifact
list_annotationsList build annotations

Input Parsing

Parse build information from $ARGUMENTS or the user's message:

Input FormatExample
Full URLhttps://buildkite.com/org/pipeline/builds/123
Build number123
Pipeline + buildmy-pipeline#123 or my-pipeline 123
Description"the latest failed build on main"

If no build specified, ask the user which build to debug.

Approach

  1. Fetch the build with buildkite_get_build

    • Note the overall state, branch, commit, and message
    • Check if this is a retry or first attempt
  2. Identify failed jobs in the jobs array

    • Look for state: "failed" or state: "timed_out"
    • Note job names/labels to understand what failed
    • Check job exit codes
  3. Read logs with buildkite_read_logs for failed jobs

    • Focus on the last 50-100 lines where failures surface
    • Look for the FIRST error, not just the last (cascading failures are common)
  4. Check test results if applicable

    • Use buildkite_get_build_test_engine_runs for Test Engine data
    • Use buildkite_get_failed_test_executions for failure details
  5. Review artifacts for additional context

    • Test reports, coverage data, debug outputs

Common Failure Patterns

Exit Codes

CodeMeaningAction
1General errorCheck command output
127Command not foundMissing dependency or PATH issue
137OOM killed (128+9)Increase memory or optimize
143SIGTERM (128+15)Timeout or cancelled

Test Failures

  • Flaky tests: Check if same test passed on retry
  • Environment differences: Compare agent tags, env vars
  • Timing issues: Race conditions or async problems

Infrastructure Issues

  • Agent disconnected: Network or agent health
  • Timeout: Job exceeded timeout_in_minutes
  • No agents: Check queue and agent tags

Response Format

  1. Summary: One-line description of what failed
  2. Root Cause: What actually caused the failure
  3. Evidence: Relevant log snippets (use code blocks)
  4. Recommendation: Specific steps to fix
  5. Prevention: How to avoid this in future (if applicable)

Example Interaction

User: Why did build 456 fail?

1. Fetch build 456 with buildkite_get_build
2. Find failed job: "Run Tests" with exit code 1
3. Read logs, find: "Error: Cannot find module 'lodash'"
4. Respond with root cause (missing dependency) and fix (add to package.json)

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

92/100Analyzed 3/1/2026

Comprehensive and highly actionable skill for debugging Buildkite CI failures. Well-structured with clear steps, MCP tools documentation, common failure patterns, and response templates. Located in dedicated skills folder with appropriate tags. No internal-only signals - this is a general-purpose, reusable skill.

95
90
90
88
92

Metadata

Licenseunknown
Version-
Updated1/29/2026
Publishermcncl

Tags

ci-cdtesting