Skip to main content
skill CX Codex

managing-astro-deployments — Claude Code skill: Astronomer deploys

A skill that walks your agent through Astro CLI: log in, switch workspaces, create deployments and ship code to production.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add astronomer/agents --skill managing-astro-deployments -a claude-code
Open on GitHub

What managing-astro-deployments does

This skill covers production deployments on Astronomer through the Astro CLI. Your agent gets the exact commands: astro login for browser OAuth, astro workspace list and astro workspace switch <WORKSPACE_ID> to change context, astro deployment list and astro deployment inspect <DEPLOYMENT_ID> to read deployment state. Auth tokens are stored locally, so log in before anything else.

Deploys come in three shapes. A full astro deploy <DEPLOYMENT_ID> rebuilds the Docker image and syncs DAGs — use it when requirements.txt, packages.txt or the Dockerfile changed. The --dags flag ships only Python files from dags/ and takes seconds instead of minutes, but the deployment needs --dag-deploy-enabled set first. The third option, --image-only, updates the image and skips DAG sync. There is also --force, which bypasses the validation that catches broken builds. That is a reason to check what failed validation before reaching for it.

API tokens for CI/CD get their own section: astro deployment token list --deployment-id <DEPLOYMENT_ID> and astro deployment token create with the DEPLOYMENT_ADMIN role and an optional --expiry in days. The token value appears once, at creation. Deleting a deployment cannot be undone — DAGs, task history and metadata go with it. The skill points to two neighbours, one for local Airflow environments and one for production troubleshooting.

What it helps with

  • log in to Astronomer and switch to the right workspace
  • create a production deployment with the celery or kubernetes executor
  • ship changed DAGs without rebuilding the Docker image
  • check deployment status, Airflow version and resource quotas
  • issue a CI/CD API token with an expiry

Example prompts for the agent

  • Log in to Astronomer and list my workspaces
  • Create a deployment labeled production with the celery executor
  • Deploy only the dags folder to deployment <DEPLOYMENT_ID>

How to install managing-astro-deployments

1Skills CLI (Vercel)

npx skills add astronomer/agents --skill managing-astro-deployments -a claude-code

2Manually: put the files in place

~/.claude/skills/managing-astro-deployments/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/managing-astro-deployments/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about managing-astro-deployments

How do I install managing-astro-deployments in Claude?

Run npx skills add astronomer/agents --skill managing-astro-deployments -a claude-code. The skill file lands at ~/.claude/skills/managing-astro-deployments/SKILL.md.

What does managing-astro-deployments do?

It guides the agent through Astronomer production deployments: authentication, workspaces, creating, updating and deleting deployments, and deploying code.

How is a DAG-only deploy different from a full deploy?

astro deploy <DEPLOYMENT_ID> --dags syncs only Python files from dags/ and skips the Docker image rebuild. The deployment must have --dag-deploy-enabled set.

Source text

SKILL.md · Apache-2.0
---
name: managing-astro-deployments
description: Manage Astronomer production deployments with Astro CLI. Use when the user wants to authenticate, switch workspaces, create/update/delete deployments, or deploy code to production.
---

# Astro Deployment Management

This skill helps you manage production Astronomer deployments using the Astro CLI.

> **For local development**, see the **managing-astro-local-env** skill.
> **For production troubleshooting**, see the **troubleshooting-astro-deployments** skill.

---

## Authentication

All deployment operations require authentication:

```bash
# Login to Astronomer (opens browser for OAuth)
astro login
```

Authentication tokens are stored locally for subsequent commands. Run this before any deployment operations.

---

## Workspace Management

Deployments are organized into workspaces:

```bash
# List all accessible workspaces
astro workspace list

# Switch to a specific workspace
astro workspace switch <WORKSPACE_ID>
```

Workspace context is maintained between sessions. Most deployment commands operate within the current workspace context.

---

## List and Inspect Deployments

```bash
# List deployments in current workspace
astro deployment list

# List deployments across all workspaces
astro deployment list --all

# Inspect specific deployment (detailed info)
astro deployment inspect <DEPLOYMENT_ID>

# Inspect by name (alternative to ID)
astro deployment inspect --deployment-name data-service-stg
```

### What `inspect` Shows

- Deployment status (HEALTHY, UNHEALTHY)
- Runtime version and Airflow version
- Executor type (CELERY, KUBERNETES, LOCAL)
- Scheduler configuration (size, count)
- Worker queue settings (min/max workers, concurrency, worker type)
- Resource quotas (CPU, memory)
- Environment variables
- Last deployment timestamp and current tag
- Webserver and API URLs
- High availability status

---

## Create Deployments

```bash
# Create with default settings
astro deployment create

# Create with specific executor
astro deployment create --label production --executor celery
astro deployment create --label staging --executor kubernetes

# Executor options:
#   - celery: Best for most production workloads
#   - kubernetes: Best for dynamic scaling, isolated tasks
#   - local: Best for development only
```

---

## Update Deployments

```bash
# Enable DAG-only deploys (faster iteration)
astro deployment update <DEPLOYMENT_ID> --dag-deploy-enabled

# Update other settings (use --help for full options)
astro deployment update <DEPLOYMENT_ID> --help
```

---

## Delete Deployments

```bash
# Delete a deployment (requires confirmation)
astro deployment delete <DEPLOYMENT_ID>
```

**Destructive**: This cannot be undone. All DAGs, task history, and metadata will be lost.

---

## Deploy Code to Production

### Full Deploy

