gcp-managed-airflow-recommendations

Diagnose and tune Cloud Composer environments using Cloud Monitoring metrics and gcloud configuration data.

1|Updated Aug 30, 2026
One-click install
npx skills add https://github.com/FeexSystems/3WM-SONIK-LABS --skill gcp-managed-airflow-recommendations-feexsystems
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gcp-managed-airflow-recommendations
Source: https://github.com/FeexSystems/3WM-SONIK-LABS/tree/main/.gemini/skills/gcp-managed-airflow-recommendations
Command: npx skills add https://github.com/FeexSystems/3WM-SONIK-LABS --skill gcp-managed-airflow-recommendations-feexsystems

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Cloud Composer (Managed Service for Apache Airflow) environments often suffer from scheduler restarts, slow DAG parsing, and resource saturation, but diagnosing root causes requires querying scattered metrics and configurations manually. ## Core Features & Use Cases - Telemetry-Driven Diagnosis: Runs Python scripts that query Cloud Monitoring via PromQL to gather CPU, memory, disk, restart counts, DAG parsing stats, and environment health percentages. - Configuration Inspection: Uses gcloud commands from the reference guide to inspect environment size, scaling parameters, DAG bucket contents, and component logs. - Evidence-Based Recommendations: Produces categorized recommendations covering infrastructure scaling, airflow.cfg overrides, bucket hygiene, and production best practices like high-resilience mode. - Use Case: When Airflow workers keep restarting, run the workload restart and memory scripts to confirm OOM conditions, then receive targeted tuning advice instead of blindly upsizing machines. ## Quick Start Analyze my Cloud Composer environment named prod-airflow in project my-gcp-project located in us-central1 over the past 24 hours and give me optimization recommendations.

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 worker restarts?▼

Run the workload_restarts.py script with your project ID, location, environment name, and query duration to retrieve restart counts per component. High scheduler or worker restart counts typically indicate memory issues or unoptimized DAGs blocking the event loop.

How to check Cloud Composer environment health metrics?▼

Use the environment_health.py script, which queries Cloud Monitoring for environment, database, and webserver health percentages over a specified timeframe. It requires a minimum query duration of one hour and outputs results as JSON.

What metrics should I check before scaling Cloud Composer?▼

Check CPU usage, memory consumption, and disk usage per workload component using the provided monitoring scripts before resizing. Recommendations should be evidence-based rather than blindly increasing machine sizes without confirming actual resource saturation.

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

Yes, but recommendations must distinguish between generations since their architectures differ. The skill instructs the agent to verify the environment generation via gcloud configuration inspection before suggesting scaling or configuration changes.

Why are my Airflow DAG parsing times high?▼

High parsing times usually come from heavy top-level code in DAG files, such as database connections or API calls outside task definitions. The dag_parsing_stats.py script measures total parse time, parse errors, and processor timeouts to confirm the bottleneck.

What permissions are needed to run the monitoring scripts?▼

The scripts authenticate via gcloud application-default credentials and call the Cloud Monitoring PromQL API. Your account needs read access to Cloud Monitoring metrics and permission to describe the Composer environment in the target project.