authoring-dags
DAG Authoring Skill
This skill guides you through creating and validating Airflow DAGs using best practices and the VS Code extension tools.
For testing and debugging DAGs, see the testing-dags skill.
Critical Warning: Use Extension Tools
Use the Airflow VS Code extension tools for all Airflow operations. Avoid running Airflow CLI commands for listing DAGs, checking logs, or inspecting runs.
Workflow Overview
- Discover
- Plan
- Implement
- Validate
- Test (with user consent)
- Iterate
Phase 1: Discover
Explore the codebase
Use file tools to find existing patterns:
- Search for existing DAGs in the repo
- Read similar DAGs for conventions
- Check requirements and providers in use
Query Airflow via extension tools
Use these tools to understand the environment:
list_active_dagsandlist_paused_dagsfor naming conventionsget_running_dagsfor current activityget_dag_historyto see run cadencego_to_connections_viewandgo_to_variables_viewfor configurationgo_to_providers_viewandgo_to_plugins_viewfor installed componentsgo_to_server_health_viewfor health checks
Phase 2: Plan
Propose:
- DAG structure (tasks, dependencies, schedule)
- Operators to use
- Connections and variables needed
- Package changes if required
Get user approval before implementing.
Phase 3: Implement
- Create or update the DAG file
- Update dependencies if needed
- Save the file
Phase 4: Validate
After the DAG is deployed to Airflow, validate via tools:
- Confirm the DAG appears in
list_active_dagsorlist_paused_dags - Use
get_dag_source_codeto verify the deployed source - Review run history with
get_dag_history
Phase 5: Test
Follow the testing-dags skill:
- Ask for consent
- Trigger with
trigger_dag_run - Review results with
get_dag_runsandanalyse_dag_latest_run
Notes
- Avoid CLI checks like
airflow dags listorastro dev runfor operational status. - Use the extension tools for runtime investigation and logs.
More from necatiarslan/airflow-vscode-extension
migrating-airflow-2-to-3
Guide for migrating Apache Airflow 2.x projects to Airflow 3.x. Use when the user mentions Airflow 3 migration, upgrade, compatibility issues, breaking changes, or wants to modernize their Airflow codebase.
29airflow-hitl
Use when the user needs human-in-the-loop workflows in Airflow (approval/reject, form input, or human-driven branching). Covers ApprovalOperator, HITLOperator, HITLBranchOperator, HITLEntryOperator. Requires Airflow 3.1+.
28annotating-task-lineage
Annotate Airflow tasks with data lineage using inlets and outlets. Use when the user wants to add lineage metadata to tasks, specify input/output datasets, or enable lineage tracking for operators without built-in OpenLineage extraction.
28airflow
Manages Apache Airflow operations including listing, running, and debugging DAGs, viewing logs, and checking server status using the VS Code extension tools.
27testing-dags
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".
27debugging-dags
Comprehensive DAG failure diagnosis and root cause analysis. Use for complex debugging requests requiring deep investigation like "diagnose and fix the pipeline" or "full root cause analysis".
27