Deploy both DAGs and Docker image (required when dependencies change):

```bash
astro deploy <DEPLOYMENT_ID>
```

Use when:
- Dependencies changed (`requirements.txt`, `packages.txt`, `Dockerfile`)
- First deployment of new project
- Significant infrastructure changes

### DAG-Only Deploy (Recommended for Iteration)

Deploy only DAG files, skip Docker image rebuild:

```bash
astro deploy <DEPLOYMENT_ID> --dags
```

Use when:
- Only DAG files changed (Python files in `dags/` directory)
- Quick iteration during development
- Much faster than full deploy (seconds vs minutes)

**Requires**: `--dag-deploy-enabled` flag set on deployment (see Update Deployments)

### Image-Only Deploy

Deploy only Docker image, skip DAG sync:

```bash
astro deploy <DEPLOYMENT_ID> --image-only
```

Use when:
- Only dependencies changed
- Dockerfile or requirements updated
- No DAG changes

### Force Deploy

Bypass safety checks and deploy:

```bash
astro deploy <DEPLOYMENT_ID> --force
```

**Caution**: Skips validation that could prevent broken deployments.

---

## Deployment API Tokens

Manage API tokens for programmatic access to deployments:

```bash
# List tokens for a deployment
astro deployment token list --deployment-id <DEPLOYMENT_ID>

# Create a new token
astro deployment token create \
  --deployment-id <DEPLOYMENT_ID> \
  --name "CI/CD Pipeline" \
  --role DEPLOYMENT_ADMIN

# Create token with expiration
astro deployment token create \
  --deployment-id <DEPLOYMENT_ID> \
  --name "Temporary Access" \
  --role DEPLOYMENT_ADMIN \
  --expiry 30  # Days until expiration (0 = never expires)
```

**Roles**:
- `DEPLOYMENT_ADMIN`: Full access to deployment

**Note**: Token value is only shown at creation time. Store it securely.

---

## Common Workflows

### First-Time Production Deployment

```bash
# 1. Login
astro login

# 2. Switch to production workspace
astro workspace list
astro workspace switch <PROD_WORKSPACE_ID>

# 3. Create deployment
astro deployment create --label production --executor celery

# 4. Note the deployment ID, then deploy
astro deploy <DEPLOYMENT_ID>
```

### Iterative DAG Development

```bash
# 1. Enable fast deploys (one-time setup)
astro deployment update <DEPLOYMENT_ID> --dag-deploy-enabled

# 2. Make DAG changes locally

# 3. Deploy quickly
astro deploy <DEPLOYMENT_ID> --dags
```

### Promoting Code from Staging to Production

```bash
# 1. Deploy to staging first
astro workspace switch <STAGING_WORKSPACE_ID>
astro deploy <STAGING_DEPLOYMENT_ID>

# 2. Test in staging

# 3. Deploy same code to production
astro workspace switch <PROD_WORKSPACE_ID>
astro deploy <PROD_DEPLOYMENT_ID>
```

---

## Configuration Management

```bash
# View CLI configuration
astro config get

# Set configuration value
astro config set <KEY> <VALUE>

# Check CLI version
astro version

# Upgrade CLI to latest version
astro upgrade
```

---

## Tips

- Use `--dags` flag for fast iteration (seconds vs minutes)
- Always test in staging workspace before production
- Use `deployment inspect` to verify deployment health before deploying
- Deployment IDs are permanent, names can change
- Most commands work with deployment ID; `inspect` also accepts `--deployment-name`
- Set `--dag-deploy-enabled` once per deployment for fast deploys
- Keep workspace context visible with `astro workspace list` (shows asterisk for current)

---

## Related Skills

- **troubleshooting-astro-deployments**: Investigate deployment issues, view logs, manage environment variables
- **managing-astro-local-env**: Manage local Airflow development environment
- **setting-up-astro-project**: Initialize and configure Astro projects

© astronomer · Apache-2.0 · astronomer/agents

Similar skills

Everything for DevOps and infrastructure →

From the same set23

warehouse-init Walks your warehouse and writes every database, schema and table into .astro/warehouse.md, so the agent looks up tables without querying the warehouse. CX Codex +1 814installs deploying-airflow A skill for shipping Airflow DAGs and projects: Astro CLI commands, Docker Compose and Helm. Useful when pipelines need to reach production. CX Codex +1 786installs troubleshooting-astro-deployments A skill that walks the agent through diagnosing Astronomer production deployments with the Astro CLI: logs, errors, environment variables. CX Codex +1 622installs airflow-plugins This skill walks your agent through building Airflow 3.1+ plugins with FastAPI endpoints, React pages and custom UI tabs. Useful when you need something custom inside Airflow. CX Codex +1 594installs blueprint Creates validated Airflow task group templates with Pydantic and composes DAGs from YAML files. CX Codex +1 552installs dag-factory This skill walks your agent through writing Apache Airflow DAGs as dag-factory YAML configs instead of Python. Handy when you want a declarative pipeline fast. CX Codex +1 387installs migrating-ai-sdk-to-common-ai Moves Airflow projects off airflow-ai-sdk onto the official apache-airflow-providers-common-ai 0.4.0+ provider. Useful when LLM decorators and model config have to move to connections. CX Codex +1 348installs delegating-to-otto A skill that shows an agent how to call astro otto as a sub-agent for Airflow, dbt and data-engineering work. Handy for Airflow 3 upgrade planning and repo-wide audits. CX Codex +1 324installs

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