Guide · Agent skill
How to use the Managed Airflow DAG Authoring agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
This guide explains the managed-airflow-dag-authoring agent skill, a set of instructions that an AI agent loads so it writes Apache Airflow DAGs for Managed Service for Apache Airflow (formerly Cloud Composer) in a consistent way. It is aimed at data engineers and developers who already know what a DAG is and want the agent to check versions, follow best practices and validate its output. By the end you will know how to install the skill, how to ask for DAG work so the skill triggers, and which steps touch live cloud resources.
Quick start
- 1Download and unzip the skill. Download the skill ZIP from this page and unzip it. The folder should contain SKILL.md and references/attribution.md.
- 2Place it where the agent looks. Move the folder into ~/.claude/skills/ for personal use or into the project's .claude/skills/ folder. In the Claude apps, upload it under Settings → Capabilities → Skills instead.
- 3Prepare your tools. Install and authenticate the gcloud CLI if you want inspection and deployment. Optionally add composer-dev, ruff or pylint, and a local Python environment with Airflow.
- 4Make a specific request. Name the DAG's goal, the target Airflow version and environment, and whether the agent may deploy. This helps the skill trigger and choose the right validation steps.
- 5Review the commands. Read each gcloud, composer-dev or gcloud storage command before it runs, particularly any upload or run against a live environment.
- 6Check the results. Confirm the DAG lints cleanly, parses locally if possible, and shows no import errors remotely. Then check the DAG appears in the list.
What is an agent skill and what does this one make the agent do?
An agent skill is a folder containing a SKILL.md file with instructions that an AI agent reads when a request matches the skill's description. This one is published by google/skills under the Apache-2.0 licence, and its path in the repository is skills/cloud/managed-airflow-dag-authoring.
Once loaded, the agent works through three phases: it discovers the target environment's constraints, applies DAG authoring best practices, and validates the file before concluding the task.
- Context discovery: if it has access, it reads the environment's image version, installed PyPI packages and DAGs bucket using gcloud.
- Best practices: idempotent tasks, no database queries or API calls at the top level of the DAG file, catchup=False unless backfilling is needed, and no hardcoded credentials (use Variables and Connections).
- Validation: lint with ruff or pylint, test with composer-dev if it is configured, and optionally upload to the environment's GCS bucket and check for import errors.
How do you install the managed Airflow DAG authoring skill?
Download the ZIP file for the skill from this page and unzip it. You can install it in one of two places. For a personal setup, put the unzipped folder in ~/.claude/skills/. For a single project, put it in the project's .claude/skills/ folder so it only applies there.
If you use the Claude apps instead of a folder on disk, open Settings, go to Capabilities, and upload the skill under Skills.
- Personal install: ~/.claude/skills/ (available across your projects).
- Project install: .claude/skills/ inside the project folder.
- Claude apps: Settings → Capabilities → Skills, then upload the skill.
How do you trigger the skill with a natural request?
The agent decides whether to load a skill by matching your request against the skill's description. The description covers creating or extending an Airflow DAG and mentions Airflow 2 versus 3 compatibility and Cloud Composer environments, so requests that name those things are the most likely to trigger it. Say which environment or version you are targeting, because the skill checks those first.
Be clear about whether the agent may touch live resources. The skill only inspects or deploys to a cloud environment when you have access and are authorised to deploy, so state that in the request if it applies.
- "Write a DAG that loads daily sales files from GCS into BigQuery for my Cloud Composer environment, and check it against the environment's Airflow version."
- "Update this Airflow 2 DAG so it runs on Airflow 3 and lint it."
- "Review this DAG for top-level code and hardcoded credentials before I upload it. Do not deploy."
- "Deploy this DAG to our dev Composer environment and confirm there are no import errors."
What does the skill need before it can do everything?
The core guidance works offline: the agent can write and review DAG code from your description. The inspection and deployment steps need more. They need the gcloud CLI with access to a Google Cloud project and a Managed Airflow (Cloud Composer) environment.
The other tools are optional. composer-dev enables local validation, ruff or pylint enables static analysis, and a local Python environment with Airflow installed lets the agent check imports on your machine.
- Required for inspection and deployment: gcloud CLI, a Google Cloud project, and a Managed Airflow (Cloud Composer) environment.
- Optional: composer-dev CLI for local validation.
- Optional: ruff or pylint for static analysis.
- Optional: a local Python environment with Airflow installed.
gcloud composer environments describe {env_name} \
--location {region} \
--format="value(config.softwareConfig.imageVersion)"What are the safety notes for scripts and network use?
This skill runs scripts and uses the network. The validation steps can upload a DAG file to a GCS bucket with gcloud storage cp and run gcloud composer environments run against a live environment. The skill's own description says these steps should only happen when you have GCP access and are authorised to deploy. Treat that as a hard boundary: review the commands before the agent runs them, and do not let it deploy to a production environment without a review step.
The skill also asks the agent to tag gcloud commands with a CLOUDSDK_METRICS_REQUEST_ATTRIBUTION variable that identifies the skill and its version. The attribution file says this tag carries no user data and should be set inline on each command, not with gcloud config set. You will see this prefix in the commands the agent runs.
- Deployment uploads files to a GCS bucket and runs commands against a live Cloud Composer environment.
- Review commands before the agent runs them, especially in production.
- Attribution prefixes are added to gcloud commands; they do not persist in your gcloud config.
What does a typical validation run look like?
After writing a DAG, the agent should lint it first. If composer-dev is configured, it copies the DAG into the local DAGs directory and lists import errors. If you have target access and deployment is authorised, it uploads the file to the environment's dags/ folder, waits one to two minutes for the scheduler to parse it, then checks for import errors and confirms the DAG appears in the list.
The skill's pass criterion for the import-error check is output of "No data found" or empty. Cloud Logging can also be queried for scheduler errors that mention the DAG file name.
- Lint: ruff check path/to/dag.py.
- Local: copy into the composer-dev DAGs directory, then list import errors.
- Remote: upload to the dags/ folder in the bucket, wait 1-2 minutes, list import errors and confirm the DAG ID is listed.
- Logs: filter Cloud Logging for the scheduler's ERROR entries that mention the DAG file.
gcloud composer environments run {env_name} \
--location {region} \
dags list-import-errorsWhat people use it for
- Writing a new daily pipeline DAG for a Cloud Composer environment while checking the image's Airflow version first.
- Migrating an existing DAG from Airflow 2 to Airflow 3, with the agent working from the migration guidance the skill points to.
- Reviewing a teammate's DAG for top-level database queries, non-idempotent tasks and hardcoded credentials.
- Running a repeatable pre-deployment checklist: lint, local parse, then a remote import-error check.
Frequently asked questions
How do I install the managed Airflow DAG authoring skill?
Download the ZIP from this page and unzip it. Put the folder in ~/.claude/skills/ for personal use, or in a project's .claude/skills/ folder. In the Claude apps, upload it under Settings → Capabilities → Skills.
What do I need to use this skill?
The offline guidance needs only the agent. Inspection and deployment need the gcloud CLI with access to a Google Cloud project and a Managed Airflow (Cloud Composer) environment. composer-dev, ruff or pylint, and a local Airflow Python environment are optional.
Is the managed Airflow DAG authoring skill free?
The skill is licensed under Apache-2.0, as stated on this page. The source does not cover pricing for Google Cloud or Cloud Composer, which you pay for separately if you use a live environment.
Will the agent deploy my DAG to production automatically?
The skill only deploys when you have GCP access and are authorised to deploy to the target environment. It can upload files to a GCS bucket and run gcloud commands on live environments, so review each command and avoid giving it production deployment rights without a review step.
Does this skill work for Airflow 3?
The skill covers Airflow 2 versus 3 compatibility and says to check Airflow 3 rules with linting where those rulesets are available. For the detailed code changes, the skill points to a separate managed-airflow-migrations skill, which is not part of this package.
Can I use this skill for general Python code?
No. Its description says not to use it for Python code unrelated to Airflow DAGs. Use it for DAG files and their validation.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you write or migrate Airflow DAGs for Managed Service for Apache Airflow or Cloud Composer and want the agent to follow a consistent checklist. Pick something else if you need general Python help, or if you are not comfortable letting an agent run gcloud uploads and commands against live environments without reviewing them first.
Download the skill