This skill covers deploying Airflow DAGs and projects to production, whether using Astro (Astronomer's managed platform) or open-source Airflow on Docker Compose or Kubernetes.
Confirm successful installation by checking the skill directory location:
.cursor/skills/deploying-airflow
Restart Cursor to activate deploying-airflow. Access via /deploying-airflow in your agent's command palette.
โ
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
This skill covers deploying Airflow DAGs and projects to production, whether using Astro (Astronomer's managed platform) or open-source Airflow on Docker Compose or Kubernetes.
Choosing a path: Astro is a good fit for managed operations and faster CI/CD. For open-source, use Docker Compose for dev and the Helm chart for production.
Astro (Astronomer)
Astro provides CLI commands and GitHub integration for deploying Airflow projects.
Deploy Commands
Command
What It Does
astro deploy
Full project deploy โ builds Docker image and deploys DAGs
astro deploy --dags
DAG-only deploy โ pushes only DAG files (fast, no image build)
astro deploy --image
Image-only deploy โ pushes only the Docker image (for multi-repo CI/CD)
astro deploy --dbt
dbt project deploy โ deploys a dbt project to run alongside Airflow
Full Project Deploy
Builds a Docker image from your Astro project and deploys everything (DAGs, plugins, requirements, packages):
astro deploy
Use this when you've changed requirements.txt, Dockerfile, packages.txt, plugins, or any non-DAG file.
DAG-Only Deploy
Pushes only files in the dags/ directory without rebuilding the Docker image:
astro deploy --dags
This is significantly faster than a full deploy since it skips the image build. Use this when you've only changed DAG files and haven't modified dependencies or configuration.
Image-Only Deploy
Pushes only the Docker image without updating DAGs:
astro deploy --image
This is useful in multi-repo setups where DAGs are deployed separately from the image, or in CI/CD pipelines that manage image and DAG deploys independently.
dbt Project Deploy
Deploys a dbt project to run with Cosmos on an Astro deployment:
astro deploy --dbt
GitHub Integration
Astro supports branch-to-deployment mapping for automated deploys:
Map branches to specific deployments (e.g., main -> production, develop -> staging)
Pushes to mapped branches trigger automatic deploys
Supports DAG-only deploys on merge for faster iteration
Configure this in the Astro UI under Deployment Settings > CI/CD.
CI/CD Patterns
Common CI/CD strategies on Astro:
DAG-only on feature branches: Use astro deploy --dags for fast iteration during development
Full deploy on main: Use astro deploy on merge to main for production releases
Separate image and DAG pipelines: Use --image and --dags in separate CI jobs for independent release cycles
Deploy Queue
When multiple deploys are triggered in quick succession, Astro processes them sequentially in a deploy queue. Each deploy completes before the next one starts.
Deploy Airflow using the official Docker Compose setup. This is recommended for learning and exploration โ for production, use Kubernetes with the Helm chart (see below).
Prerequisites
Docker and Docker Compose v2.14.0+
The official apache/airflow Docker image
Quick Start
Download the official Airflow 3 Docker Compose file:
Airflow 3 architecture note: The webserver has been replaced by the API server (airflow api-server), and the DAG processor now runs as a standalone process separate from the scheduler.
Common Operations
# Start all servicesdocker compose up -d# Stop all servicesdocker compose down
# View logsdocker compose logs -f airflow-scheduler
# Restart after requirements changedocker compose down &&docker compose up -d--build# Run a one-off Airflow CLI commanddocker compose exec airflow-apiserver airflow dags list
Installing Python Packages
Add packages to requirements.txt and rebuild:
# Add to requirements.txt, then:docker compose down
docker compose up -d--build
Or use a custom Dockerfile:
FROM apache/airflow:3 # Pin to a specific version (e.g., 3.1.7) for reproducibilityCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt
Update docker-compose.yaml to build from the Dockerfile:
x-airflow-common:&airflow-commonbuild:context: .
dockerfile: Dockerfile
# ... rest of config
Environment Variables
Configure Airflow settings via environment variables in docker-compose.yaml:
# Executor typeexecutor: KubernetesExecutor # or CeleryExecutor, LocalExecutor
Implementation Guide
Prerequisites
โบClaude Desktop or compatible AI client with skill support
โบClear understanding of task or problem to solve
โบWillingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Steps
1Install skill using provided installation command
2Test with simple use case relevant to your work
3Evaluate output quality and relevance
4Iterate on prompts to improve results
5Integrate into regular workflow if valuable
Common Pitfalls
โ Expecting perfect results without iteration
โ Not providing enough context in prompts
โ Using skill for tasks outside its intended scope
โ Accepting outputs without review and validation
Best Practices
โ Do
+Start with clear, specific prompts
+Provide relevant context and constraints
+Review and refine all outputs before using
+Iterate to improve output quality
+Document successful prompt patterns
โ Don't
โDon't use without understanding skill limitations
โDon't skip validation of outputs
โDon't share sensitive information in prompts
โDon't expect skill to replace human judgment
๐ก Pro Tips
โ Be specific about desired format and style
โ Ask for multiple options to choose from
โ Request explanations to understand reasoning
โ Combine AI efficiency with human expertise
When to Use This
โ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
โ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path
1Familiarize yourself with skill capabilities and limitations
2Start with low-risk, non-critical tasks
3Progress to more complex and valuable use cases
4Build expertise through regular use and experimentation