Download for macOS
Skill

migrating-airflow-2-to-3

@astronomer Updated 2026-10-14

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.

agentic-workflowagentsaiai-agentsairflowapache-airflowclaudecursor

Install

git clone https://github.com/astronomer/agents /tmp/agents && ln -s /tmp/agents/skills/migrating-airflow-2-to-3 ~/.claude/skills/migrating-airflow-2-to-3

From README

Airflow 2 to 3 Migration This skill helps migrate Airflow 2.x DAG code to Airflow 3.x, focusing on code changes (imports, operators, hooks, context, API ). 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. Migration at a Glance Run Ruff's Airflow migration rules to auto-fix detectable issues (AIR30/AIR301/AIR302/AIR31/AIR311/AIR312). ruff check --preview --select AIR --fix --unsafe-fixes . Scan for remaining issues using the manual search checklist in reference/migration-checklist.md. Focus on: direct metadata DB access, legacy imports, scheduling/context keys, XCom pickling, datasets-to-assets, REST API/auth, plugins, and file paths.