# Airflow Adapter

> Airflow adapter pattern for v2/v3 API compatibility. Use when working with adapters, version detection, or adding new API methods that need to work across Airflow 2.x and 3.x. Use when this capability is needed.

- Skill: `tomevault-io/airflow-adapter` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/airflow-adapter`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/airflow-adapter/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/airflow-adapter

---


# Airflow Adapter Pattern

Enables compatibility with both Airflow 2.x (`/api/v1`) and 3.x (`/api/v2`).

## Architecture

```
MCP Tool → _get_adapter() → AirflowV2Adapter or AirflowV3Adapter → Airflow API
```

Version is auto-detected at startup.

## Key Files

- `adapters/base.py` - Abstract interface
- `adapters/airflow_v2.py` - Airflow 2.x (`/api/v1`)
- `adapters/airflow_v3.py` - Airflow 3.x (`/api/v2`)

## Related Files

- @api-differences.md - V2 vs V3 field/endpoint differences
- @patterns.md - Implementation patterns

## Quick Reference

```python
adapter = _get_adapter()
dags = adapter.list_dags(limit=100)
run = adapter.trigger_dag_run("my_dag", conf={"key": "value"})
```

---
> Source: [astronomer/agents](https://github.com/astronomer/agents) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-06-30 -->

