Upgrading Mwaa Environments
aws/agent-toolkit-for-aws
Upgrades an MWAA environment to a newer Airflow version — within 2.x, within 3.x, or across the 2.x-to-3.x boundary.
Guide for migrating Apache Airflow 2.x projects to Airflow 3.x.
$ npx skills add astronomer/agents --skill migrating-airflow-2-to-3 -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install astronomer/agents migrating-airflow-2-to-3 --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/astronomer/agents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/migrating-airflow-2-to-3 .claude/skills/migrating-airflow-2-to-3 && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "migrating-airflow-2-to-3" agent skill from https://github.com/astronomer/agents/tree/main/skills/migrating-airflow-2-to-3 into .claude/skills/migrating-airflow-2-to-3/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrating-airflow-2-to-3", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/astronomer/agents/tree/main/skills/migrating-airflow-2-to-3Type this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add astronomer/agents --skill migrating-airflow-2-to-3 -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install astronomer/agents migrating-airflow-2-to-3 --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/astronomer/agents.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/migrating-airflow-2-to-3 .agents/skills/migrating-airflow-2-to-3 && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "migrating-airflow-2-to-3" agent skill from https://github.com/astronomer/agents/tree/main/skills/migrating-airflow-2-to-3 into .agents/skills/migrating-airflow-2-to-3/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrating-airflow-2-to-3", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add astronomer/agents --skill migrating-airflow-2-to-3 -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install astronomer/agents migrating-airflow-2-to-3 --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/astronomer/agents.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/migrating-airflow-2-to-3 .cursor/skills/migrating-airflow-2-to-3 && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "migrating-airflow-2-to-3" agent skill from https://github.com/astronomer/agents/tree/main/skills/migrating-airflow-2-to-3 into .cursor/skills/migrating-airflow-2-to-3/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrating-airflow-2-to-3", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/astronomer/agents.git --path skills/migrating-airflow-2-to-3--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add astronomer/agents --skill migrating-airflow-2-to-3 -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install astronomer/agents migrating-airflow-2-to-3 --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/astronomer/agents.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/migrating-airflow-2-to-3 .gemini/skills/migrating-airflow-2-to-3 && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "migrating-airflow-2-to-3" agent skill from https://github.com/astronomer/agents/tree/main/skills/migrating-airflow-2-to-3 into .gemini/skills/migrating-airflow-2-to-3/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrating-airflow-2-to-3", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install astronomer/agents migrating-airflow-2-to-3Installs for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add astronomer/agents --skill migrating-airflow-2-to-3 -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/astronomer/agents.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/migrating-airflow-2-to-3 .github/skills/migrating-airflow-2-to-3 && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "migrating-airflow-2-to-3" agent skill from https://github.com/astronomer/agents/tree/main/skills/migrating-airflow-2-to-3 into .github/skills/migrating-airflow-2-to-3/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrating-airflow-2-to-3", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add astronomer/agents --skill migrating-airflow-2-to-3 -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install astronomer/agents migrating-airflow-2-to-3 --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/astronomer/agents.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/migrating-airflow-2-to-3 .opencode/skills/migrating-airflow-2-to-3 && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "migrating-airflow-2-to-3" agent skill from https://github.com/astronomer/agents/tree/main/skills/migrating-airflow-2-to-3 into .opencode/skills/migrating-airflow-2-to-3/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrating-airflow-2-to-3", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
migrating-airflow-2-to-3Guide for migrating Apache Airflow 2.x projects to Airflow 3.x.
Migrating Airflow 2 To 3 is an agent skill from astronomer/agents. Guide for migrating Apache Airflow 2.x projects to Airflow 3.x. Use when the user mentions Airflow 3 migration, upgrade, compatibility issues, breaking changes, or wants to modernize their Airflow codebase. If you detect Airflow 2.x code that needs migration, prompt the user and ask if they want you to help upgrade. Always load this skill as the first step for any migration-related request.
Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files (for example `reference/config-changes.md`, `reference/migration-checklist.md` and `reference/migration-patterns.md`).
It sits in Data & Analytics, covering Data pipelines and ETL. It works with Apache Airflow and Ruff. The repository describes itself as: AI agent tooling for data engineering workflows. The licence is Apache-2.0.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 486ee63. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
ruffFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
astronomer.ioairflow.apache.orgdocs.astral.shFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
DEPLOYMENT_API_TOKENFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Migrating Airflow 2 To 3 loads about 2.3k tokens when it runs. Until then it costs about 105 tokens; SKILL.md has 723 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from astronomer/agents at commit 486ee63, republished under its Apache-2.0 licence (© astronomer). 723 words, ~2,282 tokens.
.claude/skills/migrating-airflow-2-to-3/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.This skill helps migrate Airflow 2.x DAG code to Airflow 3.x, focusing on code changes (imports, operators, hooks, context, API usage).
Important: Before migrating to Airflow 3, strongly recommend upgrading to Airflow 2.11 first, then to at least Airflow 3.0.11 (ideally directly to 3.1). Other upgrade paths would make rollbacks impossible. See: https://www.astronomer.io/docs/astro/airflow3/upgrade-af3#upgrade-your-airflow-2-deployment-to-airflow-3. Additionally, early 3.0 versions have many bugs - 3.1 provides a much better experience.
ruff check --preview --select AIR --fix --unsafe-fixes .AIRFLOW__SCHEDULER__CREATE_CRON_DATA_INTERVAL=True if you need Airflow 2-style cron data intervals..airflowignore syntax changed from regexp to glob; set AIRFLOW__CORE__DAG_IGNORE_FILE_SYNTAX=regexp if you must keep regexp behavior./auth/ prefix (e.g. /auth/oauth-authorized/google).import common from dags/common/ no longer work on Astro. Use fully qualified imports: import dags.common.Airflow 3 changes how components talk to the metadata database:
Trigger implementation gotcha: If a trigger calls hooks synchronously inside the asyncio event loop, it may fail or block. Prefer calling hooks via sync_to_async(...) (or otherwise ensure hook calls are async-safe).
Key code impact: Task code can still import ORM sessions/models, but any attempt to use them to talk to the metadata DB will fail with:
RuntimeError: Direct database access via the ORM is not allowed in Airflow 3.xWhen scanning DAGs, custom operators, and @task functions, look for:
provide_session, create_session, @provide_sessionfrom airflow.settings import Sessionfrom airflow.settings import enginesession.query(DagModel)..., session.query(DagRun)...Preferred for rich metadata access patterns. Add to requirements.txt:
apache-airflow-client==<your-airflow-runtime-version>Example usage:
import os
from airflow.sdk import BaseOperator
import airflow_client.client
from airflow_client.client.api.dag_api import DAGApi
_HOST = os.getenv("AIRFLOW__API__BASE_URL", "https://<your-org>.astronomer.run/<deployment>/")
_TOKEN = os.getenv("DEPLOYMENT_API_TOKEN")
class ListDagsOperator(BaseOperator):
def execute(self, context):
config = airflow_client.client.Configuration(host=_HOST, access_token=_TOKEN)
with airflow_client.client.ApiClient(config) as api_client:
dag_api = DAGApi(api_client)
dags = dag_api.get_dags(limit=10)
self.log.info("Found %d DAGs", len(dags.dags))For simple cases, call the REST API directly using requests:
from airflow.sdk import task
import os
import requests
_HOST = os.getenv("AIRFLOW__API__BASE_URL", "https://<your-org>.astronomer.run/<deployment>/")
_TOKEN = os.getenv("DEPLOYMENT_API_TOKEN")
@task
def list_dags_via_api() -> None:
response = requests.get(
f"{_HOST}/api/v2/dags",
headers={"Accept": "application/json", "Authorization": f"Bearer {_TOKEN}"},
params={"limit": 10}
)
response.raise_for_status()
print(response.json())Use Ruff's Airflow rules to detect and fix many breaking changes automatically.
Commands to run (via uv) against the project root:
# Auto-fix all detectable Airflow issues (safe + unsafe)
ruff check --preview --select AIR --fix --unsafe-fixes .
# Check remaining Airflow issues without fixing
ruff check --preview --select AIR .For detailed code examples and migration patterns, see:
airflow.cfg section moves, renames, and removals| Airflow 2.x | Airflow 3 |
|---|---|
airflow.operators.dummy_operator.DummyOperator | airflow.providers.standard.operators.empty.EmptyOperator |
airflow.operators.bash.BashOperator | airflow.providers.standard.operators.bash.BashOperator |
airflow.operators.python.PythonOperator | airflow.providers.standard.operators.python.PythonOperator |
airflow.decorators.dag | airflow.sdk.dag |
airflow.decorators.task | airflow.sdk.task |
airflow.datasets.Dataset | airflow.sdk.Asset |
| Removed Key | Replacement |
|---|---|
execution_date | context["dag_run"].logical_date |
tomorrow_ds / yesterday_ds | Use ds with date math: macros.ds_add(ds, 1) / macros.ds_add(ds, -1) |
prev_ds / next_ds | prev_start_date_success or timetable API |
triggering_dataset_events | triggering_asset_events |
templates_dict | context["params"] |
Asset-triggered runs: logical_date may be None; use context["dag_run"].logical_date defensively.
Cannot trigger with future logical_date: Use logical_date=None and rely on run_id instead.
Cron note: for scheduled runs using cron, logical_date semantics differ under CronTriggerTimetable (aligning logical_date with run_after). If you need Airflow 2-style cron data intervals, consider AIRFLOW__SCHEDULER__CREATE_CRON_DATA_INTERVAL=True.
| Setting | Airflow 2 Default | Airflow 3 Default |
|---|---|---|
schedule | timedelta(days=1) | None |
catchup | True | False |
on_success_callback no longer runs on skip; use on_skipped_callback if needed.@teardown with TriggerRule.ALWAYS not allowed; teardowns now execute even if DAG run terminated early.© astronomer, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files in skills/migrating-airflow-2-to-3 of astronomer/agents.
Open the folder on GitHubat commit 486ee63
Migrating Airflow 2 To 3 next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Migrating Airflow 2 To 3 this skillastronomer/agents | 451 | — | ~2.3k | Automated safety check: Pass | Apache-2.0 | |
| Upgrading Mwaa Environmentsaws/agent-toolkit-for-aws | 2.8k | — | ~7.3k | Automated safety check: Pass | Apache-2.0 | |
| Chart Testsastronomer/airflow-chart | 297 | — | ~2.8k | Automated safety check: Pass | Custom licence | |
| Functional Testsastronomer/airflow-chart | 297 | — | ~2.2k | Automated safety check: Pass | Custom licence | |
| Create Examplegodatadriven/whirl | 205 | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| Senior Data Engineerbenchflow-ai/skillsbench | 1.8k | — | ~5.9k | Automated safety check: Pass | MIT |
aws/agent-toolkit-for-aws
Upgrades an MWAA environment to a newer Airflow version — within 2.x, within 3.x, or across the 2.x-to-3.x boundary.
astronomer/airflow-chart
A skill your agent uses when writing, editing, reviewing, or running Helm chart tests for the Astronomer airflow-chart repository.
astronomer/airflow-chart
A skill your agent uses when writing, editing, reviewing, or running functional (end-to-end) tests for the Astronomer airflow-chart repository.
godatadriven/whirl
Create a new Whirl example project in the examples/ directory.
benchflow-ai/skillsbench
World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, real-time streaming, and data infrastructure.
wshobson/agents
Patterns for writing production-ready Apache Airflow DAGs: task dependencies, custom operators and sensors, local testing, and rules for what to avoid.
astronomer/agents
Queries the data warehouse with SQL and answers business questions about data.
astronomer/agents
Queries, manages, and troubleshoots Apache Airflow using the af CLI.
astronomer/agents
Guide for migrating Dagster projects to Apache Airflow 3 on Astro.
astronomer/agents
Workflow and best practices for writing Apache Airflow DAGs.
astronomer/agents
Deploys Airflow DAGs and projects. An agent skill from astronomer/agents.
astronomer/agents
Builds human-in-the-loop (HITL) Airflow workflows - approval gates, form input, and human-driven branching.
Works with
Categories
Guide for migrating Apache Airflow 2.x projects to Airflow 3.x. Migrating Airflow 2 To 3 is an agent skill from astronomer/agents.x.
Migrating Airflow 2 To 3 fits situations like: the user mentions Airflow 3 migration; compatibility issues; breaking changes; wants to modernize their Airflow codebase.
Run `npx skills add astronomer/agents --skill migrating-airflow-2-to-3 -a claude-code`. Or copy the skill folder (skills/migrating-airflow-2-to-3 in astronomer/agents) into .claude/skills/migrating-airflow-2-to-3 in your project. Claude Code loads it when a task matches its description.
Run `npx skills add astronomer/agents --skill migrating-airflow-2-to-3 -a codex`. Or copy the skill folder (skills/migrating-airflow-2-to-3 in astronomer/agents) into .agents/skills/migrating-airflow-2-to-3 in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add astronomer/agents --skill migrating-airflow-2-to-3 -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/migrating-airflow-2-to-3, .gemini/skills/migrating-airflow-2-to-3, .github/skills/migrating-airflow-2-to-3 and .opencode/skills/migrating-airflow-2-to-3 in your project.
Going by SKILL.md and its folder, Migrating Airflow 2 To 3 needs the command-line tools its instructions call (ruff) and credentials named DEPLOYMENT_API_TOKEN. Our summary lists: Python 3; A credential in DEPLOYMENT_API_TOKEN.
SKILL.md names 3 domains. As links in the text: astronomer.io, airflow.apache.org and docs.astral.sh. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Migrating Airflow 2 To 3 is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Migrating Airflow 2 To 3: Upgrading Mwaa Environments (aws/agent-toolkit-for-aws, 2.8k stars), Chart Tests (astronomer/airflow-chart, 297 stars), Functional Tests (astronomer/airflow-chart, 297 stars) and Create Example (godatadriven/whirl, 205 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
astronomer (a GitHub organization) maintains it in astronomer/agents, which has 451 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on October 7, 2026.
Source: astronomer/agents on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.