
Airflow
- 1.2k installs
- 412 repo stars
- Updated July 27, 2026
- astronomer/agents
airflow provides documented workflows for Queries, manages, and troubleshoots Apache Airflow using the af CLI. Covers listing DAGs, triggering runs, reading task logs, diagnosing failures, debugging DAG
About
The airflow skill 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 Airflow Operations Use af commands to query manage and troubleshoot Airflow workflows Astro CLI The Astro CLI https www astronomer io docs astro cli overview is the recommended way to run Airflow locally and deploy to production It provides a containerized Airflow environment that works out of the box bash Initialize a new project astro dev init Start local Airflow webserver at http localhost 8080 astro dev start Parse DAGs to catch errors quickly no need to start Airflow astro dev parse Run pytest against your DAGs astro dev pytest Deploy to production astro deploy Full
- **New project?** See the **setting-up-astro-project** skill
- **Local environment?** See the **managing-astro-local-env** skill
- **Deploying?** See the **deploying-airflow** skill
- "How do I run Airflow locally?" / "Set up Airflow" -> use the **managing-astro-local-env** skill (uses Astro CLI)
- "Create a new Airflow project" / "Initialize project" -> use the **setting-up-astro-project** skill (uses Astro CLI)
Airflow by the numbers
- 1,186 all-time installs (skills.sh)
- +33 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #203 of 1,048 Mobile Development skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
airflow capabilities & compatibility
- Capabilities
- **new project?** see the **setting up astro proj · **local environment?** see the **managing astro · **deploying?** see the **deploying airflow** ski · "how do i run airflow locally?" / "set up airflo · "create a new airflow project" / "initialize pro
- Use cases
- documentation
What airflow says it does
# Airflow Operations Use `af` commands to query, manage, and troubleshoot Airflow workflows.
## Astro CLI The [Astro CLI](https://www.astronomer.io/docs/astro/cli/overview) is the recommended way to run Airflow locally and deploy to production.
npx skills add https://github.com/astronomer/agents --skill airflowAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1.2k |
|---|---|
| repo stars | ★ 412 |
| Security audit | 3 / 3 scanners passed |
| Last updated | July 27, 2026 |
| Repository | astronomer/agents ↗ |
How do I use airflow for the task described in its SKILL.md triggers?
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, v.
Who is it for?
Teams invoking airflow when the user request matches documented triggers and prerequisites.
Skip if: Skip when cached docs are missing, the request is a negative trigger, or another sibling skill owns the workflow.
When should I use this skill?
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
What you get
Step-by-step guidance grounded in airflow documentation and reference files.
- DAG run triggers
- task log output
- import error diagnosis
By the numbers
- Routes to 4 sub-skill areas: writing DAGs, debugging, deploying, and Airflow 2 to 3 migration
Files
Airflow Operations
Use af commands to query, manage, and troubleshoot Airflow workflows.
Astro CLI
The Astro CLI is the recommended way to run Airflow locally and deploy to production. It provides a containerized Airflow environment that works out of the box:
# Initialize a new project
astro dev init
# Start local Airflow (webserver at http://localhost:8080)
astro dev start
# Parse DAGs to catch errors quickly (no need to start Airflow)
astro dev parse
# Run pytest against your DAGs
astro dev pytest
# Deploy to production
astro deploy # Full deploy (image + DAGs)
astro deploy --dags # DAG-only deploy (fast, no image build)For more details:
- New project? See the setting-up-astro-project skill
- Local environment? See the managing-astro-local-env skill
- Deploying? See the deploying-airflow skill
---
Running the CLI
These commands assume af is on PATH. Run via astro otto to get it automatically, or install standalone with uv tool install astro-airflow-mcp.
Instance Configuration
Manage multiple Airflow instances with persistent configuration:
# Add a new instance
af instance add prod --url https://airflow.example.com --token "$API_TOKEN"
af instance add staging --url https://staging.example.com --username admin --password admin
# List and switch instances
af instance list # Shows all instances in a table
af instance use prod # Switch to prod instance
af instance current # Show current instance
af instance delete old-instance
# Auto-discover instances (use --dry-run to preview first)
af instance discover --dry-run # Preview all discoverable instances
af instance discover # Discover from all backends (astro, local)
af instance discover astro # Discover Astro deployments only
af instance discover astro --all-workspaces # Include all accessible workspaces
af instance discover local # Scan common local Airflow ports
af instance discover local --scan # Deep scan all ports 1024-65535
# IMPORTANT: Always run with --dry-run first and ask for user consent before
# running discover without it. The non-dry-run mode creates API tokens in
# Astro Cloud, which is a sensitive action that requires explicit approval.
# Show where an instance came from (file path + scope)
af instance show prod
# Override instance for a single command via env vars
AIRFLOW_API_URL=https://staging.example.com AIRFLOW_AUTH_TOKEN=$STG af dags list
# Or switch persistently
af instance use stagingConfig layout (mirrors git config system/global/local):
| Scope | File | Committed? |
|---|---|---|
| Global | ~/.astro/config.yaml | n/a (per-user) |
| Project shared | <root>/.astro/config.yaml | yes |
| Project local | <root>/.astro/config.local.yaml | no (gitignored) |
<root> is found by walking up from cwd looking for .astro/. Default write routing inside a project: add/discover → project-shared, use → project-local. Override with --global / --project / --local. Set AF_CONFIG=<path> to bypass layering and use a single file.
Migrate from the legacy ~/.af/config.yaml with af migrate (idempotent; renames the old file to .bak).
Tokens in config can reference environment variables using ${VAR} syntax:
instances:
- name: prod
url: https://airflow.example.com
auth:
token: ${AIRFLOW_API_TOKEN}Or use environment variables directly (no config file needed):
export AIRFLOW_API_URL=http://localhost:8080
export AIRFLOW_AUTH_TOKEN=your-token-here
# Or username/password:
export AIRFLOW_USERNAME=admin
export AIRFLOW_PASSWORD=adminOr CLI flags: af --airflow-url http://localhost:8080 --token "$TOKEN" <command>
Quick Reference
| Command | Description |
|---|---|
af health | System health check |
af dags list | List all DAGs |
af dags get <dag_id> | Get DAG details |
af dags explore <dag_id> | Full DAG investigation |
af dags source <dag_id> | Get DAG source code |
af dags pause <dag_id> | Pause DAG scheduling |
af dags unpause <dag_id> | Resume DAG scheduling |
af dags errors | List import errors |
af dags warnings | List DAG warnings |
af dags stats | DAG run statistics |
af runs list | List DAG runs |
af runs get <dag_id> <run_id> | Get run details |
af runs trigger <dag_id> | Trigger a DAG run |
af runs trigger-wait <dag_id> | Trigger and wait for completion |
af runs delete <dag_id> <run_id> | Permanently delete a DAG run |
af runs clear <dag_id> <run_id> | Clear a run for re-execution |
af runs diagnose <dag_id> <run_id> | Diagnose failed run |
af tasks list <dag_id> | List tasks in DAG |
af tasks get <dag_id> <task_id> | Get task definition |
af tasks instance <dag_id> <run_id> <task_id> | Get task instance |
af tasks logs <dag_id> <run_id> <task_id> | Get task logs |
af config version | Airflow version |
af config show | Full configuration |
af config connections | List connections |
af config variables | List variables |
af config variable <key> | Get specific variable |
af config pools | List pools |
af config pool <name> | Get pool details |
af config plugins | List plugins |
af config providers | List providers |
af config assets | List assets/datasets |
af api <endpoint> | Direct REST API access |
af api ls | List available API endpoints |
af api ls --filter X | List endpoints matching pattern |
af registry providers | List providers in the Airflow Registry |
af registry modules <provider> | List operators/hooks/sensors/transfers in a provider |
af registry parameters <provider> | Constructor signatures (name, type, default, required) for a provider's classes |
af registry connections <provider> | Connection types a provider exposes |
User Intent Patterns
Getting Started
- "How do I run Airflow locally?" / "Set up Airflow" -> use the managing-astro-local-env skill (uses Astro CLI)
- "Create a new Airflow project" / "Initialize project" -> use the setting-up-astro-project skill (uses Astro CLI)
- "How do I install Airflow?" / "Get started with Airflow" -> use the setting-up-astro-project skill
DAG Operations
- "What DAGs exist?" / "List all DAGs" ->
af dags list - "Tell me about DAG X" / "What is DAG Y?" ->
af dags explore <dag_id> - "What's the schedule for DAG X?" ->
af dags get <dag_id> - "Show me the code for DAG X" ->
af dags source <dag_id> - "Stop DAG X" / "Pause this workflow" ->
af dags pause <dag_id> - "Resume DAG X" ->
af dags unpause <dag_id> - "Are there any DAG errors?" ->
af dags errors - "Create a new DAG" / "Write a pipeline" -> use the authoring-dags skill
Run Operations
- "What runs have executed?" ->
af runs list - "Run DAG X" / "Trigger the pipeline" ->
af runs trigger <dag_id> - "Run DAG X and wait" ->
af runs trigger-wait <dag_id> - "Why did this run fail?" ->
af runs diagnose <dag_id> <run_id> - "Delete this run" / "Remove stuck run" ->
af runs delete <dag_id> <run_id> - "Clear this run" / "Retry this run" / "Re-run this" ->
af runs clear <dag_id> <run_id> - "Test this DAG and fix if it fails" -> use the testing-dags skill
Task Operations
- "What tasks are in DAG X?" ->
af tasks list <dag_id> - "Get task logs" / "Why did task fail?" ->
af tasks logs <dag_id> <run_id> <task_id> - "Full root cause analysis" / "Diagnose and fix" -> use the debugging-dags skill
Data Operations
- "Is the data fresh?" / "When was this table last updated?" -> use the checking-freshness skill
- "Where does this data come from?" -> use the tracing-upstream-lineage skill
- "What depends on this table?" / "What breaks if I change this?" -> use the tracing-downstream-lineage skill
Deployment Operations
- "Deploy my DAGs" / "Push to production" -> use the deploying-airflow skill
- "Set up CI/CD" / "Automate deploys" -> use the deploying-airflow skill
- "Deploy to Kubernetes" / "Set up Helm" -> use the deploying-airflow skill
- "astro deploy" / "DAG-only deploy" -> use the deploying-airflow skill
System Operations
- "What version of Airflow?" ->
af config version - "What connections exist?" ->
af config connections - "Are pools full?" ->
af config pools - "Is Airflow healthy?" ->
af health
API Exploration
- "What API endpoints are available?" ->
af api ls - "Find variable endpoints" ->
af api ls --filter variable - "Access XCom values" / "Get XCom" ->
af api xcom-entries -F dag_id=X -F task_id=Y - "Get event logs" / "Audit trail" ->
af api event-logs -F dag_id=X - "Create connection via API" ->
af api connections -X POST --body '{...}' - "Create variable via API" ->
af api variables -X POST -F key=name -f value=val
Registry Discovery
- "What operators does provider X have?" ->
af registry modules <provider> - "What are the constructor params for operator Y?" ->
af registry parameters <provider> - "What providers exist?" / "Is there a provider for Z?" ->
af registry providers - "What connection types does provider X expose?" ->
af registry connections <provider> - "Writing a DAG with a specific operator" -> use registry to verify current signature before copying examples
Common Workflows
Validate DAGs Before Deploying
If you're using the Astro CLI, you can validate DAGs without a running Airflow instance:
# Parse DAGs to catch import errors and syntax issues
astro dev parse
# Run unit tests
astro dev pytestOtherwise, validate against a running instance:
af dags errors # Check for parse/import errors
af dags warnings # Check for deprecation warningsDiscover Operator Signatures Before Writing Code
The Airflow Registry at airflow.apache.org/registry is the authoritative source for provider classes and their current constructor signatures. Prefer it over memory or stale documentation when authoring DAGs — the registry reflects the live provider release.
# List all providers and pick the one you need
af registry providers | jq '.providers[] | {id, name, version}'
# List every operator / hook / sensor in a provider (e.g. standard, amazon, google)
af registry modules standard \
| jq '.modules[] | {name, type, import_path, docs_url}'
# Get the current constructor signature for a specific class
af registry parameters standard \
| jq '.classes["airflow.providers.standard.operators.hitl.ApprovalOperator"].parameters'
# Filter modules by substring (useful when you know the concept but not the class)
af registry modules standard \
| jq '.modules[] | select(.import_path | test("hitl"))'Results are cached locally: 1 hour for the latest version, 30 days for pinned versions (which are immutable). Add --version X.Y.Z to any modules / parameters / connections call to target a specific release.
Investigate a Failed Run
# 1. List recent runs to find failure
af runs list --dag-id my_dag
# 2. Diagnose the specific run
af runs diagnose my_dag manual__2024-01-15T10:00:00+00:00
# 3. Get logs for failed task (from diagnose output)
af tasks logs my_dag manual__2024-01-15T10:00:00+00:00 extract_data
# 4. After fixing, clear the run to retry all tasks
af runs clear my_dag manual__2024-01-15T10:00:00+00:00Morning Health Check
# 1. Overall system health
af health
# 2. Check for broken DAGs
af dags errors
# 3. Check pool utilization
af config poolsUnderstand a DAG
# Get comprehensive overview (metadata + tasks + source)
af dags explore my_dagCheck Why DAG Isn't Running
# Check if paused
af dags get my_dag
# Check for import errors
af dags errors
# Check recent runs
af runs list --dag-id my_dagTrigger and Monitor
# Option 1: Trigger and wait (blocking)
af runs trigger-wait my_dag --timeout 1800
# Option 2: Trigger and check later
af runs trigger my_dag
af runs get my_dag <run_id>Output Format
All commands output JSON (except instance commands which use human-readable tables):
af dags list
# {
# "total_dags": 5,
# "returned_count": 5,
# "dags": [...]
# }Use jq for filtering:
# Find failed runs
af runs list | jq '.dag_runs[] | select(.state == "failed")'
# Get DAG IDs only
af dags list | jq '.dags[].dag_id'
# Find paused DAGs
af dags list | jq '[.dags[] | select(.is_paused == true)]'Task Logs Options
# Get logs for specific retry attempt
af tasks logs my_dag run_id task_id --try 2
# Get logs for mapped task index
af tasks logs my_dag run_id task_id --map-index 5Direct API Access with af api
Use af api for endpoints not covered by high-level commands (XCom, event-logs, backfills, etc).
# Discover available endpoints
af api ls
af api ls --filter variable
# Basic usage
af api dags
af api dags -F limit=10 -F only_active=true
af api variables -X POST -F key=my_var -f value="my value"
af api variables/old_var -X DELETEField syntax: -F key=value auto-converts types, -f key=value keeps as string.
Full reference: See api-reference.md for all options, common endpoints (XCom, event-logs, backfills), and examples.
Related Skills
| Skill | Use when... |
|---|---|
| authoring-dags | Creating or editing DAG files with best practices |
| testing-dags | Iterative test -> debug -> fix -> retest cycles |
| debugging-dags | Deep root cause analysis and failure diagnosis |
| checking-freshness | Checking if data is up to date or stale |
| tracing-upstream-lineage | Finding where data comes from |
| tracing-downstream-lineage | Impact analysis -- what breaks if something changes |
| deploying-airflow | Deploying DAGs to production (Astro, Docker Compose, Kubernetes) |
| migrating-airflow-2-to-3 | Upgrading DAGs from Airflow 2.x to 3.x |
| managing-astro-local-env | Starting, stopping, or troubleshooting local Airflow |
| setting-up-astro-project | Initializing a new Astro/Airflow project |
af api Reference
Direct REST API access for Airflow endpoints not covered by high-level commands.
Endpoint Discovery
# List all available endpoints
af api ls
# Filter endpoints by pattern
af api ls --filter variable
af api ls --filter xcom
# Get full OpenAPI spec (for detailed method/parameter info)
af api spec
# Get details for specific endpoint
af api spec | jq '.paths["/api/v2/variables"]'HTTP Methods
# GET (default) - retrieve resources
af api dags
af api dags/my_dag
af api dags -F limit=10 -F only_active=true
# POST - create resources
af api variables -X POST -F key=my_var -f value="my value"
# PATCH - update resources
af api dags/my_dag -X PATCH -F is_paused=false
# DELETE - remove resources
af api variables/old_var -X DELETEField Syntax
| Flag | Behavior | Use When |
|---|---|---|
-F key=value | Auto-converts: true/false → bool, numbers → int/float, null → null | Most cases |
-f key=value | Keeps value as raw string | Values that look like numbers but should be strings |
--body '{}' | Raw JSON body | Complex nested objects |
-F key=@file | Read value from file | Large values, configs |
# Type conversion examples
af api dags -F limit=10 -F only_active=true
# Sends: params limit=10 (int), only_active=true (bool)
# Raw string (no conversion)
af api variables -X POST -F key=port -f value=8080
# Sends: {"key": "port", "value": "8080"} (string, not int)Common Endpoints
XCom Values
af api xcom-entries -F dag_id=my_dag -F dag_run_id=manual__2024-01-15 -F task_id=my_taskEvent Logs / Audit Trail
af api event-logs -F dag_id=my_dag -F limit=50
af api event-logs -F event=triggerBackfills (Airflow 2.10+)
# Create backfill
af api backfills -X POST --body '{
"dag_id": "my_dag",
"from_date": "2024-01-01T00:00:00Z",
"to_date": "2024-01-31T00:00:00Z"
}'
# List backfills
af api backfills -F dag_id=my_dagTask Instances for a Run
af api dags/my_dag/dagRuns/manual__2024-01-15/taskInstancesConnections (passwords exposed)
# Warning: Use 'af config connections' for filtered output
af api connections
af api connections/my_connDebugging
# Include HTTP status and headers
af api dags -i
# Access non-versioned endpoints
af api health --rawWhen to Use af api
| Task | Use |
|---|---|
| List/get DAGs, runs, tasks | af dags, af runs, af tasks |
| Trigger and monitor runs | af runs trigger-wait |
| Delete or clear runs | af runs delete, af runs clear |
| Diagnose failures | af runs diagnose |
| XCom, event logs, backfills | af api |
| Create/update variables, connections | af api |
| Any endpoint not in high-level CLI | af api |
#!/bin/bash
# Hook: SessionStart - Warm the af / uvx cache so the first real call is fast.
#
# `af` on PATH is typically a thin shell wrapper that exec's
# `uvx --from 'astro-airflow-mcp==<pin>' af`, so invoking it once warms the
# uvx cache for whichever pin the wrapper installs. No-op if `af` isn't on
# PATH (the skill's body tells the user how to install it).
(af --version > /dev/null 2>&1 &)
exit 0
Related skills
How it compares
Pick airflow over generic shell scripts when you need af CLI coverage plus Astronomer sub-skill routing for deploy and Airflow 3 migration.
FAQ
What does airflow do?
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
When should I use airflow?
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
What are common prerequisites?
--- name: airflow description: Queries, manages, and troubleshoots Apache Airflow using the af CLI.
Is Airflow safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.