Agent skill

managing-astro-local-env

Manage local Airflow environment with Astro CLI. Use when the user wants to start, stop, or restart Airflow, view logs, troubleshoot containers, or fix environment issues. For project setup, see setting-up-astro-project.

Stars 295
Forks 34

Install this agent skill to your Project

npx add-skill https://github.com/astronomer/agents/tree/main/skills/managing-astro-local-env

SKILL.md

Astro Local Environment

This skill helps you manage your local Airflow environment using the Astro CLI.

To set up a new project, see the setting-up-astro-project skill. When Airflow is running, use MCP tools from authoring-dags and testing-dags skills.


Start / Stop / Restart

bash
# Start local Airflow (webserver at http://localhost:8080)
astro dev start

# Stop containers (preserves data)
astro dev stop

# Kill and remove volumes (clean slate)
astro dev kill

# Restart all containers
astro dev restart

# Restart specific component
astro dev restart --scheduler
astro dev restart --webserver

Default credentials: admin / admin

Restart after modifying: requirements.txt, packages.txt, Dockerfile


Check Status

bash
astro dev ps

View Logs

bash
# All logs
astro dev logs

# Specific component
astro dev logs --scheduler
astro dev logs --webserver

# Follow in real-time
astro dev logs -f

Access Container Shell

bash
# Bash into scheduler container
astro dev bash

# Run Airflow CLI commands
astro dev run airflow info
astro dev run airflow dags list

Troubleshooting

Issue Solution
Port 8080 in use Stop other containers or edit .astro/config.yaml
Container won't start astro dev kill then astro dev start
Package install failed Check requirements.txt syntax
DAG not appearing Run astro dev parse to check for import errors
Out of disk space docker system prune

Reset Environment

When things are broken:

bash
astro dev kill
astro dev start

Upgrade Airflow

Test compatibility first

bash
astro dev upgrade-test

Change version

  1. Edit Dockerfile:

    dockerfile
    FROM quay.io/astronomer/astro-runtime:13.0.0
    
  2. Restart:

    bash
    astro dev kill && astro dev start
    

Related Skills

  • setting-up-astro-project: Initialize projects and configure dependencies
  • authoring-dags: Write DAGs (uses MCP tools, requires running Airflow)
  • testing-dags: Test DAGs (uses MCP tools, requires running Airflow)
  • deploying-airflow: Deploy DAGs to production (Astro, Docker Compose, Kubernetes)

Expand your agent's capabilities with these related and highly-rated skills.

astronomer/agents

testing-dags

Complex DAG testing workflows with debugging and fixing cycles. Use for multi-step testing requests like "test this dag and fix it if it fails", "test and debug", "run the pipeline and troubleshoot issues". For simple test requests ("test dag", "run dag"), the airflow entrypoint skill handles it directly. This skill is for iterative test-debug-fix cycles.

295 34
Explore
astronomer/agents

analyzing-data

Queries data warehouse and answers business questions about data. Handles questions requiring database/warehouse queries including "who uses X", "how many Y", "show me Z", "find customers", "what is the count", data lookups, metrics, trends, or SQL analysis.

295 34
Explore
astronomer/agents

setting-up-astro-project

Initialize and configure Astro/Airflow projects. Use when the user wants to create a new project, set up dependencies, configure connections/variables, or understand project structure. For running the local environment, see managing-astro-local-env.

295 34
Explore
astronomer/agents

tracing-upstream-lineage

Trace upstream data lineage. Use when the user asks where data comes from, what feeds a table, upstream dependencies, data sources, or needs to understand data origins.

295 34
Explore
astronomer/agents

airflow-plugins

Build Airflow 3.1+ plugins that embed FastAPI apps, custom UI pages, React components, middleware, macros, and operator links directly into the Airflow UI. Use this skill whenever the user wants to create an Airflow plugin, add a custom UI page or nav entry to Airflow, build FastAPI-backed endpoints inside Airflow, serve static assets from a plugin, embed a React app in the Airflow UI, add middleware to the Airflow API server, create custom operator extra links, or call the Airflow REST API from inside a plugin. Also trigger when the user mentions AirflowPlugin, fastapi_apps, external_views, react_apps, plugin registration, or embedding a web app in Airflow 3.1+. If someone is building anything custom inside Airflow 3.1+ that involves Python and a browser-facing interface, this skill almost certainly applies.

295 34
Explore
astronomer/agents

warehouse-init

Initialize warehouse schema discovery. Generates .astro/warehouse.md with all table metadata for instant lookups. Run once per project, refresh when schema changes. Use when user says "/astronomer-data:warehouse-init" or asks to set up data discovery.

295 34
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results