managed-airflow-dag-authoring

Guides authoring and validating Apache Airflow DAGs for GCP Managed Airflow environments.

Updated May 11, 2026
One-click install
npx skills add https://github.com/alon3153/upe-social-publisher --skill managed-airflow-dag-authoring-alon3153
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: managed-airflow-dag-authoring
Source: https://github.com/alon3153/upe-social-publisher/tree/main/.agents/skills/managed-airflow-dag-authoring
Command: npx skills add https://github.com/alon3153/upe-social-publisher --skill managed-airflow-dag-authoring-alon3153

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing Airflow DAGs for Managed Service for Apache Airflow (MSAA, formerly Cloud Composer) requires matching the target environment's Airflow version, installed packages, and deployment constraints, and mistakes often surface only as import errors after deployment. ## Core Features & Use Cases - Environment Context Discovery: Uses gcloud commands to inspect the target environment's image version, PyPI packages, and DAGs GCS bucket before writing code. - Authoring Best Practices: Enforces idempotency, no top-level code execution, explicit catchup settings, and Airflow Variables/Connections instead of hardcoded credentials. - Local and Remote Validation: Covers ruff/pylint linting, composer-dev local parsing checks, GCS deployment, and Airflow CLI import-error verification. - Use Case: When asked to create a new DAG for a Cloud Composer environment, the Skill first discovers the Airflow version, writes compatible DAG code, then validates it locally and on the target environment. ## Quick Start Ask the assistant to author a new Airflow DAG for your Managed Airflow environment and validate it against the target environment's version constraints.

Frequently Asked Questions about managed-airflow-dag-authoring

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I author an Airflow DAG for Cloud Composer?

Start by discovering the target environment's Airflow image version and installed PyPI packages using gcloud composer environments describe. Then write the DAG following best practices like idempotency and no top-level code execution, and validate it before deployment.

How to validate an Airflow DAG before deploying to Cloud Composer?

Run ruff or pylint for static analysis, then use composer-dev to copy the DAG into a local environment and run dags list-import-errors. For target validation, upload to the GCS dags bucket and check import errors via gcloud composer environments run.

Does Airflow 3 require different DAG code than Airflow 2?

Yes, Airflow 2 and Airflow 3 have compatibility differences that affect DAG code. The Skill directs you to a dedicated migrations skill to adjust code for the specific target Airflow version.

Why does my Airflow DAG cause performance issues during parsing?

Top-level code execution, such as database queries or API calls outside tasks, runs every few seconds during DAG parsing and degrades performance. Move such logic inside tasks and access variables via Jinja templates.

When should I not use this Airflow DAG authoring guidance?

Do not use it when writing Python code unrelated to Airflow DAGs. It is scoped specifically to creating or extending DAGs for Managed Airflow environments, not general Python development.