data-pipeline
Skill9 starsChanged 42 days agoMITView on GitHub
Wire ETL, ingestion, cron, and queue jobs with idempotency, atomic writes, data contracts, and dead-letters. Use for "build a pipeline", "sync X into Y", "cron double-counts", "dedupe", "backfill", or "the numbers are wrong after a retry".
10 other projects use a version of this.
Adopted by
Most recently taken up by
- nisarth/claude-skills-storetheir own version, first seen Nov 8, 2026
- PuckAPI/claude-sports-analyticstheir own version, first seen Oct 14, 2026
- MEKXH/golemtheir own version, first seen Oct 8, 2026
- kensaurus/skillsword for word, first seen Oct 1, 2026
- khuynh22/agent-dev-teamtheir own version, first seen Aug 31, 2026
- changocr/agents-labtheir own version, first seen Jul 31, 2026
Other versions10 projects use a version of this.
Word for word · 1
- kensaurus/skills★ 9100% same
Edited · 0
None found.
Wrote their own version · 9
- claude-office-skills/skills★ 433same name
- MEKXH/golem★ 203same name
- khuynh22/agent-dev-team★ 9same name
- PuckAPI/claude-sports-analytics★ 3same name
- leezhuuuuu/skills★ 1same name
- nisarth/claude-skills-store★ 1same name
- samarth777/modal-skills★ 1same name
- changocr/agents-lab★ 0same name
- erdcpatel/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository165 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/approved-plan-execution.mdcCursor rule
- .cursor/rules/skill-workflows.mdcCursor rule
- .cursor/rules/verification-before-completion.mdcCursor rule
- llms.txtllms.txt
- audit-accessibilitySkill
- audit-agent-speedSkill
- audit-analyticsSkill
- audit-auth-flowsSkill
- audit-backend-architectureSkill
- audit-bundle-sizeSkill
- audit-cicdSkill
- audit-codemod-safetySkill
- audit-code-qualitySkill
- audit-code-reviewSkill
- audit-db-schemaSkill
- audit-doctrineSkill
- audit-env-paritySkill
- audit-fe-apiSkill
- audit-gate-logicSkill
- audit-i18nSkill
- audit-infra-costSkill
- audit-langfuse-llmSkill
- audit-llm-securitySkill
- audit-monetization-iapSkill
- audit-payment-systemSkill
- audit-performanceSkill
- audit-realworldSkill
- audit-registry-listingSkill
- audit-resilienceSkill
- audit-responsiveSkill
- audit-securitySkill
- audit-skill-conflictsSkill
- audit-ui-statesSkill
- audit-uiux-design-systemSkill
- audit-ux-journeysSkill
- audit-uxSkill
- backend-db-performanceSkill
- backend-error-handlingSkill
- backend-observabilitySkill
- backend-patternsSkill
- backend-realtimeSkill
- burndown-fullSkill
- complete-everythingSkill
- data-visualizationSkill
- debug-errorSkill
- debug-fe-be-integrationSkill
- debug-sentry-monitorSkill
- deploy-npmSkill
- deploy-verifySkill
- design-apiSkill
- design-canvasSkill
- design-emailSkill
- design-frontendSkill
- design-generative-artSkill
- design-mobile-firstSkill
- design-motionSkill
- design-prdSkill
- design-systemSkill
- design-themeSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 45
Use INSERT ... ON CONFLICT (natural_key) DO UPDATE (upsert), not blind INSERT.
- Distinctive: line 75
Use a watermark (last-processed timestamp/id, persisted) for incremental runs.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Data Pipeline Correctness
Degree of freedom: MIXED. Layering and window design [HIGH freedom];
idempotency, atomic writes, overlap lock, and the DoD [LOW freedom — run exactly].
How to reason
- Observe — job, retry path, write targets, schedule
- Interpret — at-least-once vs atomic vs contract vs overlap
- Classify — upsert / window-recompute / quarantine / lock / watermark
- Severity — retry double-count outranks a missing metric
Worked example
Observe: nightly
refresh_order_statsdoescount = count + 1; cron overlapped twice; dashboard totals jumped. Interpret: at-least-once delivery + non-idempotent delta. Classify: recompute-and-replace the day window;pg_try_advisory_lock; persist a watermark. Verify: re-run the same window → identical rows; overlap skipped;pipeline_runsrecorded.
Self-critique before reporting
- Idempotent — same-window re-run proven identical, not assumed
- Atomic — mid-fail leaves no half-written batch
- Locked — the scheduled job has an overlap guard
- Right owner — schema/constraints →
audit-db-schema; post-hoc corruption hunt →plan-data-integrity
Pipelines fail silently: a retry double-counts, a partial write corrupts a table, a schema drift poisons a dashboard, and nobody notices until the numbers are wrong. This skill bakes correctness in at build time. It complements post-hoc data-integrity audit skills (which detect these after the fact) and the Supabase plugin (DB/Edge Functions/RLS).
When this fires
Any job that moves, transforms, or aggregates data: ingestion/ETL/ELT, scheduled aggregations, edge-function workers, pg_cron jobs, queue consumers, webhook processors, backfills, materialized-view refreshes.
Non-negotiables (the 5 that prevent silent corruption) [LOW freedom — run exactly]
- Idempotency — running the same job twice must not change the result. Retries, at-least-once queues, and overlapping cron fires are guaranteed, not hypothetical.
- Use
INSERT ... ON CONFLICT (natural_key) DO UPDATE(upsert), not blindINSERT. - Derive a deterministic dedup key from the source event, not
now()or a random id. - For aggregates: recompute-and-replace a window, or use idempotent deltas — never
count = count + 1on a path that can retry.
- Atomicity — a job either fully applies or not at all. No half-written batches.
- Wrap multi-row writes in a transaction; stage to a temp/raw table then swap.
- A function that writes to 3 tables must not leave 1 of them updated on failure.
- Data contracts — validate shape at the boundary before trusting input.
- Parse/validate (zod / pydantic / JSON schema) at ingestion; reject or quarantine bad rows, don't
any-cast them downstream. - Pin expected columns/types; fail loudly on schema drift instead of silently coercing.
- Explicit delivery semantics — know and document whether each stage is at-least-once, at-most-once, or exactly-once, and make the consumer match. Most queues/cron are at-least-once → consumers MUST be idempotent (see #1).
- Observability — a pipeline you can't see is a pipeline that's already broken.
- Emit per-run: rows in / out / rejected, duration, watermark, status. Persist it (a
pipeline_runstable or logs), don't justconsole.log. - Alert on: zero rows when rows expected, reject-rate spike, run overran, run skipped.
Staging architecture (default to 4 layers) [HIGH freedom]
Raw → land source data unchanged, append-only, with ingested_at + source id
Staged → cleaned, typed, validated, deduped (1 row per natural key)
Curated → business entities, joined/enriched, the query surface
Aggregated→ rollups / metrics / materialized views for dashboardsEach layer is rebuildable from the one before it. Never transform-in-place on raw; never let dashboards read raw.
Backfills [HIGH freedom]
- Make jobs parameterized by window (
--from,--to/ date partition), not "everything since forever". The same code runs the nightly slice and the historical backfill. - Backfills must be idempotent and chunked (partition by day/range) so a failure resumes, not restarts.
- Use a watermark (last-processed timestamp/id, persisted) for incremental runs; never re-scan the whole source each run.
Failure handling [HIGH freedom]
- Dead-letter bad/failed records to a quarantine table or DLQ with the error + payload; keep the main run moving. Silent
try/catch {}that swallows errors is banned. - Retries: bounded, with backoff; only retry transient errors (network/timeout), never validation failures (they'll just fail again).
- Make partial progress resumable via the watermark, not a full redo.
Anti-patterns (reject on sight) [HIGH freedom]
- Monolithic DAG / mega-function doing fetch+transform+load+notify in one untestable blob → split into testable stages.
count = count + 1/balance = balance + xon a retryable path → not idempotent.SELECT *into a typed model without a contract → schema drift time bomb.- N+1 writes in a loop instead of a batched upsert → slow + non-atomic.
- Cron with no overlap guard (job B starts before job A finishes) → double processing. Add a lock /
pg_try_advisory_lock/ "skip if running". - Reading dashboards straight off raw ingestion tables.
Supabase / edge-function specifics [LOW freedom — run exactly]
pg_cronis at-least-once and can overlap under load → make the SQL/function idempotent and guard with an advisory lock.- Edge-function workers triggered by table inserts: dedupe on the row's natural key; the trigger can fire more than once.
- Heavy aggregation belongs in SQL / materialized views (refresh on a schedule), not in a function looping row-by-row.
- Deploy + verify the function, cron, and any new table/policy on the remote in the same turn — see
full-stack-ship-discipline.
Definition of done [LOW freedom — do not skip]
- Re-running the job produces the identical result (idempotency proven, not assumed).
- A mid-run failure leaves no half-applied state (atomicity).
- Bad input is rejected/quarantined with a contract, not silently coerced.
- Incremental runs use a persisted watermark; backfill is windowed + chunked.
- Per-run metrics are emitted and an alert exists for zero-rows / reject-spike / overrun.
- No overlap hazard on scheduled jobs (lock or skip-if-running).
Composes with
audit-db-schema— the schema/constraints the pipeline writes into.supabase-postgres-best-practices— Postgres-level query/index tuning (official Supabase plugin).full-stack-ship-discipline— deploy + verify functions/cron/policies on the remote.workflow-spec-tdd— spec the contract + test idempotency/edge cases before coding.- Project-local data-integrity audit skills — post-hoc detection of the failures this prevents.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

