airflow-state-store

airflow-state-store is a skill for Claude Code from astronomer/agents. It costs 315 tokens per session (5,879 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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 315 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,879 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.
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.00315 $0.05879
Opus 5 $0.00158 $0.02939
Sonnet 5 $0.00063 $0.01176
Haiku 4.5 $0.00032 $0.00588

Measured 7d ago against content hash 76bb10338a53, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 7d 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. 7d 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 (435 stars, last pushed yesterday), licensed Apache-2.0. It adds 315 tokens to every session and 5,879 once invoked, about $0.0016 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

cloudflare

Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), feature flags (Flagship), networking (Tunnel, Spectrum), security (WAF, DDoS), and infrastructure-as-code (Terraform, Pulumi). Use for any Cloudflare development task. Biases towards retrieval…

cloudflare/skills · 87 tokens

sandbox-stable

Use when building or changing Cloudflare Sandbox apps on the current stable @cloudflare/sandbox package (default npm tag)—commands, sessions, files, ports, tunnels, terminals, bridge, production, or deprecated-API cleanup while staying on stable. Not for @cloudflare/sandbox@next (use sandbox-next) or for porting to…

cloudflare/skills · 85 tokens

sandbox-next

Use when building or changing Cloudflare Sandbox apps on @cloudflare/sandbox@next (Sandbox SDK 1.0 preview)—code execution, AI runners, interpreters, CI-like jobs, terminals, files, mounts, tunnels, preview URLs, lifecycle, or errors. Not for the default stable package (use sandbox-stable) or for porting stable to…

cloudflare/skills · 86 tokens

workers-best-practices

Reviews and authors Cloudflare Workers code against production best practices. Load when writing new Workers, reviewing Worker code, configuring wrangler.jsonc, or checking for common Workers anti-patterns (streaming, floating promises, global state, secrets, bindings, observability). Biases towards retrieval from…

cloudflare/skills · 72 tokens

durable-objects

Create and review Cloudflare Durable Objects. Use when building stateful coordination (chat rooms, multiplayer games, booking systems), implementing RPC methods, SQLite storage, alarms, WebSockets, or reviewing DO code for best practices. Covers Workers integration, wrangler config, and testing with Vitest. Biases…

cloudflare/skills · 76 tokens

aws-cloudformation-lambda

Provides AWS CloudFormation patterns for Lambda functions, layers, API Gateway integration, event sources, cold start optimization, monitoring, logging, template validation, and deployment workflows. Use when creating Lambda functions with CloudFormation, configuring event sources, implementing cold start…

giuseppe-trisciuoglio/developer-kit · 70 tokens