dag-factory

dag-factory is a skill for Claude Code from astronomer/agents. It costs 80 tokens per session (4,533 once invoked), scanned A, original, Apache-2.0.

A guide for defining Apache Airflow workflows in YAML using dag-factory. YAML is a configuration format that describes settings and tasks without writing every workflow in Python.

In plain words
What is it for?
Create and edit YAML workflow definitions, templates, defaults, dynamic tasks, datasets, callbacks, and validation for dag-factory 1.0 or newer.
Why use it?
It reduces repeated Python code when workflows follow a common structure, while keeping their definitions in readable configuration files.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the astronomer-data plugin — 35 skills, 3 commands shipped together

Good fit Create and edit YAML workflow definitions, templates, defaults, dynamic tasks, datasets, callbacks, and validation for dag-factory 1.0 or newer.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/astronomer/agents/dag-factory
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add astronomer/agents --skill dag-factory
Clone the repo
git clone --depth 1 https://github.com/astronomer/agents

Made for: Claude Code.

Or install astronomer-data, the plugin that ships this one along with the rest of its 35 skills, 3 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dag-factory

README.md
[![agentmods](https://agentmods.dev/badge/skills/astronomer/agents/dag-factory.svg)](https://agentmods.dev/skills/astronomer/agents/dag-factory)
Your own site
<a href="https://agentmods.dev/skills/astronomer/agents/dag-factory"><img src="https://agentmods.dev/badge/skills/astronomer/agents/dag-factory.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,533 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00080 $0.04533
Opus 5 $0.00040 $0.02266
Sonnet 5 $0.00016 $0.00907
Haiku 4.5 $0.00008 $0.00453

Measured 8d ago against content hash 201378268d0a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

dag-factory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/dag-factory/SKILL.md · 498 lines

How it starts

The opening of the file, as written. The whole thing — 498 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DAG Factory

You are helping a user build Apache Airflow DAGs declaratively with dag-factory, a library that turns YAML configuration files into Airflow DAGs. Execute steps in order and prefer the simplest configuration that meets the user's needs.

Package: dag-factory on PyPI Repo: https://github.com/astronomer/dag-factory Docs: https://astronomer.github.io/dag-factory/latest/ Targets: dag-factory v1.0+ only. For pre-1.0 projects, see reference/migration.md before applying any guidance from this skill. Requires: Python 3.10+, Airflow 2.4+ (Airflow 3 supported)

Before Starting

Confirm with the user:

  1. Airflow version ≥2.4
  2. Python version ≥3.10
  3. dag-factory version: this skill targets v1.0+. If the project is on <1.0, follow reference/migration.md to upgrade before continuing.
  4. Use case: dag-factory is for declarative, low-code DAG authoring. If the user needs reusable, validated Pythonic templates with Pydantic, suggest blueprint instead. If they need full Python flexibility, suggest the authoring-dags skill.

Determine What the User Needs

User Request Action
"Create a YAML DAG" / "Convert this Python DAG to YAML" Go to Defining a DAG in YAML
"Set up dag-factory in my project" Go to Project Setup
"Share defaults across DAGs" / "Set start_date once" Go to Defaults
"Use a custom operator" / "Use KPO / Slack / Snowflake" Go to Custom & Provider Operators
"Dynamic / mapped tasks" / "expand / partial" Go to Dynamic Task Mapping
"Schedule on dataset" / "Outlets and inlets" Go to Datasets
"Add a callback" / "Slack on failure" Go to Callbacks
"Use a timetable" / "datetime in YAML" / "timedelta in YAML" Go to Custom Python Objects (__type__)
"Lint my YAML" / "Validate" Go to Validation Commands
"Convert Airflow 2 YAML to Airflow 3" Go to Validation Commands (dagfactory convert)
"Migrate from dag-factory <1.0" See reference/migration.md
dag-factory errors / troubleshooting Go to Troubleshooting

Read the full file on GitHub · 498 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 498 lines · 80 tokens per session scan A 201378268d0a

Subscribe to this mod's changes

dag-factory is a skill published in the GitHub repository astronomer/agents (439 stars, last pushed 3d ago), licensed Apache-2.0. It adds 80 tokens to every session and 4,533 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

workers-best-practices

Cloudflare Workers best practices for production applications. Use when writing, reviewing, or configuring Workers.

cloudflare/skills · 25 tokens

notion_synthesize

Synthesize durable ktx wiki pages and semantic-layer sources from staged Notion pages, databases, data-source rows, and clustered Notion evidence. Load when a WorkUnit contains Notion raw files or Notion evidence chunks.

Kaelio/ktx · 50 tokens

historic_sql_table_digest

Convert one changed historic-SQL table usage bucket into typed table usage evidence for deterministic schema projection.

Kaelio/ktx · 25 tokens

find-journalists

Build, refine, dedupe, and enrich small fit-checked journalist lists for newsjack campaigns. Uses the newsjack CLI (preferred) or the medialyst MCP for news search and journalist enrichment, and falls back to a best-effort local mode with no verified contacts; the agent owns how returned data is organized.

elvisun/newsjack · 69 tokens

story-origin-check

Recover the first public timestamp and canonical major coverage for a newsjacking signal, then decide whether newer coverage is the same story, a different story, or a materially new development.

elvisun/newsjack · 40 tokens

relevance-coarse-filter

Cheap, high-recall first-pass filter that removes obvious junk from a detector candidate pool before expensive story-origin research and PR judgment. Decides keep, monitoronly, or reject — never ranks, writes angles, verifies dates, or decides whether to pitch.

elvisun/newsjack · 57 tokens