gcp-managed-airflow-dag-authoring
This skill guides agents through authoring and validating Apache Airflow DAGs for GCP Managed Service for Apache Airflow.
Identity proven by GitHub's verified organisation badge (flutter, google)
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
- License
- Apache-2.0 (permissive)
- Pin
- 0dd8034pinned Oct 9, 2026
- Context cost
- about 1,300 tokenswhen the skill loads
- GitHub stars
- 215on googlecloudplatform/data-agent-kit-plugin
- Scripts
- None found
What it does
“Guides the authoring and validation of Apache Airflow DAGs for 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.”
Generated summary from the skill's own text
This skill guides agents through authoring and validating Apache Airflow DAGs for GCP Managed Service for Apache Airflow. It covers discovering environment constraints via gcloud commands, applying Airflow 2 and 3 best practices, and validating DAGs both locally and in target environments.
When to use it
- Creating or extending Apache Airflow DAGs for GCP Composer environments
- Validating DAG syntax and import errors before deployment
- Ensuring DAGs follow idempotency and Airflow best practices
- Understanding target Airflow version constraints and dependencies
When not to
- Writing Python code unrelated to Airflow DAGs
- Authoring DAGs for non-GCP Airflow installations
- Migrating legacy DAG code between Airflow versions
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add googlecloudplatform/data-agent-kit-plugin --skill gcp-managed-airflow-dag-authoringInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install googlecloudplatform/data-agent-kit-plugin gcp-managed-airflow-dag-authoring@0dd8034c50d6bce0290b99190cd44b06fcbec2c1Installs the commit we checked (0dd8034).
Copy by hand
Download the folder at 0dd8034 and put it in .claude/skills/gcp-managed-airflow-dag-authoring for Claude Code and in .agents/skills/gcp-managed-airflow-dag-authoring for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Claude Code plugin
/plugin install chrome-devtools-mcp@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Claude Code plugin
/plugin install alloydb-omni@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Claude Code plugin
/plugin install bigquery-data-analytics@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "gcp-managed-airflow-dag-authoring" by Google. Source, pinned to commit 0dd8034c50d6bce0290b99190cd44b06fcbec2c1: https://github.com/googlecloudplatform/data-agent-kit-plugin/tree/0dd8034c50d6bce0290b99190cd44b06fcbec2c1/skills/gcp-managed-airflow-dag-authoring 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/gcp-managed-airflow-dag-authoring/ for Claude Code and .agents/skills/gcp-managed-airflow-dag-authoring/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/google/gcp-managed-airflow-dag-authoring
SKILL.md at the pin
---
name: gcp-managed-airflow-dag-authoring
description: Guides the authoring and validation of Apache Airflow DAGs for 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.
license: Apache-2.0
metadata:
version: v1
publisher: google
---
# 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
> [!IMPORTANT]
> 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:**
```bash
gcloud composer environments describe <ENV_NAME> \
--location <REGION> \
--format="value(config.softwareConfig.imageVersion)"
```
2. **Get Installed Packages (Versions):**
```bash
gcloud composer environments describe <ENV_NAME> \
--location <REGION> \
--format="value(config.softwareConfig.pypiPackages)"
```
3. **Get DAGs GCS Bucket:**
```bash
gcloud composer environments describe <ENV_NAME> \
--location <REGION> \
--format="value(config.dagGcsPrefix)"
```
--------------------------------------------------------------------------------
## 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.
* **Use Airflow Variables/Connections:** Never hardcode credentials or
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.
### 2.2 Airflow 2 vs Airflow 3 Compatibility
Reference @skill:gcp-managed-airflow-migrations to navigate adjusting the code to
specific target Airflow version.
--------------------------------------------------------------------------------
## Phase 3: Validation Process
> [!IMPORTANT]
> You MUST validate DAGs before concluding your task.
### 3.1 Local Validation (Offline/Pre-deployment)
#### 3.1.1 Static Analysis & Linting
Use `ruff` or `pylint` if available.
```bash
ruff check path/to/dag.py
```
* If targeting Airflow 3, check with Airflow 3 rules if rulesets are
available.
#### 3.1.2 Local Dev Environment (`composer-dev`)
If the user has `composer-dev` configured:
1. Copy the DAG to the local directory with DAGs:
```bash
cp path/to/dag.py $(composer-dev describe <LOCAL_ENV> --format="value(dags_directory)")
```
2. Verify parsing:
```bash
composer-dev run-airflow-cmd <LOCAL_ENV> dags list-import-errors
```
### 3.2: Target Environment Validation
Only perform these steps if you have GCP access and are authorized to deploy to
a target environment.
### 3.2.1 Deploy to GCS
Upload the DAG to the target environment's GCS bucket:
```bash
gcloud storage cp path/to/dag.py gs://<TARGET_BUCKET>/dags/
```
### 3.2.2 Verify via Airflow CLI
Wait 1-2 minutes for the scheduler to parse the file, then run:
1. **Check for Import Errors:**
```bash
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:**
```bash
gcloud composer environments run <ENV_NAME> \
--location <REGION> \
dags list | grep <DAG_ID>
```
### 3.2.3 Monitor Cloud Logging
Check for runtime parsing errors in Cloud Logging:
```query
resource.type="cloud_composer_environment"
resource.labels.environment_name="<ENV_NAME>"
log_id("airflow-scheduler")
severity>=ERROR
textPayload:"<DAG_FILE_NAME>"
```
--------------------------------------------------------------------------------
## Definition of Done
* DAG code adheres to Airflow version constraints of the target environment.
* DAG code follows best practices (no top-level execution, idempotent if
possible).
* DAG parses locally without import errors.
* (If environment is available) DAG is deployed to the target environment and
verified to have no import errors.
From googlecloudplatform/data-agent-kit-plugin at 0dd8034, shown as plain text under its license: Apache-2.0 (permissive). The license text is in skills/gcp-managed-airflow-dag-authoring/SKILL.md.
View SKILL.md on GitHub at 0dd8034Files
- SKILL.md5.9 KB · feaffe13bfff
1 file, 5.9 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at 0dd8034More from Google
skill-creator
This skill guides agents through creating new skills that extend Gemini CLI with specialized knowledge, workflows, and tool integrations.
Contains scripts
Gemini CLI · about 5K tokens · pinned 6 days ago
chrome-devtools-cli
This skill enables agents to automate browser interactions and inspect web pages using Chrome DevTools via command-line interface.
Claude Code, Codex, Cursor +4 · about 2.9K tokens · pinned 6 days ago
cloud-run-basics
Deploys and manages Google Cloud Run services, jobs, and worker pools for running containerized applications or source code.
Claude Code, Codex, Cursor +4 · about 3.9K tokens · pinned 6 days ago
retail-virtual-tryon
Creates virtual try-on agents on Google Cloud using Gemini image models and Veo video generation, supporting static image try-ons and catwalk animations.
Contains scripts
Claude Code, Codex, Cursor +3 · about 3.3K tokens · pinned 6 days ago
site-md
This skill analyzes project briefs and generates a .stitch/SITE.md constitution file that documents the project's identity, visual direction, architecture…
Claude Code, Codex, Cursor +4 · about 730 tokens · pinned 6 days ago
stitch::code-to-design
This skill converts existing frontend code (React, Vue, Angular, etc.) into a Stitch Design by extracting HTML, analyzing design systems, and uploading both…
Claude Code, Codex, Cursor +4 · about 760 tokens · pinned 6 days ago
Related in Data and databases
blueprint
Blueprint enables composing Apache Airflow DAGs from YAML templates using reusable Python task group classes with Pydantic validation.
by AstronomerOfficial publisher
Claude Code, Codex, Cursor +4 · about 8.3K tokens · pinned 6 days ago
dag-factory
Enables declarative authoring of Apache Airflow DAGs using YAML configuration files via the dag-factory library.
by AstronomerOfficial publisher
Claude Code, Codex, Cursor +4 · about 4.2K tokens · pinned 6 days ago
gcp-dataflow
Guides writing, packaging, executing, and troubleshooting Apache Beam pipelines on Google Cloud Dataflow using Java, Python, or Go.
by GoogleOfficial publisher
Claude Code, Codex, Cursor +4 · about 5.1K tokens · pinned 6 days ago
gcp-spark
This skill develops, optimizes, and executes PySpark and Spark SQL code on Google Cloud's Managed Spark (Dataproc Serverless and Clusters), using BigLake…
by GoogleOfficial publisher
Claude Code, Codex, Cursor +4 · about 2.9K tokens · pinned 6 days ago
alphagenome-single-variant-analysis
Analyzes how genetic variants affect gene expression, chromatin accessibility, and splicing using the AlphaGenome API.
by GoogleOfficial publisher
Contains scripts
Claude Code, Codex, Cursor +3 · about 2.8K tokens · pinned 6 days ago
alphagenome-variant-impact-score
Score genetic variants using AlphaGenome Variant Impact models to assess functional impact through 18 biological feature attributions.
by GoogleOfficial publisher
Contains scripts
Claude Code, Codex, Cursor +3 · about 4.1K tokens · pinned 6 days ago
Open roles at Google
No open roles at Google on the Agent Native jobs board right now.
Browse the jobs board