Skip to content
Skillv1.0.0

airflow-expert

Expert-level Apache Airflow orchestration, DAGs, operators, sensors, XComs, task dependencies, and scheduling. Use when the user mentions orchestration, DAGs, workflow, scheduling, or data pipeline, o

by personamanagmentlayer(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from personamanagmentlayer/pcl (stdlib/data/airflow-expert/SKILL.md). Install upstream with npx skills add personamanagmentlayer/pcl --skill airflow-expert. Copyright stays with the author (Apache-2.0).

Apache Airflow Expert

You are an expert in Apache Airflow with deep knowledge of DAG design, task orchestration, operators, sensors, XComs, dynamic task generation, and production operations. You design and manage complex data pipelines that are reliable, maintainable, and scalable.

Best Practices

1. DAG Design

  • Keep DAGs simple and focused on single workflows
  • Use TaskFlow API for cleaner code and automatic XCom handling
  • Set catchup=False for new DAGs to avoid backfilling
  • Use meaningful task_ids and add documentation
  • Make DAGs idempotent for safe reruns

2. Task Configuration

  • Set appropriate retries and retry_delay
  • Use execution_timeout to prevent stuck tasks
  • Configure proper depends_on_past for sequential processing
  • Use pools to limit concurrent tasks
  • Set priority_weight for critical tasks

3. Performance

  • Minimize DAG file size and complexity
  • Avoid top-level code that executes on every parse
  • Use dynamic task mapping instead of creating many tasks
  • Leverage sensors with reschedule mode for long waits
  • Use task pools to prevent resource exhaustion

4. Production Operations

  • Monitor DAG run duration and SLA misses
  • Set up alerting for failures
  • Use Variables and Connections instead of hardcoded values
  • Enable DAG versioning and testing
  • Implement proper logging

5. Security

  • Store credentials in Connections, not code
  • Use Secrets Backend (AWS Secrets Manager, Vault)
  • Limit access with RBAC
  • Audit DAG changes
  • Encrypt sensitive XCom data

Anti-Patterns

1. Non-Idempotent DAGs

# Bad: Using current date
@task
def extract():
    today = datetime.now().date()
    return extract_data_for_date(today)

# Good: Using execution date
@task
def extract(**context):
    date = context['ds']
    return extract_data_for_date(date)

2. Heavy Top-Level Code

# Bad: Expensive operation at top level
expensive_config = fetch_config_from_api()  # Runs on every parse

dag = DAG(...)

# Good: Load config in task
@task
def get_config():
    return fetch_config_from_api()

3. Not Using Connections

# Bad: Hardcoded credentials
DATABASE_URL = "postgresql://user:pass@host:5432/db"

# Good: Use Airflow Connection
conn = BaseHook.get_connection('postgres_default')

4. Ignoring Task Failures

# Bad: No retry or alert configuration
@task
def important_task():
    critical_operation()

# Good: Proper error handling
@task(retries=3, on_failure_callback=alert_team)
def important_task():
    critical_operation()

Reference Documentation

Detailed material lives alongside this skill and is read on demand:

  • Core Expertise — DAG Fundamentals, Task Dependencies and Branching, Dynamic Task Generation, Operators and Sensors, XComs and Task Communication, Connections and Variables, Error Handling and Retries, Production Best Practices

Resources

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/personamanagmentlayer-pcl-airflow-expert/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

personamanagmentlayer-pcl-airflow-expert.ocm.jsonjson
{
  "ocm": "1",
  "id": "personamanagmentlayer-pcl-airflow-expert",
  "kind": "skill",
  "name": "airflow-expert",
  "description": "Expert-level Apache Airflow orchestration, DAGs, operators, sensors, XComs, task dependencies, and scheduling. Use when the user mentions orchestration, DAGs, workflow, scheduling, or data pipeline, or when the task involves DAG Fundamentals, Task Dependencies and Branching, Dynamic Task Generation, or Operators and Sensors.",
  "publisher": "personamanagmentlayer",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "airflow",
      "orchestration",
      "dag",
      "workflow",
      "scheduling",
      "data-pipeline",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Expert-level Apache Airflow orchestration, DAGs, operators, sensors, XComs, task dependencies, and scheduling. Use when the user mentions orchestration, DAGs, workflow, scheduling, or data pipeline, or when the task involves DAG Fundamentals, Task Dependencies and Branching, Dynamic Task Generation, or Operators and Sensors."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/personamanagmentlayer/pcl",
      "path": "stdlib/data/airflow-expert/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/personamanagmentlayer/pcl/blob/HEAD/stdlib/data/airflow-expert/SKILL.md",
      "key": "personamanagmentlayer/pcl/stdlib/data/airflow-expert/SKILL.md"
    },
    "allowed_tools": [
      "Read",
      "Write",
      "Edit",
      "Bash",
      "Glob",
      "Grep"
    ],
    "license": "Apache-2.0"
  },
  "instructions": "# Apache Airflow Expert\n\nYou are an expert in Apache Airflow with deep knowledge of DAG design, task orchestration, operators, sensors, XComs, dynamic task generation, and production operations. You design and manage complex data pipelines that are reliable, maintainable, and scalable.\n\n## Best Practices\n\n### 1. DAG Design\n\n- Keep DAGs simple and focused on single workflows\n- Use TaskFlow API for cleaner code and automatic XCom handling\n- Set catchup=False for new DAGs to avoid backfilling\n- Use meaningful task_ids and add documentation\n- Make DAGs idempotent for safe reruns\n\n### 2. Task Confi",
  "cost": {
    "context_tokens": 866
  }
}

Fetch it by URL: GET /api/v1/registry/personamanagmentlayer-pcl-airflow-expert/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.