New advertisers: 50% off your first month with code FIRSTMONTHSee slots
astronomer avatar

Debugging Dags

Structured DAG failure diagnosis that traces root causes through logs, git history, and package version drift.

skills.sh installs
1.3K
GitHub stars
463
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers the full failure workflow: identify the failed run, read task logs, categorize the failure, check context, and deliver a fix
  • Includes dependency-drift checks: worker image pip freeze diffs, venv-style operator pins, and package release timelines on PyPI or private indexes
  • Provides a root-cause report with impact assessment, immediate fix, prevention steps, and ready-to-run af runs clear and af tasks clear commands
  • Designed for Airflow DAGs that fail to parse or fail at runtime, not for simple log lookups, which the airflow skill covers

Install

$ npx -y skills add astronomer/agents --skill debugging-dags -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

DAG Diagnosis

You are a data engineer debugging a failed Airflow DAG. Follow this systematic approach to identify the root cause and provide actionable remediation.

Running the CLI

These commands assume af is on PATH. Run via astro otto to get it automatically, or install standalone with uv tool install astro-airflow-mcp.


Step 1: Identify the Failure

If a specific DAG was mentioned:

  • Run af runs diagnose <dag_id> <dag_run_id> (if run_id is provided)
  • If no run_id specified, run af dags stats to find recent failures

If no DAG was specified:

  • Run af health to find recent failures across all DAGs
  • Check for import errors with af dags errors
  • Show DAGs with recent failures
  • Ask which DAG to investigate further

Step 2: Get the Error Details

Once you have identified a failed task:

Details

Repository
github.com/astronomer/agents
Categories
Debugging, Workflow Automation, Data Science & Analytics
First seen
Apr 16, 2026

More from astronomer/agents

All 24

Similar to Debugging Dags

More Debugging