Agent skill · google
managed-airflow-dag-authoring
Provides guidance for authoring Apache Airflow DAGs in Managed Service for Apache Airflow (MSAA; formerly Cloud Composer). Covers environment context discovery, Airflow 2 vs 3 compatibility, authoring best practices, and local/remote validation processes. Use when creating or extending an Airflow DAG. Don't use when authoring Python code unrelated to Airflow DAGs.
What it needs
About 3k tokens when loaded.
What this skill does
GCP Managed Airflow DAG Authoring Guide This skill guides you through authoring and validating Apache Airflow DAGs for Managed Service for Apache Airflow (MSAA; formerly Cloud Composer) environments. -------------------------------------------------------------------------------- Phase 1: Context Discovery Before writing any DAG code, you MUST understand the constraints (e.g. version of Airflow) and capabilities of your target environment if user is willing to provide them. 1.1 Identify Target Environment & Access Determine if you have direct access to the target Managed Airflow environment, local development environment or if you are working offline (only changing local files without validation). If environment access is available: Use gcloud to inspect the environment (see Section 1.3). If offline: Rely on user provided details. 1.2 Identify Development Environment Determine if a local development environment is available. Check if composer-dev CLI is installed. Check if a local Python environment with airflow is available. 1.3 Inspect Target Environment (if available and requested) Run the following commands to discover version constraints: 1. Get Airflow/Image Version: 2. Get Installed Packages (Versions): 3. Get DAGs GCS Bucket: -------------------------------------------------------------------------------- Phase 2: DAG Authoring Best Practices 2.1 General Airflow Best Practices Idempotency: Every task SHOULD be idempotent. Running it multiple times with the same inputs (e.g., execution date) SHOULD produce the same result and not duplicate data. No Top-Level Code Execution: Do NOT execute database queries, external API calls, or heavy computations at the top level of the DAG file (outside of tasks/operators). This code runs every few seconds during DAG parsing and will degrade performance. Explicit Catchup: Always set catchup=False in the DAG definition unless historical backfilling is explicitly required. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills google/managed-airflow-dag-authoring