Complex DAG testing workflows with debugging and fixing cycles. Use for multi-step testing requests like "test this dag and fix it if it fails", "test and debug", "run the pipeline and troubleshoot issues". For simple test requests ("test dag", "run dag"), the airflow entrypoint skill handles it directly. This skill is for iterative test-debug-fix cycles.
View on GitHubSelect agents to install to:
npx add-skill https://github.com/astronomer/agents/blob/main/skills/testing-dags/SKILL.md -a claude-code --skill testing-dagsInstallation paths:
.claude/skills/testing-dags/# DAG Testing Skill --- ## ๐ FIRST ACTION: Just Trigger the DAG When the user asks to test a DAG, your **FIRST AND ONLY action** should be: ``` trigger_dag_and_wait(dag_id="<dag_id>", timeout=300) ``` **DO NOT:** - โ Call `list_dags` first - โ Call `get_dag_details` first - โ Call `list_import_errors` first - โ Use `grep` or `ls` or any bash command - โ Do any "pre-flight checks" **Just trigger the DAG.** If it fails, THEN debug. --- ## โ ๏ธ CRITICAL WARNING: Use MCP Tools, NOT CLI Commands โ ๏ธ > **STOP! Before running ANY Airflow-related command, read this.** > > You MUST use MCP tools for ALL Airflow interactions. CLI commands like `astro dev run`, `airflow dags test`, or shell commands to read logs are **FORBIDDEN**. > > **Why?** MCP tools provide structured, reliable output. CLI commands are fragile, produce unstructured text, and often fail silently. --- ## CLI vs MCP Quick Reference | โ DO NOT USE | โ USE INSTEAD | |---------------|----------------| | `astro dev run dags test` | `trigger_dag_and_wait` MCP tool | | `airflow dags test` | `trigger_dag_and_wait` MCP tool | | `airflow tasks test` | `trigger_dag_and_wait` MCP tool | | `cat` / `grep` / `tail` on logs | `get_task_logs` MCP tool | | `astro dev run dags list` | `list_dags` MCP tool | | Any `astro dev run ...` | Equivalent MCP tool | | Any `airflow ...` CLI | Equivalent MCP tool | | `ls` on `/usr/local/airflow/dags/` | `list_dags` or `explore_dag` MCP tool | | `cat ... \| jq` to filter MCP results | Read the JSON directly from MCP response | | `grep` on MCP tool result files | Read the JSON directly from MCP response | | `ls` on local dags directory | Not needed โ just trigger the DAG | | `pwd` to check directory | Not needed โ just trigger the DAG | **Remember:** - โ Airflow is ALREADY running โ the MCP server handles the connection - โ Just call `trigger_dag_and_wait` โ don't check anything first - โ Do NOT call `list_dags` before testing โ just trigger - โ Do NOT use shell commands (`ls`, `