airflow
БесплатноБез исполняемых скриптовНе проверенApache Airflow is a platform for authoring, scheduling and monitoring workflows as Python DAGs. Use when the user wants to write a DAG, schedule an ETL or…
Об этом скилле
Airflow
Overview
Apache Airflow lets you define workflows as Directed Acyclic Graphs (DAGs) in Python: tasks connected by dependencies, scheduled and monitored from a web UI. This skill targets Airflow 3.x (3.3.2 at the time of writing). Airflow 3 changed things that older tutorials get wrong:
- DAG authoring imports come from
airflow.sdk(DAG,dag,task,Variable). The Airflow 2 paths (from airflow import DAG,airflow.decorators,airflow.operators.python) still import in 3.3.2 but are deprecated shims. - Common operators live in the
standardprovider:airflow.providers.standard.operators.python/.bash. PostgresOperatorandSimpleHttpOperatorno longer exist (their imports fail); useSQLExecuteQueryOperatorandHttpOperator.- The webserver is now the
api-serverprocess, plus a separatedag-processor.airflow users createis no longer in core. schedulereplacesschedule_interval/timetable, andcatchupdefaults toFalse.
Instructions
Install locally and run
Use a virtual environment and the official constraints file for your Airflow and Python versions:
export AIRFLOW_HOME=~/airflow
python3 -m venv ~/airflow_venv && source ~/airflow_venv/bin/activate
AIRFLOW_VERSION=3.3.2
PYTHON_VERSION="$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
pip install "apache-airflow==${AIRFLOW_VERSION}" \
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt"
airflow standalone # database, user, api-server, scheduler, dag-processor, triggerer
The UI is at http://localhost:8080. The admin password is generated; read it from $AIRFLOW_HOME/simple_auth_manager_passwords.json.generated. Put DAG files in $AIRFLOW_HOME/dags/. standalone is for learning, not production.
Install with Docker Compose
Fetch the compose file published for your exact version. It runs the CeleryExecutor with Postgres and Redis (api-server, scheduler, dag-processor, worker, triggerer) and is meant for exploration:
curl -LfO 'https://airflow.apache.org/docs/apache-airflow/3.3.2/docker-compose.yaml'
mkdir -p ./dags ./logs ./plugins ./config
echo "AIRFLOW_UID=$(id -u)" > .env
docker compose up airflow-init # migrates the database, creates user airflow / password airflow
docker compose up -d
Open http://localhost:8080 and sign in as airflow / airflow; change that outside a local machine. Reset everything with docker compose down --volumes --remove-orphans. To pin a different image use AIRFLOW_IMAGE_NAME in .env.
A classic DAG
# dags/hello_world.py
from datetime import datetime, timedelta
from airflow.providers.standard.operators.bash import BashOperator
from airflow.providers.standard.operators.python import PythonOperator
from airflow.sdk import DAG
default_args = {"owner": "data-team", "retries": 2, "retry_delay": timedelta(minutes=5)}
def extract(ti):
orders = [{"id": 1, "amount": 12.5}, {"id": 2, "amount": 7.25}]
ti.xcom_push(key="raw_orders", value=orders)
def transform(ti):
orders = ti.xcom_pull(task_ids="extract", key="raw_orders")
ti.xcom_push(key="order_cents", value=[{"id": o["id"], "cents": round(o["amount"] * 100)} for o in orders])
with DAG(
dag_id="hello_world",
default_args=default_args,
description="Extract, transform and load a few orders",
schedule="@daily",
start_date=datetime(2026, 1, 1),
catchup=False,
tags=["example"],
) as dag:
extract_task = PythonOperator(task_id="extract", python_callable=extract)
transform_task = PythonOperator(task_id="transform", python_callable=transform)
load_task = BashOperator(task_id="load", bash_command="echo 'Loading orders for {{ ds }}'")
extract_task >> transform_task >> load_task
TaskFlow API with dynamic task mapping
Return values travel between tasks as XComs automatically. .expand() creates one task instance per item at run time.
# dags/taskflow_etl.py
from datetime import datetime
from airflow.sdk import dag, task
@dag(schedule="@daily", start_date=datetime(2026, 1, 1), catchup=False, tags=["etl"])
def taskflow_etl():
@task
def list_regions() -> list[str]:
return ["emea", "apac", "amer"]
@task
def extract(region: str) -> dict:
return {"region": region, "users": 100, "revenue": 50000}
@task
def summarize(rows: list[dict]) -> dict:
users = sum(r["users"] for r in rows)
return {"users": users, "avg_revenue": sum(r["revenue"] for r in rows) / users}
@task
def load(summary: dict):
print(f"Users: {summary['users']}, avg revenue: {summary['avg_revenue']:.2f}")
rows = extract.expand(region=list_regions())
load(summarize(rows))
taskflow_etl()
Provider operators and sensors
Providers are separate packages: `pip install apache-airflow-providers-postgres apache-airflow-providers-h
Установить airflow в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл airflow?
Apache Airflow is a platform for authoring, scheduling and monitoring workflows as Python DAGs. Use when the user wants to write a DAG, schedule an ETL or data pipeline, use the TaskFlow API, add connections and variables, run Airflow locally or with Docker Compose, or upgrade DAGs from Airflow 2 to Airflow 3.
Как установить скилл airflow?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл airflow запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic