Skip to main content
ClaudeWave
Slash Command389 repo starsupdated 3d ago

add-adapter-method

The add-adapter-method command automates adding new methods to both Airflow V2 and V3 adapter classes in the astronomer/agents repository. Use this when extending adapter functionality across versions, as it generates abstract method declarations, version-specific implementations with appropriate API endpoints, and includes field normalization to reconcile differences between Airflow 2.x and 3.x response formats.

Install in Claude Code
Copy
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/astronomer/agents/HEAD/astro-airflow-mcp/.claude/commands/add-adapter-method.md -o ~/.claude/commands/add-adapter-method.md
Then start a new Claude Code session; the slash command loads automatically.

add-adapter-method.md

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

## Steps

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

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

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

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

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

```python
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.
add-toolSlash Command

Add a new MCP tool to server.py

check-airflow-compatSlash Command

Verify code works with both Airflow 2.x and 3.x

airflow-adapterSkill

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.

airflow-hitlSkill

Use when the user needs human-in-the-loop workflows in Airflow (approval/reject, form input, or human-driven branching). Covers ApprovalOperator, HITLOperator, HITLBranchOperator, HITLEntryOperator, HITLTrigger. Requires Airflow 3.1+. Does not cover AI/LLM calls (see airflow-ai).

airflow-pluginsSkill

Build Airflow 3.1+ plugins that embed FastAPI apps, custom UI pages, React components, middleware, macros, and operator links directly into the Airflow UI. Use this skill whenever the user wants to create an Airflow plugin, add a custom UI page or nav entry to Airflow, build FastAPI-backed endpoints inside Airflow, serve static assets from a plugin, embed a React app in the Airflow UI, add middleware to the Airflow API server, create custom operator extra links, or call the Airflow REST API from inside a plugin. Also trigger when the user mentions AirflowPlugin, fastapi_apps, external_views, react_apps, plugin registration, or embedding a web app in Airflow 3.1+. If someone is building anything custom inside Airflow 3.1+ that involves Python and a browser-facing interface, this skill almost certainly applies.

airflowSkill

Queries, manages, and troubleshoots Apache Airflow using the af CLI. Covers listing DAGs, triggering runs, reading task logs, diagnosing failures, debugging DAG import errors, checking connections, variables, pools, and monitoring health. Also routes to sub-skills for writing DAGs, debugging, deploying, and migrating Airflow 2 to 3. Use when user mentions "Airflow", "DAG", "DAG run", "task log", "import error", "parse error", "broken DAG", or asks to "trigger a pipeline", "debug import errors", "check Airflow health", "list connections", "retry a run", or any Airflow operation. Do NOT use for warehouse/SQL analytics on Airflow metadata tables — use analyzing-data instead.

analyzing-dataSkill

Queries data warehouse and answers business questions about data. Handles questions requiring database/warehouse queries including "who uses X", "how many Y", "show me Z", "find customers", "what is the count", data lookups, metrics, trends, or SQL analysis.

annotating-task-lineageSkill

Annotate Airflow tasks with data lineage using inlets and outlets. Use when the user wants to add lineage metadata to tasks, specify input/output datasets, or enable lineage tracking for operators without built-in OpenLineage extraction.