finding-google-skills
Locates and loads the right Google product skill on demand from a remote catalog index, instead of preloading every skill. Use at the START of any request…
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
$ npx -y skills add google/skills --skill managed-airflow-dag-authoring --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/managed-airflow-dag-authoringContext preview
The summary Claude sees to decide when to auto-load this skill.
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
name: managed-airflow-dag-authoring description: >- 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. metadata: category: BigDataAndAnalytics
This skill guides you through authoring and validating Apache Airflow DAGs for Managed Service for Apache Airflow (MSAA; formerly Cloud Composer) environments.
--------------------------------------------------------------------------------
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.
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).
environment (see Section 1.3).
Determine if a local development environment is available.
Run the following commands to discover version constraints:
1. **Get Airflow/Image Version:**
gcloud composer environments describe {env_name} \
--location {region} \
--format="value(config.softwareConfig.imageVersion)"2. **Get Installed Packages (Versions):**
gcloud composer environments describe {env_name} \
--location {region} \
--format="value(config.softwareConfig.pypiPackages)"3. **Get DAGs GCS Bucket:**
gcloud composer environments describe {env_name} \
--location {region} \
--format="value(config.dagGcsPrefix)"--------------------------------------------------------------------------------
with the same inputs (e.g., execution date) SHOULD produce the same result and not duplicate data.
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.
unless historical backfilling is explicitly required.
environment-specific configs. Use `Variable.get()` (with `deserialize_json=True` if applicable) and `BaseHook.get_connection()`. Access variables via Jinja templates (e.g., `{{ var.value.my_var }}`) to avoid database calls during DAG parsing.
Use managed-airflow-migrations skill to navigate adjusting the code to specific target Airflow version.
--------------------------------------------------------------------------------
You MUST validate DAGs before concluding your task.
Use `ruff` or `pylint` if available.
ruff check path/to/dag.py
available.
If the user has `composer-dev` configured:
1. Copy the DAG to the local directory with DAGs:
cp path/to/dag.py $(composer-dev describe {local_env} --format="value(dags_directory)")2. Verify parsing:
composer-dev run-airflow-cmd {local_env} dags list-import-errorsOnly perform these steps if you have GCP access and are authorized to deploy to a target environment.
Upload the DAG to the target environment's GCS bucket:
gcloud storage cp path/to/dag.py gs://{target_bucket}/dags/Wait 1-2 minutes for the scheduler to parse the file, then run:
1. **Check for Import Errors:**
gcloud composer environments run {env_name} \
--location {region} \
dags list-import-errors*Pass Criteria:* Output should be "No data found" or empty.
2. **Verify DAG is Listed:**
gcloud composer environments run {env_name} \
--location {region} \
dags list | grep {dag_id}Check for runtime parsing errors in Cloud Logging:
resource.type="cloud_composer_environment"
resource.labels.environment_name="{env_name}"
log_id("airflow-scheduler")
severity>=ERROR
textPayload:"{dag_file_name}"--------------------------------------------------------------------------------
possible).
verified to have no import errors.
This repository contains Agent Skills for Google products and technologies, including Google Cloud.
Repo: google/skills
Locates and loads the right Google product skill on demand from a remote catalog index, instead of preloading every skill. Use at the START of any request…
Provides safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform (GCP) services and infrastructure.…
Provides expert guidance on authenticating and authorizing to Google Cloud services and APIs, covering human users, service identities, Application Default…
Guides a developer's first steps on Google Cloud, covering account creation, billing setup, project management, and deploying a first resource. Use when a new…
Searches, retrieves, and synthesizes official Google developer documentation across Google Cloud, AI/Gemini, Android, Chrome, Web, Flutter, Go, Firebase, and…
Guides developers through managing (adding, removing, and clearing) audience members for Google products using the Data Manager API and its associated client…