Skip to main content
skill Claude Code CX Codex Cursor

airflow-dag-patterns — Claude Code skill: install guide

This skill helps design Apache Airflow DAGs, connect tasks, and test pipelines. Use it for ETL workflows, batch jobs, and failed-run debugging.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add wshobson/agents
/plugin install data-engineering@claude-code-workflows
Open on GitHub

What airflow-dag-patterns does

airflow-dag-patterns covers Apache Airflow DAG structure, task dependencies, operators, and sensors. It shows linear chains, fan-out, and fan-in, with design guidance for idempotent, atomic, incremental, and observable tasks.

The skill includes dags/example_dag.py with PythonOperator, EmptyOperator, a schedule, retries, and an active-run limit. It also covers the TaskFlow API, timeouts, mode='reschedule' for sensors, unit and integration tests, deployment, and failed DAG runs. Detailed patterns are stored in references/details.md.

Install it when an agent needs to write or review Apache Airflow DAGs. It adds little value to a project that does not use Airflow.

What it helps with

  • design task dependencies in a DAG
  • build a scheduled ETL pipeline
  • add Apache Airflow operators and sensors
  • prepare tests for a DAG
  • debug a failed DAG run

Example prompts for the agent

  • Create an ETL DAG in `dags/example_dag.py` with task dependencies and retries.
  • Review this DAG for idempotency, timeouts, and correct sensor usage.
  • Debug this failed DAG run using the patterns in `references/details.md`.

How to install airflow-dag-patterns

1Plugin marketplace

/plugin marketplace add wshobson/agents
/plugin install data-engineering@claude-code-workflows

This installs the whole data-engineering plugin with all its skills

2Skills CLI (Vercel)

npx skills add wshobson/agents --skill airflow-dag-patterns -a claude-code

3Manually: put the files in place

~/.claude/skills/airflow-dag-patterns/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/airflow-dag-patterns/

From the same set213

The whole set →
typescript-advanced-types Seth Hobson Guides an agent through advanced TypeScript types, from generics to conditional and mapped types. Use it for typed libraries, API clients, or strict configuration objects. Claude Code CX Codex Cursor 92,169installs tailwind-design-system Seth Hobson Helps build design systems with Tailwind CSS v4, from theme tokens to component variants. Use it when a project needs shared UI patterns. Claude Code CX Codex Cursor 70,180installs brand-landingpage Travis D. Elliott This skill interviews you about the product and its visual direction, then builds a landing page through Stitch. Use it when there’s no established design yet. Claude Code CX Codex Cursor 39,476installs python-testing-patterns Seth Hobson This skill guides Python testing with pytest, fixtures and mocks. Use it when building a test suite or tracking down failing checks. Claude Code CX Codex Cursor 36,943installs python-performance-optimization Seth Hobson This skill profiles Python code to locate CPU and memory bottlenecks. Use it when an application responds slowly or consumes too many resources. Claude Code CX Codex Cursor 35,675installs nextjs-app-router-patterns Seth Hobson This skill covers Next.js App Router patterns for rendering, routing, and data fetching. Use it when starting an App Router project or moving from Pages Router. Claude Code CX Codex Cursor 32,529installs api-design-principles Seth Hobson Use this skill to plan or review REST and GraphQL APIs. It helps when writing a specification or setting API conventions for a team. Claude Code CX Codex Cursor 30,348installs code-review-excellence Seth Hobson This skill guides pull request reviews, catches logic and security issues, and helps teams give specific feedback. Use it for review standards or developer mentoring. Claude Code CX Codex Cursor 30,193installs

Similar

instrument-data-to-allotrope official anthropics Converts laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON or flattened CSV. Auto-detects instrument type and outputs ASM JSON, tabular CSV, and exportable parser code. Claude Code CX Codex Cursor +1 2,400installs managed-airflow-dag-troubleshooting official google Troubleshoots failed DAG runs and task instances in Managed Service for Apache Airflow using logs, task state, and DAG source code. Claude Code Gemini CLI CX Codex 3,500installs prisma-client-api prisma Complete Prisma Client API reference for database queries, CRUD operations, and filtering. Triggers on findMany, create, update, delete, and $transaction. Claude Code CX Codex Cursor +1 389,500installs prisma-cli prisma Prisma ORM 7 CLI reference for AI agents. Guides client generation, schema migrations, and local database workflows while preventing accidental data loss. Claude Code CX Codex Cursor +1 386,800installs xlsx official anthropics Creates, reads, edits, and converts spreadsheet files. Use it when the requested deliverable is an Excel workbook or another tabular file. Claude Code Claude.ai 187,223installs google-agents-cli-observability official Google This skill guides you through tracing and monitoring AI agents, including ADK agents. Use it when you need to inspect agent execution or monitor a deployed agent. Claude Code CX Codex Cursor +1 509,900installs caveman-evidence-review JuliusBrussee A read-only skill reviews Caveman Cloud evidence on LLM spend, traces, and routing. Use it to see where a project’s model budget goes. Claude Code CX Codex Cursor +1 103,500installs migration JuliusBrussee Enforces reversible, compatibility-safe transitions for schema, data, and API updates. Useful whenever data loss or rollout downtime is unacceptable. Claude Code CX Codex Cursor +1 102,900installs

