task-debugger
Debug and fix failures in Taskcluster tasks. Use this skill when the user asks to debug a task, fix a failing task, or investigate task errors/failures. This skill uses the Taskcluster CLI to fetch task logs and definitions, analyzes errors, and uses `taskgraph load-task --develop` to reproduce and debug issues locally. Invoke this for any request involving Taskcluster task debugging, task failures, or when given a task ID to investigate.
When & Why to Use This Skill
This Claude skill automates the debugging and resolution of Taskcluster task failures within CI/CD pipelines. By leveraging the Taskcluster CLI and taskgraph tools, it streamlines the process of fetching logs, analyzing complex error patterns, and reproducing issues in local environments. It is designed to reduce the Mean Time to Recovery (MTTR) for developers and DevOps engineers by providing a structured, automated workflow for investigating pipeline bottlenecks and execution errors.
Use Cases
- Automated Error Diagnosis: Quickly identify the root cause of pipeline failures by automatically fetching and parsing Taskcluster logs for tracebacks, test failures, or build errors.
- Local Environment Reproduction: Use the 'taskgraph' integration to mirror remote Docker-worker tasks locally, allowing developers to iterate on fixes without waiting for remote CI cycles.
- Task Definition Auditing: Investigate task definitions and environment configurations to identify misconfigured resources or command execution errors within the Taskcluster ecosystem.
- Verification and Cleanup: Systematically verify code fixes using local reproduction methods and ensure all debug artifacts are cleaned up before finalizing the resolution.
| name | task-debugger |
|---|---|
| description | Debug and fix Taskcluster task failures |
Setup
Taskcluster CLI:
taskcluster version # check if installed
export TASKCLUSTER_ROOT_URL=https://firefox-ci-tc.services.mozilla.com
If not installed: https://github.com/taskcluster/taskcluster/releases/latest/
Commands:
taskcluster task log <task-id>- Get logstaskcluster task def <task-id>- Get definition (optional)
Debug Process
- Extract task ID from message or URL
- Fetch logs:
taskcluster task log <task-id> - Analyze errors (tracebacks, test failures, build errors)
- If fix is obvious → apply it. Otherwise → reproduce locally:
- Docker-worker tasks:
taskgraph load-task --develop <task-id>(Firefox:./mach taskgraph, others: check virtualenv oruv run taskgraph) - Flags:
--interactive,--volume,--root,--image,--keep - Non-docker: extract command from task def and run locally
- Docker-worker tasks:
- For non-obvious issues: add debug statements → iterate → fix
- Verify fix using same reproduction method
- Clean up debug artifacts (don't re-verify after cleanup)
- Report: root cause, fix, verification, files changed