Skip to content
Data
Command

/add-adapter-method

Add a new method to both Airflow adapters

From plugin
data
4193 skills3 commands
Install
> /plugin marketplace add astronomer/agents
> /plugin install astronomer-data@astronomer

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/add-adapter-method

Context preview

What this command does when you run it.

Add a new method to both Airflow adapters

Command definition

add-adapter-method.md
description: Add a new method to both Airflow adapters
argument-hint: [method-name]

Add method `$ARGUMENTS` to both V2 and V3 adapters.

Steps

1. Add abstract method to `adapters/base.py`:

@abstractmethod
def method_name(self, param: str) -> dict[str, Any]:
    pass

2. Implement in `adapters/airflow_v2.py`:

def method_name(self, param: str) -> dict[str, Any]:
    return self._call(f"endpoint/{param}")

3. Implement in `adapters/airflow_v3.py`:

def method_name(self, param: str) -> dict[str, Any]:
    return self._call(f"endpoint/{param}")

Version Differences

| Feature | Airflow 2.x | Airflow 3.x | |---------|-------------|-------------| | API path | `/api/v1` | `/api/v2` | | Assets | `datasets` | `assets` | | DAG runs | `execution_date` | `logical_date` |

Normalize V2 responses to match V3 field names when they differ.

Ships withdata

AI agent tooling for data engineering workflows. Includes an MCP server for Airflow, a CLI tool (af) for interacting with Airflow from your terminal, and skills that extend AI coding agents with specialized capabilities for working with Airflow and data

Get the whole plugin