gcp-managed-airflow-recommendations

Diagnose Cloud Composer environments and generate evidence-based Airflow tuning recommendations.

Updated Aug 11, 2026
One-click install
npx skills add https://github.com/Yashyasik/zexca-api --skill gcp-managed-airflow-recommendations-yashyasik
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gcp-managed-airflow-recommendations
Source: https://github.com/Yashyasik/zexca-api/tree/main/.gemini/skills/gcp-managed-airflow-recommendations
Command: npx skills add https://github.com/Yashyasik/zexca-api --skill gcp-managed-airflow-recommendations-yashyasik

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Tuning Managed Service for Apache Airflow (Cloud Composer) environments is hard without telemetry: teams often guess at sizing, miss OOM-caused scheduler restarts, or overlook slow DAG parsing. This Skill gathers real metrics and turns them into concrete, data-backed recommendations. ## Core Features & Use Cases - Telemetry-Driven Diagnosis: Runs Python scripts against Cloud Monitoring (PromQL API) to collect CPU, memory, disk, restart counts, DAG parsing stats, and environment health for each Airflow component. - Structured Recommendation Workflow: Follows a five-step process—context gathering, configuration verification via gcloud, metrics collection, analysis, and categorized recommendations covering infrastructure scaling, airflow.cfg overrides, bucket hygiene, and production best practices. - Use Case: Your Cloud Composer scheduler keeps restarting and tasks are delayed. The Skill pulls restart counts and memory usage, identifies an OOM condition caused by heavy top-level DAG code, and recommends specific parsing and configuration fixes instead of blind upsizing. ## Quick Start Ask the assistant to analyze your Cloud Composer environment named my-env in project my-project located in us-central1 over the past 24 hours and recommend performance improvements.

Frequently Asked Questions about gcp-managed-airflow-recommendations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose Cloud Composer performance issues?▼

Run the provided Python scripts with your project ID, location, environment name, and query duration in hours. They query Cloud Monitoring via the PromQL API and return CPU, memory, disk, restart, and DAG parsing metrics per Airflow component as JSON.

How to check why Airflow scheduler keeps restarting in Cloud Composer?▼

Use the workload_restarts.py script to get restart counts per component, then correlate with workload_memory_usage.py output. High scheduler restarts typically indicate out-of-memory conditions or unoptimized DAGs blocking the event loop.

What metrics does Cloud Composer expose for monitoring?▼

Cloud Composer publishes metrics under composer.googleapis.com including environment health, database health, webserver health, workload CPU/memory/disk usage, restart counts, and DAG processing stats like total parse time and processor timeouts.

Does this work with both Cloud Composer 2 and Composer 3?▼

Yes, the scripts query the cloud_composer_environment and cloud_composer_workload monitored resources used by both generations. The Skill instructions explicitly require distinguishing Gen 2 and Gen 3 architectures so recommendations match the correct infrastructure model.

What permissions are needed to fetch Cloud Composer metrics?▼

The scripts authenticate via gcloud application-default credentials and call the Cloud Monitoring PromQL query_range endpoint. Your account needs permission to read monitoring time series data and describe Composer environments in the target project.

Why is my Airflow DAG parsing slow in Cloud Composer?▼

Common causes include heavy top-level code in DAG files, database calls for Variables or Connections at parse time, and dynamically generated DAG files. Run dag_parsing_stats.py to measure parse times and processor timeouts, then inspect the dag-processor-manager logs.