airflow-state-store

airflow-state-store is a skill for Claude Code from astronomer/agents. It costs 243 tokens per session (5,807 once invoked), scanned A, original, Apache-2.0.

A guide for saving small pieces of task and asset state in Airflow 3.3 and later, such as progress positions, timestamps, or external job IDs. It also covers resuming external jobs after worker crashes.

In plain words
What is it for?
Use it to add retry checkpoints, preserve task state, store asset watermarks, and make operators that submit external jobs resumable.
Why use it?
It helps retries continue from saved progress instead of starting over, and distinguishes a job being submitted from that job actually finishing successfully.

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 Use it to add retry checkpoints, preserve task state, store asset watermarks, and make operators that submit external jobs resumable.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/astronomer/agents/airflow-state-store
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 airflow-state-store
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 airflow-state-store

README.md
[![agentmods](https://agentmods.dev/badge/skills/astronomer/agents/airflow-state-store/github.svg)](https://agentmods.dev/skills/astronomer/agents/airflow-state-store)
Your own site
<a href="https://agentmods.dev/skills/astronomer/agents/airflow-state-store"><img src="https://agentmods.dev/badge/skills/astronomer/agents/airflow-state-store/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for airflow-state-store

Your own site · 80×15
<a href="https://agentmods.dev/skills/astronomer/agents/airflow-state-store"><img src="https://agentmods.dev/badge/skills/astronomer/agents/airflow-state-store.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 243 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,807 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Memory Poisoning · line 112
    Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
    Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
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.00243 $0.05807
Opus 5.5 $0.00097 $0.02323
Sonnet 5.5 $0.00049 $0.01161
Haiku 4.5 $0.00024 $0.00581

Measured 1mo ago against content hash c67c60b4096e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

airflow-state-store 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 1mo 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/airflow-state-store/SKILL.md · 403 lines

How it starts

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

Airflow Task State Store (AIP-103)

Airflow 3.3 ships two key/value stores and a crash-safety mixin for operators that submit external jobs.

task_state_store, asset_state_store, and ResumableJobMixin's crash-safety guarantee require Airflow 3.3+. Check first:

af config version

Below 3.3: task_state_store/asset_state_store are unavailable, and durable=True is a no-op — provider operators ship a pre-3.3 ResumableJobMixin shim that always submits fresh (see Section 5). Tell the user those specific features aren't available yet and link the AIP-103 tracking issue. This does not gate Section 6's Triggerer-vs-mode="reschedule" decision, or the general "green submit ≠ success" anti-pattern — those apply on any Airflow version. On a pre-3.3 DAG, give that guidance in full; only drop the "durable=True adds crash-safety" half of it.


Section 1 — Pick the right primitive

I need to… Use
Persist a cursor, offset, or job ID so a retry can resume instead of restart task_state_store
Pass small coordination state within one task across retries (not between tasks) task_state_store
Store a watermark or last-processed timestamp per asset, surviving across DAG runs asset_state_store
Cache asset-level metadata (manifest hash, row count, schema version) asset_state_store
Make an existing non deferrable operator crash-safe when it submits to an external system task_state_store or ResumableJobMixin

When NOT to use these:

  • Passing data between tasks -> use XCom
  • Large payloads (model weights, dataframes) -> use XCom with an object storage backend
  • Config or secrets shared across DAGs -> use Variables or Connections

Section 2 — Detect anti-patterns in existing DAGs (on demand)

When the user asks to review a DAG or asks "is there a better way", scan for these patterns and flag them:

Pattern seen in DAG Problem Recommend
Variable.get(...) / Variable.set(...) inside a @task body for per-run state Variables are global and shared; no scoping to task instance or retry task_state_store
context["ti"].xcom_push(key="job_id", ...) to survive retries XCom is scoped to a DAG run, not a retry; a new ti_id is issued per retry task_state_store or ResumableJobMixin
Manual if Variable.get("job_id"): reconnect else: submit retry-resume logic Reimplements what ResumableJobMixin already provides, without the crash-safety guarantee ResumableJobMixin
Variable.set("last_processed_at", ...) for watermarks Global; any DAG or task can overwrite it; no scoping to asset asset_state_store
Separate submit task (wait_for_termination=False / fire-and-forget) + a second sensor/polling task waiting on the same external job (Databricks, Snowflake, BigQuery, Redshift, Spark, etc.) A green submit task only means the job was accepted, not that it succeeded — only the sensor task's outcome reflects reality. See Section 6, "Submit-and-poll DAGs: one task or two?" — the right call depends on Triggerer availability and job duration, not a single fixed answer.

Read the full file on GitHub · 403 lines

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. 1mo ago Changed · -72 tokens per session c67c60b4096e
  2. 1mo ago First seen · 403 lines · 315 tokens per session scan A 76bb10338a53

Subscribe to this mod's changes

airflow-state-store is a skill published in the GitHub repository astronomer/agents (454 stars, last pushed 7d ago), licensed Apache-2.0. It adds 243 tokens to every session and 5,807 once invoked, about $0.0010 per session on Opus 5.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.