building-dagster-jobs

building-dagster-jobs is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 220 tokens per session (1,587 once invoked), scanned A, original, MIT.

A guide for designing and reviewing Dagster jobs, assets, schedules, sensors, retries, and failure handling. Dagster is a tool for running scheduled or event-triggered data-processing work.

In plain words
What is it for?
Use it when adding or changing Dagster jobs, schedules, sensors, batching, sharding, retries, or failure hooks in a codebase.
Why use it?
It helps avoid expensive or unreliable pipelines by considering run volume, fan-out, recovery, and the correct trigger before changing a job.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when adding or changing Dagster jobs, schedules, sensors, batching, sharding, retries, or failure hooks in a codebase.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/building-dagster-jobs
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 PostHog/posthog-foss --skill building-dagster-jobs
Clone the repo
git clone --depth 1 https://github.com/PostHog/posthog-foss

Made for: Claude Code, Codex.

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 building-dagster-jobs

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/posthog-foss/building-dagster-jobs/github.svg)](https://agentmods.dev/skills/posthog/posthog-foss/building-dagster-jobs)
Your own site
<a href="https://agentmods.dev/skills/posthog/posthog-foss/building-dagster-jobs"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/building-dagster-jobs/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 building-dagster-jobs

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/building-dagster-jobs"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/building-dagster-jobs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 220 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,587 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.00220 $0.01587
Opus 5.5 $0.00088 $0.00635
Sonnet 5.5 $0.00044 $0.00317
Haiku 4.5 $0.00022 $0.00159

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

Security

Grade A, and why

building-dagster-jobs 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 3d 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.

.agents/skills/building-dagster-jobs/SKILL.md · 78 lines

How it starts

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

Building Dagster jobs

Setup, code locations, owners, Slack alerts, and local development live in posthog/dags/README.md. This skill is the design and review pass on top of it: how to shape a job so it is correct, recoverable, and cheap.

The one number to estimate first

Dagster+ bills every op execution and every asset materialization, including retries and the ops of a run that does nothing. Before you write or approve a job, write down:

op executions per month = runs per day × ops per run × 30

Ops per run is where cost hides. A DynamicOut fan-out of one op per N rows scales with the fleet, and a sensor that launches one run per item scales with traffic. Size both against today's production volume, not the test fixture. references/cost-model.md has the patterns that blew up and how to measure a job's real cost.

Design checklist

Work through these in order. Each one names the shared helper that already solves it.

  1. Trigger. A schedule for time-based work, a sensor for event-driven work, an asset for data that other assets depend on. A schedule or sensor that has nothing to do returns dagster.SkipReason. A skipped tick launches no run and costs nothing, so check for work there instead of in the first op.
  2. Overlap. Decorate a schedule with @skip_if_already_running, or call check_for_concurrent_runs, unless overlapping runs are safe and cheap. Add @skip_on_kill_switch to schedules that query ClickHouse.
  3. Fan-out. Split work into a fixed number of batches with bounded_batches(items, max_batches=..., min_batch_size=...), not into one op per N rows. Start max_batches near the executor's max_concurrent: more batches add no parallelism, only ops. When items vary in cost, measure batch durations and allow a few batches per worker, so the slowest batch does not set the run time. Keep query sizes bounded by chunking inside the service function (itertools.batched), not by adding ops.
  4. CPU parallelism. When shards exist only so CPU-bound Python gets its own process, run them with run_in_processes(fn, shards) inside one op instead of mapping one op per shard. Shard code takes a LogContext, so a child process can pass ProcessLogContext(log=...).
  5. One run per item. A sensor that launches a run per request or per team turns traffic into cost. Claim a batch of items in one run, and keep each item's state transition and locking per item.
  6. Sequential ops. Ops that only hand data to the next op can be one op. Keep separate ops where a boundary buys something: a different retry policy, a re-executable step, or output another job reuses.
  7. Cadence. Run as often as the consumer needs, not hourly by default. Check the TTL of whatever the job writes: a cache that lives for days does not need an hourly refresh.
  8. Thin ops. Ops read config, call a function, and report metadata. Business logic goes in a plain function the op calls, so a test can call it directly.
  9. Owner and limits. Tag the job with JobOwners, add dagster/max_runtime for anything that can hang, and request pod resources (dagster-k8s/config) for heavy runs.
  10. Query tagging. Call get_query_tags().with_dagster(dagster_tags(context)) at the start of ops that query ClickHouse, or pass settings_with_log_comment(context).

Read the full file on GitHub · 78 lines

Files

What ships with it

3 files 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. 3d ago First seen · 78 lines · 220 tokens per session scan A d37480ec9fa4

Subscribe to this mod's changes

building-dagster-jobs is a skill published in the GitHub repository PostHog/posthog-foss (736 stars, last pushed today), licensed MIT. It adds 220 tokens to every session and 1,587 once invoked, about $0.0009 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-12-01.

Related

building-dagster-jobs compared with skills from other repositories

building-dagster-jobs next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
building-dagster-jobsPostHog/posthog-fossSkill736todayMITA220Claude Code, Codex
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill82ktodayMITA200Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill102ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill396ktodayMITA36Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15ktodayCC0-1.0A113Claude Code, Codex
systematic-debuggingobra/superpowersSkill332k6d agoMITA21Claude Code