Questions about airflow-dag-patterns

How do I install airflow-dag-patterns in Claude Code?

Run npx skills add wshobson/agents --skill airflow-dag-patterns -a claude-code. The skill file is placed at ~/.claude/skills/airflow-dag-patterns/SKILL.md.

What does airflow-dag-patterns do?

It helps create Apache Airflow DAGs, define task dependencies, choose operators and sensors, test pipelines, and prepare them for deployment.

Which platforms support airflow-dag-patterns?

The skill targets Claude Code, Codex, and Cursor. For Codex, run npx skills add wshobson/agents --skill airflow-dag-patterns -a codex; for Cursor, run npx skills add wshobson/agents --skill airflow-dag-patterns -a cursor.

Source text

SKILL.md · MIT
---
name: airflow-dag-patterns
description: Build production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when creating data pipelines, orchestrating workflows, or scheduling batch jobs.
---

# Apache Airflow DAG Patterns

Production-ready patterns for Apache Airflow including DAG design, operators, sensors, testing, and deployment strategies.

## When to Use This Skill

- Creating data pipeline orchestration with Airflow
- Designing DAG structures and dependencies
- Implementing custom operators and sensors
- Testing Airflow DAGs locally
- Setting up Airflow in production
- Debugging failed DAG runs

## Core Concepts

### 1. DAG Design Principles

| Principle       | Description                         |
| --------------- | ----------------------------------- |
| **Idempotent**  | Running twice produces same result  |
| **Atomic**      | Tasks succeed or fail completely    |
| **Incremental** | Process only new/changed data       |
| **Observable**  | Logs, metrics, alerts at every step |

### 2. Task Dependencies

```python
# Linear
task1 >> task2 >> task3

# Fan-out
task1 >> [task2, task3, task4]

# Fan-in
[task1, task2, task3] >> task4

# Complex
task1 >> task2 >> task4
task1 >> task3 >> task4
```

## Quick Start

```python
# dags/example_dag.py
from datetime import datetime, timedelta
from airflow import DAG
from airflow.operators.python import PythonOperator
from airflow.operators.empty import EmptyOperator

default_args = {
    'owner': 'data-team',
    'depends_on_past': False,
    'email_on_failure': True,
    'email_on_retry': False,
    'retries': 3,
    'retry_delay': timedelta(minutes=5),
    'retry_exponential_backoff': True,
    'max_retry_delay': timedelta(hours=1),
}

with DAG(
    dag_id='example_etl',
    default_args=default_args,
    description='Example ETL pipeline',
    schedule='0 6 * * *',  # Daily at 6 AM
    start_date=datetime(2024, 1, 1),
    catchup=False,
    tags=['etl', 'example'],
    max_active_runs=1,
) as dag:

    start = EmptyOperator(task_id='start')

    def extract_data(**context):
        execution_date = context['ds']
        # Extract logic here
        return {'records': 1000}

    extract = PythonOperator(
        task_id='extract',
        python_callable=extract_data,
    )

    end = EmptyOperator(task_id='end')

    start >> extract >> end
```

## Detailed patterns and worked examples

Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient.

## Best Practices

### Do's

- **Use TaskFlow API** - Cleaner code, automatic XCom
- **Set timeouts** - Prevent zombie tasks
- **Use `mode='reschedule'`** - For sensors, free up workers
- **Test DAGs** - Unit tests and integration tests
- **Idempotent tasks** - Safe to retry

### Don'ts

- **Don't use `depends_on_past=True`** - Creates bottlenecks
- **Don't hardcode dates** - Use `{{ ds }}` macros
- **Don't use global state** - Tasks should be stateless
- **Don't skip catchup blindly** - Understand implications
- **Don't put heavy logic in DAG file** - Import from modules

© Seth Hobson · MIT · wshobson/agents

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor