Skip to main content
airflow-dag-analyzer Analyzes, validates, and optimizes Apache Airflow DAGs for reliability, performance, and best practices adherence.
الانتقال إلى التثبيت سوق المهارات اكتشف واستكشف مهارات الذكاء الاصطناعي التي بناها المجتمع.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
نسخ Promptعرض تفاصيل Prompt يتجاوز الأمر المباشر Prompt المخصّص للمراجعة. افحص المصدر قبل تشغيله.
npx skills add https://github.com/a5c-ai/babysitter --skill airflow-dag-analyzerيبقى الأمر في سطر واحد. مرّر أفقيًا لمراجعته كاملًا قبل النسخ.
تفضّل نسخة محلية؟ نزّل الملفات المتاحة حاليًا لدى SkillsMP.
تحميل Zip جاري التحميل... المهن ذات الصلة SOC
استنادا إلى تصنيف SOC المهني
Reference for querying the Atlas knowledge graph through its MCP tools — the SECONDARY enrichment/comparison layer that adds best-practice context to systems you have ALREADY scanned from your real sources (`az`, repos, dirs). Use when you need to look up nodes, edges, kinds, clusters, stats, or wiki pages in Atlas to compare against your real inventory. (atlas graph, query atlas, atlas mcp, search the graph, graph neighbors, atlas record, atlas kinds, enrichment layer)
Atlas turns your STATED NEED into a real systems atlas by SCANNING your actual sources (Azure via `az`, git repos, local dirs) and process/data mining them, THEN enriching against the Atlas knowledge graph. Use this skill when asked to inventory/map your real systems, scan your cloud + repos + directories, mine the real processes or data they contain, or collect their real constraints/gotchas. (atlas, scan my systems, inventory our azure account, map my repos, real systems atlas, process mining, data mining, collect nuances, system discovery)
assimilate-popular-workflows This skill should be used when the user asks to "find skills in the wild", "assimilate popular workflows", "discover SKILL.md files in repos", "research external skills", "find workflow patterns", "survey the skill landscape", "what skills exist out there", or wants to investigate public repositories for extractable processes, babysitter plugins, and reusable procedural insights. Searches GitHub for SKILL.md files, classifies repos by archetype, and maintains structured research under docs/reference-repos/.
name airflow-dag-analyzer description Analyzes, validates, and optimizes Apache Airflow DAGs for reliability, performance, and best practices adherence. version 1.0.0 category Orchestration skill-id SK-DEA-002 allowed-tools Read, Grep, Glob, Bash, WebFetch graph {"domains":["domain:data-engineering"],"specializations":["specialization:data-engineering-analytics"],"skillAreas":["skill-area:etl-pipelines","skill-area:data-pipeline-testing"],"roles":["role:data-engineer","role:analytics-engineer"],"workflows":["workflow:data-pipeline-deployment","workflow:data-quality-monitoring"]}
Airflow DAG Analyzer
Analyzes, validates, and optimizes Apache Airflow DAGs for reliability and performance.
Overview
This skill examines Apache Airflow DAG definitions to identify performance bottlenecks, reliability issues, and best practice violations. It provides recommendations for task dependency optimization, parallelism configuration, error handling, and resource management.
Capabilities
DAG structure analysis and validation - Parse and validate DAG structure
Task dependency optimization - Identify bottlenecks and suggest parallel execution
Parallelism and concurrency recommendations - Optimize pool and slot allocation
SLA and timeout configuration - Recommend appropriate timeouts and SLAs
Retry and failure handling patterns - Validate retry logic and alerting
Sensor optimization - Smart sensors, deferrable operators, reschedule mode
Resource pool allocation - Optimize pool usage and worker distribution
DAG scheduling optimization - Catchup, backfill, and schedule interval tuning
Cross-DAG dependency detection - Identify external dependencies and triggers
Input Schema {
"dagCode" : {
"type" : "string" ,
"description" : "The Python DAG definition code" ,
"required" : true
} ,
"dagId" : {
"type" : "string" ,
"description" : "The DAG identifier"
} ,
"executionHistory" : {
"type" : "object" ,
"description" : "Historical execution metrics" ,
"properties" : {
"runs" : {
"type" : "array" ,
"items" : {
"dagRunId" : "string" ,
"executionDate" : "string" ,
"duration" : "number" ,
"state" : "string" ,
"taskDurations" : "object"
}
}
}
} ,
"clusterConfig" : {
"type" : "object" ,
"properties" : {
"workerCount" : "number" ,
"executorType" : "string" ,
"poolConfigs" : "object" ,
"airflowVersion" : "string"
}
} ,
"analysisScope" : {
"type" : "array" ,
"items" : {
"type" : "string" ,
"enum" : [ "structure" , "performance" , "reliability" , "resources" , "security" ]
} ,
"default" : [ "structure" , "performance" , "reliability" ]
}
}
Output Schema {
"validationResults" : {
"errors" : {
"type" : "array" ,
"items" : {
"code" : "string" ,
"message" : "string" ,
"line" : "number" ,
"severity" : "error"
}
} ,
"warnings" : {
"type" : "array" ,
"items" : {
"code" : "string" ,
"message" : "string" ,
"line" : "number" ,
"severity" : "warning"
}
}
} ,
"optimizations" : {
"type" : "array" ,
"items" : {
"category" : "string" ,
"current" : "string" ,
"recommended" : "string" ,
"impact" : "high|medium|low" ,
"effort" : "string" ,
"codeChange" : "string"
}
} ,
"recommendedConfig" : {
"type" : "object" ,
"properties" : {
"poolSize" : "number" ,
"maxActiveRuns" : "number" ,
"concurrency" : "number" ,
"defaultRetries" : "number" ,
"executionTimeout" : "string"
}
} ,
"dependencyGraph" : {
"type" : "object" ,
"properties" : {
"nodes" : "array" ,
"edges" : "array" ,
"criticalPath" : "array" ,
"parallelGroups" : "array"
}
} ,
"metrics" : {
"taskCount" : "number" ,
"maxDepth" : "number" ,
"parallelizationRatio" : "number" ,
"estimatedDuration" : "string"
} ,
"securityFindings" : {
"type" : "array" ,
"items" : {
"severity" : "high|medium|low" ,
"finding" : "string" ,
"recommendation" : "string"
}
}
}
Usage Examples
Basic DAG Analysis {
"dagCode" : "from airflow import DAG\nfrom airflow.operators.python import PythonOperator\n..." ,
"dagId" : "daily_etl_pipeline"
}
With Execution History {
"dagCode" : "..." ,
"dagId" : "daily_etl_pipeline" ,
"executionHistory" : {
"runs" : [
{
"dagRunId" : "manual__2024-01-15" ,
"duration" : 3600 ,
"state" : "success" ,
"taskDurations" : {
"extract" : 600 ,
"transform" : 1800 ,
"load" : 1200
}
}
]
}
}
Full Analysis with Cluster Config {
"dagCode" : "..." ,
"dagId" : "complex_ml_pipeline" ,
"clusterConfig" : {
"workerCount" : 8 ,
"executorType" : "KubernetesExecutor" ,
"poolConfigs" : {
"default_pool" : { "slots" : 128 } ,
"ml_pool" : { "slots" : 32 }
} ,
"airflowVersion" : "2.8.0"
} ,
"analysisScope" : [ "structure" , "performance" , "reliability" , "resources" , "security" ]
}
Validation Rules
DAG Definition Rules Rule Severity Description DAG-001 Error Missing DAG default_args DAG-002 Error Invalid schedule_interval DAG-003 Warning Catchup enabled for long-running DAG DAG-004 Warning No email on failure configured DAG-005 Info Consider using @dag decorator
Task Definition Rules Rule Severity Description TSK-001 Error Task has no upstream or downstream TSK-002 Warning Task missing retries configuration TSK-003 Warning Execution timeout not set TSK-004 Warning PythonOperator with no pool TSK-005 Info Consider TaskGroup for related tasks
Sensor Rules Rule Severity Description SEN-001 Warning Sensor in poke mode (use reschedule) SEN-002 Warning Sensor missing timeout SEN-003 Info Consider deferrable operator SEN-004 Warning External sensor without soft_fail
Security Rules Rule Severity Description SEC-001 Error Hardcoded credentials SEC-002 Warning Using Variable.get without default SEC-003 Warning Connection ID not parameterized SEC-004 Info Consider Secrets Backend
Optimization Patterns
Parallelization
task1 >> task2 >> task3 >> task4
task1 >> [task2, task3] >> task4
Sensor Optimization
FileSensor(
task_id='wait_for_file' ,
filepath='/data/input.csv' ,
mode='poke'
)
FileSensor(
task_id='wait_for_file' ,
filepath='/data/input.csv' ,
mode='reschedule' ,
poke_interval=300
)
from airflow.sensors.filesystem import FileSensor
FileSensor(
task_id='wait_for_file' ,
filepath='/data/input.csv' ,
deferrable=True
)
TaskGroups
extract_orders >> transform_orders >> load_orders
extract_products >> transform_products >> load_products
with TaskGroup('orders' ) as orders_group:
extract >> transform >> load
with TaskGroup('products' ) as products_group:
extract >> transform >> load
Dynamic Task Mapping (Airflow 2.3+)
for i in range (10 ):
PythonOperator(task_id=f'process_{i} ' , ...)
@task
def process_item (item ):
return item * 2
process_item.expand(item=[1 , 2 , 3 , 4 , 5 ])
Configuration Recommendations
Default Args Template default_args = {
'owner' : 'data-team' ,
'depends_on_past' : False ,
'email' : ['alerts@company.com' ],
'email_on_failure' : True ,
'email_on_retry' : False ,
'retries' : 3 ,
'retry_delay' : timedelta(minutes=5 ),
'retry_exponential_backoff' : True ,
'max_retry_delay' : timedelta(minutes=30 ),
'execution_timeout' : timedelta(hours=2 ),
'sla' : timedelta(hours=1 ),
}
Pool Configuration Workload Type Recommended Pool Size Heavy compute 2-4 per worker I/O bound 8-16 per worker API calls Rate limit based Sensors Separate pool, high slots
Integration Points
MCP Server Integration
yangkyeongmo/mcp-server-apache-airflow - Airflow REST API integration
Dagster MCP - Alternative orchestration patterns
Prefect MCP - Modern orchestration comparison
Related Skills
dbt Project Analyzer (SK-DEA-003) - dbt operator optimization
Data Lineage Mapper (SK-DEA-010) - Task lineage extraction
Applicable Processes
ETL/ELT Pipeline (etl-elt-pipeline.js)
A/B Testing Pipeline (ab-testing-pipeline.js)
Pipeline Migration (pipeline-migration.js)
Data Quality Framework (data-quality-framework.js)
References
Version History
1.0.0 - Initial release with Airflow 2.x support