managing-astro-deployments — скилл для Claude Code: деплой Astronomer
Скилл ведёт агента через Astro CLI: вход, переключение воркспейсов, создание деплойментов и выкладка кода в продакшен.
npx skills add astronomer/agents --skill managing-astro-deployments -a claude-codeЧто делает managing-astro-deployments
Скилл описывает работу с продакшен-деплойментами Astronomer через Astro CLI. Агент получает готовые команды: astro login для OAuth-входа в браузере, astro workspace list и astro workspace switch <WORKSPACE_ID> для переключения контекста, astro deployment list, astro deployment inspect <DEPLOYMENT_ID> для разбора состояния. Токены после входа хранятся локально, поэтому логиниться нужно до остальных операций.
Деплой бывает трёх видов. Полный astro deploy <DEPLOYMENT_ID> пересобирает Docker-образ и синхронизирует DAG — это когда менялись requirements.txt, packages.txt или Dockerfile. Флаг --dags выкладывает только Python-файлы из dags/ и идёт секунды вместо минут, но требует, чтобы на деплойменте стоял --dag-deploy-enabled. Третий вариант, --image-only, обновляет образ без DAG. Есть ещё --force: он обходит проверки, которые как раз ловят сломанные сборки, так что это повод сначала посмотреть, что именно не прошло валидацию.
Отдельный блок — API-токены для CI/CD: astro deployment token list --deployment-id <DEPLOYMENT_ID> и astro deployment token create с ролью DEPLOYMENT_ADMIN и опциональным --expiry в днях. Значение токена показывается один раз при создании. Удаление деплоймента необратимо: вместе с ним уходят DAG, история задач и метаданные. Скилл ссылается на соседние — по локальной среде и по разбору проблем продакшена.
Какие задачи решает
- залогиниться в Astronomer и переключиться в нужный воркспейс
- создать продакшен-деплоймент с executor celery или kubernetes
- выложить только изменённые DAG без пересборки образа
- посмотреть статус, версии Airflow и квоты ресурсов деплоймента
- выпустить API-токен для CI/CD с ограниченным сроком
Примеры запросов агенту
- Залогинься в Astronomer и покажи список воркспейсов
- Создай деплоймент с меткой production и executor celery
- Выложи изменения только из папки dags в деплоймент <DEPLOYMENT_ID>
Как установить managing-astro-deployments
1Через Skills CLI (Vercel)
npx skills add astronomer/agents --skill managing-astro-deployments -a claude-code2Вручную: положить файлы
~/.claude/skills/managing-astro-deployments/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/managing-astro-deployments/
1Через Skills CLI (Vercel)
npx skills add astronomer/agents --skill managing-astro-deployments -a codex2Вручную: положить файлы
.agents/skills/managing-astro-deployments/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add astronomer/agents --skill managing-astro-deployments -a cursor2Вручную: положить файлы
.cursor/skills/managing-astro-deployments/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install astronomer/agents managing-astro-deployments2Вручную: положить файлы
.github/skills/managing-astro-deployments/SKILL.md1Через Skills CLI (Vercel)
npx skills add astronomer/agents --skill managing-astro-deployments -a gemini-cli2Командой платформы
gemini skills install https://github.com/astronomer/agents --path skills/managing-astro-deploymentsВручную: положить файлы
.devin/skills/managing-astro-deployments/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add astronomer/agents --skill managing-astro-deployments -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о managing-astro-deployments
Как установить managing-astro-deployments в Claude?
Выполните npx skills add astronomer/agents --skill managing-astro-deployments -a claude-code. Файл скилла окажется в ~/.claude/skills/managing-astro-deployments/SKILL.md.
Что делает managing-astro-deployments?
Проводит агента по операциям с продакшен-деплойментами Astronomer: вход, воркспейсы, создание, обновление, удаление и выкладка кода.
Чем DAG-only деплой отличается от полного?
astro deploy <DEPLOYMENT_ID> --dags синхронизирует только Python-файлы из dags/ и не пересобирает Docker-образ. Для него на деплойменте должен быть включён флаг --dag-deploy-enabled.
Исходный текст
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