[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CRQBEP21N9V3RDVRGF8CSP":3,"skill-same:01M7CRQBEP21N9V3RDVRGF8CSP":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M7CRQBEP21N9V3RDVRGF8CSP","data-pipeline-orchestration",null,"Use when adding or changing a scheduled data or ML pipeline — Dagster assets, Prefect flows, Airflow DAGs or a cron'd entrypoint — idempotent partitioned stages, retries, backfills, quality gates, and testing the pipeline without the scheduler","makifbaysal\u002Ftasktrooper","makifbaysal","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F25031940?v=4","01M7CRG3ZCSYZSSEVDMW3DEYC8","Mehmet Akif Baysal","01M7CRG401FJ8YAXH5ER730XYV",122,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fdata-scientist\u002Fskills\u002Fdata-pipeline-orchestration\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: data-pipeline-orchestration\ncategory: mlops\ndescription: Use when adding or changing a scheduled data or ML pipeline — Dagster assets, Prefect flows, Airflow DAGs or a cron'd entrypoint — idempotent partitioned stages, retries, backfills, quality gates, and testing the pipeline without the scheduler\ntech_stack: MLOps\nsource: wshobson\u002Fagents ml-pipeline-workflow (MIT), adapted; Dagster, Prefect and Airflow documentation cited\n---\n# Data Pipeline Orchestration\n\n## Overview\n\nA pipeline runs unattended, gets retried, gets backfilled for last March, and runs twice when someone clicks the button twice. Each stage therefore has to produce the same result for the same inputs no matter how often it runs, and fail loudly when its input is wrong.\n\n**Core principle:** business logic lives in plain, tested functions; the orchestrator layer is a thin wrapper that wires partitions, resources and retries around them.\n\n## 1. Detect the orchestrator — and keep it\n\n| You find | It is |\n|---|---|\n| `@dg.asset`, `Definitions(...)`, `dagster.yaml`, `workspace.yaml` | Dagster (asset-based) |\n| `@flow`, `@task` from `prefect`, `prefect.yaml` | Prefect |\n| `dags\u002F` folder, `@dag` \u002F `DAG(...)`, `from airflow` | Airflow (Airflow 3 imports authoring APIs from `airflow.sdk`) |\n| `dvc.yaml` stages | DVC pipeline (experiment-tracking-and-reproducibility) |\n| a cron entry or a CI schedule calling a CLI | plain entrypoint |\n\nNever add a second orchestrator (rule stack-choice). A plain CLI entrypoint called by the existing scheduler is often the right size.\n\n## 2. Thin orchestration, testable logic\n\n```python\n# src\u002Fchurn\u002Ffeatures.py — pure, tested with fixtures\ndef build_daily_features(orders: pd.DataFrame, day: date) -> pd.DataFrame: ...\n\n# src\u002Fchurn\u002Forchestration\u002Fassets.py — wiring only\nimport dagster as dg\n\ndaily = dg.DailyPartitionsDefinition(start_date=\"2025-01-01\")\n\n@dg.asset(partitions_def=daily)\ndef daily_features(context: dg.AssetExecutionContext, warehouse: WarehouseResource) -> None:\n    day = date.fromisoformat(context.partition_key)\n    features = build_daily_features(warehouse.orders_for(day), day)\n    warehouse.overwrite_partition(\"features.daily\", day, features)\n```\n\nThe asset never computes anything itself; `build_daily_features` has unit tests that know nothing about Dagster.\n\n## 3. Idempotency\n\n| ❌ | ✅ |\n|---|---|\n| `INSERT INTO features SELECT ...` on every run | delete-then-insert the partition in one transaction, `MERGE` on the key, or `INSERT OVERWRITE` the partition |\n| `df.to_parquet(\"out\u002Ffeatures.parquet\", append...)` | write `out\u002Fday=2026-10-01\u002Fpart.parquet` to a temp path, then rename |\n| `window_end = datetime.now()` | window from the partition key or the run's data interval |\n| file names with a timestamp of when it ran | paths keyed by what the data is for (partition, model version) |\n\nTest it: run the stage twice on the fixture; the output is identical and the row count does not double.\n\n## 4. Retries, failures and gates\n\n- Retries are for transient I\u002FO (network, a warehouse timeout): `@task(retries=3, retry_delay_seconds=30)` in Prefect, a `RetryPolicy` in Dagster, `retries=` in Airflow. A validation failure is not transient — retrying it three times just delays the alert.\n- Quality gates fail the run: a pandera\u002FGX check at ingestion (data-validation-contracts), Dagster `@dg.asset_check`, dbt tests after `dbt build`. Downstream stages do not run on a failed gate.\n- A training pipeline ends with an evaluation gate: the candidate is registered or promoted only if it beats the current model and the baseline on the agreed metric, per slice where it matters (model-training-and-evaluation). The gate's numbers are logged.\n- Log stage-level metrics: rows in, rows out, rows rejected, duration — so a silent drop is visible.\n\n## 5. Backfills and partitions\n\n- Partition by the natural time grain (day, hour) or by entity set; every stage takes its partition as input.\n- A backfill is the same code over a range of partitions — never a separate script.\n- Dry-run one partition first and compare its output with the existing data for that partition.\n- A production backfill or full rebuild is deploy-time work: record it in `before_deploy` \u002F `after_deploy`, with how long it takes and how to stop it (rule deploy-runbook-fields).\n\n## 6. Testing without the scheduler\n\n```python\ndef test_daily_features_overwrites_its_partition(tmp_warehouse) -> None:\n    for _ in range(2):\n        result = dg.materialize(\n            [daily_features],\n            partition_key=\"2026-10-01\",\n            resources={\"warehouse\": tmp_warehouse},\n        )\n        assert result.success\n    assert tmp_warehouse.row_count(\"features.daily\", day=date(2026, 10, 1)) == 3\n```\n\n- Dagster: `dg.materialize([...], partition_key=..., resources=...)` with a local resource (DuckDB file in `tmp_path`, an in-memory fake).\n- Prefect: call the flow function directly inside `prefect_test_harness()`.\n- Airflow: a DagBag import test (no import errors, no cycles) plus `dag.test()` for one run; keep task bodies as calls into your package.\n- Every pipeline test uses fixtures and local resources — never production credentials or buckets.\n\n## 7. Secrets and configuration\n\nCredentials come from the orchestrator's resources, connections or environment — never in code, never in DAG parameters. A new variable the deployed pipeline reads is declared with declare_env_vars. In Airflow, never render user-supplied parameters into Jinja-templated SQL or shell commands; pass them as bound parameters.\n\n## 8. Rollout\n\nA changed pipeline runs side by side (shadow output to a separate table or path) before it replaces the old output, when the task's risk warrants it; the cut-over and the rollback (point consumers back, re-run the old version for affected partitions) go in `after_deploy` and `rollback_plan`.\n\n## Common Mistakes\n\n- Transformation logic written inline in a DAG file, testable only by running Airflow.\n- Appending output, so every retry duplicates rows.\n- `now()` inside a stage, so a backfill computes today's window for last year's partition.\n- Retrying data-quality failures.\n- A schedule change that silently overlaps two runs writing the same partition.\n\n## Red Flags\n\n- Row counts that double after a re-run.\n- A stage with no rows-in\u002Frows-out logging.\n- A backfill script that is not the production code path.\n- A credential in a DAG file, a flow parameter or a notebook cell.\n","# Data Pipeline Orchestration\n\n## Overview\n\nA pipeline runs unattended, gets retried, gets backfilled for last March, and runs twice when someone clicks the button twice. Each stage therefore has to produce the same result for the same inputs no matter how often it runs, and fail loudly when its input is wrong.\n\n**Core principle:** business logic lives in plain, tested functions; the orchestrator layer is a thin wrapper that wires partitions, resources and retries around them.\n\n## 1. Detect the orchestrator — and keep it\n\n| You find | It is |\n|---|---|\n| `@dg.asset`, `Definitions(...)`, `dagster.yaml`, `workspace.yaml` | Dagster (asset-based) |\n| `@flow`, `@task` from `prefect`, `prefect.yaml` | Prefect |\n| `dags\u002F` folder, `@dag` \u002F `DAG(...)`, `from airflow` | Airflow (Airflow 3 imports authoring APIs from `airflow.sdk`) |\n| `dvc.yaml` stages | DVC pipeline (experiment-tracking-and-reproducibility) |\n| a cron entry or a CI schedule calling a CLI | plain entrypoint |\n\nNever add a second orchestrator (rule stack-choice). A plain CLI entrypoint called by the existing scheduler is often the right size.\n\n## 2. Thin orchestration, testable logic\n\n```python\n# src\u002Fchurn\u002Ffeatures.py — pure, tested with fixtures\ndef build_daily_features(orders: pd.DataFrame, day: date) -> pd.DataFrame: ...\n\n# src\u002Fchurn\u002Forchestration\u002Fassets.py — wiring only\nimport dagster as dg\n\ndaily = dg.DailyPartitionsDefinition(start_date=\"2025-01-01\")\n\n@dg.asset(partitions_def=daily)\ndef daily_features(context: dg.AssetExecutionContext, warehouse: WarehouseResource) -> None:\n    day = date.fromisoformat(context.partition_key)\n    features = build_daily_features(warehouse.orders_for(day), day)\n    warehouse.overwrite_partition(\"features.daily\", day, features)\n```\n\nThe asset never computes anything itself; `build_daily_features` has unit tests that know nothing about Dagster.\n\n## 3. Idempotency\n\n| ❌ | ✅ |\n|---|---|\n| `INSERT INTO features SELECT ...` on every run | delete-then-insert the partition in one transaction, `MERGE` on the key, or `INSERT OVERWRITE` the partition |\n| `df.to_parquet(\"out\u002Ffeatures.parquet\", append...)` | write `out\u002Fday=2026-10-01\u002Fpart.parquet` to a temp path, then rename |\n| `window_end = datetime.now()` | window from the partition key or the run's data interval |\n| file names with a timestamp of when it ran | paths keyed by what the data is for (partition, model version) |\n\nTest it: run the stage twice on the fixture; the output is identical and the row count does not double.\n\n## 4. Retries, failures and gates\n\n- Retries are for transient I\u002FO (network, a warehouse timeout): `@task(retries=3, retry_delay_seconds=30)` in Prefect, a `RetryPolicy` in Dagster, `retries=` in Airflow. A validation failure is not transient — retrying it three times just delays the alert.\n- Quality gates fail the run: a pandera\u002FGX check at ingestion (data-validation-contracts), Dagster `@dg.asset_check`, dbt tests after `dbt build`. Downstream stages do not run on a failed gate.\n- A training pipeline ends with an evaluation gate: the candidate is registered or promoted only if it beats the current model and the baseline on the agreed metric, per slice where it matters (model-training-and-evaluation). The gate's numbers are logged.\n- Log stage-level metrics: rows in, rows out, rows rejected, duration — so a silent drop is visible.\n\n## 5. Backfills and partitions\n\n- Partition by the natural time grain (day, hour) or by entity set; every stage takes its partition as input.\n- A backfill is the same code over a range of partitions — never a separate script.\n- Dry-run one partition first and compare its output with the existing data for that partition.\n- A production backfill or full rebuild is deploy-time work: record it in `before_deploy` \u002F `after_deploy`, with how long it takes and how to stop it (rule deploy-runbook-fields).\n\n## 6. Testing without the scheduler\n\n```python\ndef test_daily_features_overwrites_its_partition(tmp_warehouse) -> None:\n    for _ in range(2):\n        result = dg.materialize(\n            [daily_features],\n            partition_key=\"2026-10-01\",\n            resources={\"warehouse\": tmp_warehouse},\n        )\n        assert result.success\n    assert tmp_warehouse.row_count(\"features.daily\", day=date(2026, 10, 1)) == 3\n```\n\n- Dagster: `dg.materialize([...], partition_key=..., resources=...)` with a local resource (DuckDB file in `tmp_path`, an in-memory fake).\n- Prefect: call the flow function directly inside `prefect_test_harness()`.\n- Airflow: a DagBag import test (no import errors, no cycles) plus `dag.test()` for one run; keep task bodies as calls into your package.\n- Every pipeline test uses fixtures and local resources — never production credentials or buckets.\n\n## 7. Secrets and configuration\n\nCredentials come from the orchestrator's resources, connections or environment — never in code, never in DAG parameters. A new variable the deployed pipeline reads is declared with declare_env_vars. In Airflow, never render user-supplied parameters into Jinja-templated SQL or shell commands; pass them as bound parameters.\n\n## 8. Rollout\n\nA changed pipeline runs side by side (shadow output to a separate table or path) before it replaces the old output, when the task's risk warrants it; the cut-over and the rollback (point consumers back, re-run the old version for affected partitions) go in `after_deploy` and `rollback_plan`.\n\n## Common Mistakes\n\n- Transformation logic written inline in a DAG file, testable only by running Airflow.\n- Appending output, so every retry duplicates rows.\n- `now()` inside a stage, so a backfill computes today's window for last year's partition.\n- Retrying data-quality failures.\n- A schedule change that silently overlaps two runs writing the same partition.\n\n## Red Flags\n\n- Row counts that double after a re-run.\n- A stage with no rows-in\u002Frows-out logging.\n- A backfill script that is not the production code path.\n- A credential in a DAG file, a flow parameter or a notebook cell.\n",{"name":5,"source":24,"category":25,"tech_stack":26,"description":7},"wshobson\u002Fagents ml-pipeline-workflow (MIT), adapted; Dagster, Prefect and Airflow documentation cited","mlops","MLOps","main","910394a0b6db9fc8c9a8f36328ec421d3ebd8b38","catalog\u002Fagents\u002Fdata-scientist\u002Fskills\u002Fdata-pipeline-orchestration",18,"https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper","https:\u002F\u002Ftasktrooper.ai","https:\u002F\u002Fgithub.com\u002Fmakifbaysal","Senior Software Developer","2026-11-15 04:50:29",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add makifbaysal\u002Ftasktrooper --skill data-pipeline-orchestration",{"tool":42,"command":43},"bunx","bunx skills add makifbaysal\u002Ftasktrooper --skill data-pipeline-orchestration",{"tool":45,"command":46},"pnpm","pnpm dlx skills add makifbaysal\u002Ftasktrooper --skill data-pipeline-orchestration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fdata-scientist\u002Fskills\u002Fdata-pipeline-orchestration\u002FSKILL.md",true,[],[51,57,64,71,78,85],{"skillNo":52,"name":53,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7CSVEPQW6J6TD6CS2T5FPNZ","visual-craft","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fvisual-craft\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7CSVAQG91ETHQ0HBNZDG5FR","ux-copy","Use when you write any words a user reads in a mockup or a hand-off - content language and voice, buttons, labels, errors, empty states, confirmations, numbers and dates, and the longest-string check","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fux-copy\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7CSV6H0J38659NDXHJQ8396","screen-mockup-html","Use when you draw screens as the design task's HTML mockup - ONE canvas document holding every screen and every variant side by side, the sanitizer-safe recipe, phone and wide frames, the states grid, static control states, and the loopback self-check with screenshots at 375, 768 and 1440 attached to the task","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fscreen-mockup-html\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7CSV3JFRF3BM3XK52M7YEYR","performance-awareness","How the performance score moves for your role. Use when the score context shows a declining trend, or before handing off work you have not self-checked against every criterion.","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fperformance-awareness\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7CSTZDH00YRF5SCT7BRT9QD","design-variants","Use when a screen design needs variants - how many, variants as side-by-side rows on the one canvas, what makes two variants genuinely different, recommending one, how the human's choice is read, and narrowing to the chosen one in revision","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fdesign-variants\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7CSTV6P3SM3PAE28DB0RF77","design-system-authoring","Use when you derive, change or extend a design system - where tokens live per stack, the DTCG token tree, role-based names for both themes, base vs layer vs drift, the DESIGN.md section order, the inventory format, the contrast check and the lint every proposal returns","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fdesign-system-authoring\u002FSKILL.md",[],[]]