← ClaudeAtlas

dag-factorylisted

Author Airflow DAGs from dag-factory YAML. Use when creating or editing YAML DAG configs, loaders, callbacks, custom operators in YAML, dynamic mapping, datasets, or validating dag-factory files. Covers both map-style tasks (task_id as YAML key) used by in-repo plugins and the PyPI dag-factory v1 list format. Not for remote run/log inspection (vd:astro-airflow) or local astro dev lifecycle (vd:managing-astro-local-env).
vanducng/skills · ★ 7 · AI & Automation · score 81
Install: claude install-skill vanducng/skills
# dag-factory Declarative Airflow DAGs from YAML. Detect the repo's dialect **before** writing YAML. Official Astronomer skill targets PyPI `dag-factory` v1+ (list-format `tasks`). Many production repos still use a vendored plugin and **map-format** `tasks` keyed by `task_id`. Mixing the two breaks parse. ## 1. Detect dialect ```bash rg -n "load_yaml_dags|from dagfactory|from plugins.dagfactory" --glob '*.py' dags plugins | head rg -n "^ tasks:" -g '*.yaml' -g '*.yml' -A 6 | head -40 ``` | Signal | Dialect | |---|---| | `from plugins.dagfactory import load_yaml_dags` (or similar in-repo plugin) | **map** - `tasks.<task_id>.operator` | | `from dagfactory import load_yaml_dags` + `dag-factory>=1` in deps | **list** - `tasks: [{task_id, operator}]` | | `tasks:` then a nested key that is a task id, not `- task_id:` | **map** | | `tasks:` then `- task_id:` | **list** | Match neighboring YAML in the same folder. Do not "modernize" map-format files to list-format unless the user asks and the loader is PyPI v1+. Keep `from airflow import DAG` in every loader module even if it looks unused. The DAG processor requires it. ## 2. Loader Map-style in-repo plugin (typical): ```python from airflow import DAG from plugins.dagfactory import load_yaml_dags load_yaml_dags(globals_dict=globals(), dags_folder=".../configs") ``` PyPI v1: ```python from airflow import DAG from dagfactory import load_yaml_dags load_yaml_dags(globals_dict=globals(), dags_folder="/usr/local/airflow/dags"