auditing-skills
Use when checking skills for security or quality issues, reviewing audit results from skills.sh or Tessl, or remediating findings across published skills.
Diagnoses dbt Cloud/platform job failures by analyzing run logs, querying the Admin API, reviewing git history, and investigating data issues. Use when a dbt Cloud/platform job fails and you need to diagnose the root cause, especially when error messages are unclear or when
$ npx -y skills add dbt-labs/dbt-agent-skills --skill troubleshooting-dbt-job-errors --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/troubleshooting-dbt-job-errorsContext preview
The summary Claude sees to decide when to auto-load this skill.
Diagnoses dbt Cloud/platform job failures by analyzing run logs, querying the Admin API, reviewing git history, and investigating data issues. Use when a dbt Cloud/platform job fails and you need to diagnose the root cause, especially when error messages are unclear or when
name: troubleshooting-dbt-job-errors description: Diagnoses dbt Cloud/platform job failures by analyzing run logs, querying the Admin API, reviewing git history, and investigating data issues. Use when a dbt Cloud/platform job fails and you need to diagnose the root cause, especially when error messages are unclear or when intermittent failures occur. Do not use for local dbt development errors. user-invocable: false metadata: author: dbt-labs
Systematically diagnose and resolve dbt Cloud job failures using available MCP tools, CLI commands, and data investigation.
**Not for:** Local dbt development errors - use the skill `using-dbt-for-analytics-engineering` instead
**Never modify a test to make it pass without understanding why it's failing.**
A failing test is evidence of a problem. Changing the test to pass hides the problem. Investigate the root cause first.
| You're Thinking... | Reality | |-------------------|---------| | "Just make the test pass" | The test is telling you something is wrong. Investigate first. | | "There's a board meeting in 2 hours" | Rushing to a fix without diagnosis creates bigger problems. | | "We've already spent 2 days on this" | Sunk cost doesn't justify skipping proper diagnosis. | | "I'll just update the accepted values" | Are the new values valid business data or bugs? Verify first. | | "It's probably just a flaky test" | "Flaky" means there's an overall issue. Find it. We don't allow flaky tests to stay. |
flowchart TD
A[Job failure reported] --> B{MCP Admin API available?}
B -->|yes| C[list_jobs, filter to target project/env]
B -->|no| D[Ask user for logs and run_results.json]
C --> E[list_jobs_runs by job_id, get_job_run_error]
D --> F[Classify error type]
E --> F
F --> G{Error type?}
G -->|Infrastructure| H[Check warehouse, connections, timeouts]
G -->|Code/Compilation| I[Check git history for recent changes]
G -->|Data/Test Failure| J[Use discovering-data skill to investigate]
H --> K{Root cause found?}
I --> K
J --> K
K -->|yes| L[Create branch, implement fix]
K -->|no| M[Create findings document]
L --> N[Add test - prefer unit test]
N --> O[Create PR with explanation]
M --> P[Document what was checked and next steps]Use these tools first - they provide the most comprehensive data:
> **Note:** `list_jobs` and `list_jobs_runs` results may span multiple projects/environments depending on how the Admin API and request are configured. Each `list_jobs` entry carries `project_id` and `environment_id`; runs also carry `project_id`. When you have a target job, always pass `job_id` to `list_jobs_runs`. When selecting among jobs, filter to the project/environment you're investigating.
| Tool | Purpose | |------|---------| | `list_jobs` | List jobs; each entry carries `project_id` and `environment_id` for filtering to the target project/environment | | `list_jobs_runs` | Get recent run history for a specific job (always pass `job_id`) | | `get_job_run_error` | Get detailed error message and context |
# List jobs and filter to the target project/environment (project_id = 1234 in this example)
jobs = list_jobs()
target_jobs = [j for j in jobs if j["project_id"] == 1234]
# Get recent failed runs for each job
for job in target_jobs:
list_jobs_runs(job_id=job["id"], status="error", limit=5)
# Get error details for a specific run
get_job_run_error(run_id=67890)**Ask the user to provide these artifacts:**
1. **Job run logs** from dbt Cloud UI (Debug logs preferred) 2. **`run_results.json`** - contains execution status for each node
To get the `run_results.json`, generate the artifact URL for the user:
https://<DBT_ENDPOINT>/api/v2/accounts/<ACCOUNT_ID>/runs/<RUN_ID>/artifacts/run_results.json?step=<STEP_NUMBER>
Where:
Example request: > "I don't have access to the dbt MCP server. Could you provide: > 1. The debug logs from dbt Cloud (Job Run → Logs → Download) > 2. The run_results.json - open this URL and copy/paste or upload the contents: > `https://cloud.getdbt.com/api/v2/accounts/12345/runs/67890/artifacts/run_results.json?step=4`
| Error Type | Indicators | Primary Investigation | |------------|-----------|----------------------| | **Infrastructure** | Connection timeout, warehouse error, permissions | Check warehouse status, connection settings | | **Code/Compilation** | Undefined macro, syntax error, parsing error | Check git history for recent changes, use LSP tools | | **Data/Test Failure** | Test failed with N results, schema mismatch | Use `discovering-data` skill to query actual data |
1. Check job configuration (timeout settings, execution steps, etc.) 2. Look for concurrent jobs competing for resources 3. Check if failures correlate with time of day or data volume
1. **Check git history for recent changes:**
If you're not in the dbt project directory, use the db
A curated collection of Agent Skills for working with dbt. These skills help AI agents understand and execute dbt workflows more effectively.
Use when checking skills for security or quality issues, reviewing audit results from skills.sh or Tessl, or remediating findings across published skills.
Generates a Mermaid flowchart diagram of dbt model lineage using MCP tools, manifest.json, or direct code parsing as fallbacks. Use when visualizing dbt model…
Use when a user needs help triaging dbt-core to dbt v2 migration errors. Runs dbt-autofix first, then classifies remaining errors into actionable categories…
Use when migrating a dbt project from one data platform or data warehouse to another (e.g., Snowflake to Databricks, Databricks to Snowflake) using dbt…
Use when a user wants to upgrade, update, or migrate a dbt-core project to the latest version — e.g. "upgrade my dbt project," "migrate this off dbt-core 1.5,"…
Creates unit test YAML definitions that mock upstream model inputs and validate expected outputs. Use when adding unit tests for a dbt model or practicing…