/migrate-to-orchestra:airflow-cross-dag-to-orchestrafrom migrate-to-orchestra
Maps Airflow cross-DAG patterns (TriggerDagRunOperator, ExternalTaskSensor, SubDagOperator, Datasets) to Orchestra equivalents using TRIGGER_PIPELINE tasks and trigger_events blocks.
Ships in migrate-to-orchestra. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Airflow cross-DAG patterns — TriggerDagRunOperator, ExternalTaskSensor, SubDagOperator, Datasets — all have Orchestra equivalents. Orchestra provides two mechanisms:
TRIGGER_PIPELINE task — an explicit pipeline step that triggers another pipeline and waits for it to complete. Equivalent to TriggerDagRunOperator(wait_for_completion=True).
trigger_events: block — event-driven triggering at the pipeline root. When an upstream pipeline completes, this pipeline starts automatically. Equivalent to ExternalTaskSensor + DAG scheduling, but cleaner.
# Airflow
trigger_downstream = TriggerDagRunOperator(
task_id="trigger_reporting",
trigger_dag_id="daily_reporting",
conf={"date": "{{ ds }}", "env": "prod"},
wait_for_completion=True,
execution_date="{{ execution_date }}",
)
# Orchestra
task-001:
integration: ORCHESTRA
integration_job: TRIGGER_PIPELINE
name: trigger_reporting
parameters:
pipeline_id: "uuid-of-daily-reporting-pipeline" # UUID from Orchestra UI
run_inputs: # optional — equivalent to conf={}
date: "${{ ORCHESTRA.CURRENT_TIME }}"
env: prod
branch: null # optional — git branch override
depends_on: []
condition: null
tags: []
TRIGGER_PIPELINE parameters:
| Parameter | Required | Notes |
|---|---|---|
pipeline_id | ✅ | UUID of the pipeline to trigger (find in Orchestra URL) |
run_inputs | ❌ | Key-value dict passed as inputs to the triggered pipeline |
branch | ❌ | Git branch to use for the triggered pipeline run |
Key difference from Airflow: TRIGGER_PIPELINE always waits for the triggered pipeline to complete before proceeding. There is no wait_for_completion=False equivalent.
trigger_events: (preferred)When an upstream pipeline is in Orchestra and you want to start a pipeline automatically on its completion, use trigger_events: at the pipeline root — no sensor polling needed.
# Airflow
wait_for_elt = ExternalTaskSensor(
task_id="wait_for_upstream_elt",
external_dag_id="nightly_elt",
external_task_id=None, # wait for whole DAG
poke_interval=60,
timeout=3600,
)
# Orchestra — event-driven trigger
version: v1
name: daily-reporting
trigger_events:
- type: pipeline
pipeline_id: "uuid-of-nightly-elt-pipeline"
statuses: [SUCCEEDED, WARNING] # null defaults to SUCCEEDED + WARNING
run_inputs: # optional inputs to pass to this pipeline run
triggered_by: upstream_elt
pipeline:
...
TriggerEventModel fields:
| Field | Required | Notes |
|---|---|---|
type | ✅ | Always pipeline |
pipeline_id | ✅ | UUID of the upstream pipeline, or "*" for any pipeline |
statuses | ❌ | Which completion statuses trigger this pipeline. Default: [SUCCEEDED, WARNING] |
run_inputs | ❌ | Input values to pass to the triggered run |
Multiple upstream triggers (OR logic):
trigger_events:
- type: pipeline
pipeline_id: "uuid-of-pipeline-a"
- type: pipeline
pipeline_id: "uuid-of-pipeline-b"
# fires when EITHER pipeline-a OR pipeline-b completes
external_task_id set → ORCHESTRA_TASK_STATUS sensortrigger_events: fires on the upstream pipeline finishing, so it has no answer for an
ExternalTaskSensor that names one task. For that, use a sensor check of type
ORCHESTRA_TASK_STATUS — downstream work then starts as soon as that task is done instead of
waiting out the rest of the upstream DAG:
# Airflow
wait_for_load = ExternalTaskSensor(
task_id="wait_for_orders_loaded",
external_dag_id="nightly_elt",
external_task_id="load_orders", # one task, not the whole DAG
allowed_states=["success"],
)
# Orchestra
sensors:
orders_loaded:
name: Orders loaded
cron: '0 5 * * ? *'
timezone: UTC
timeout_mins: 180
checks:
load-orders-check:
integration: ORCHESTRA
sensor_type: ORCHESTRA_TASK_STATUS
parameters:
pipeline_id: "uuid-of-nightly-elt-pipeline"
task_id: load_orders
statuses: [SUCCEEDED]
check_latest_run: false
Choosing between the two: trigger_events: whenever the dependency really is the whole upstream
run (cheaper, no polling window to size), ORCHESTRA_TASK_STATUS only when external_task_id
pointed at a specific task.
Carry two Orchestra behaviours into the conversion. Only the task's final attempt counts, so an
allowed_states=['failed'] sensor does not convert faithfully when the upstream task retries — a
failure a retry recovers from won't fire the check. And a task in a matrix Task Group reports one
status for the whole matrix rather than per iteration, so the check waits for every iteration.
Map what the downstream pipeline needs out of the matched run with map_outputs
(${{ outputs.task_run.status }}, ${{ outputs.task_run.task_run_id }}), since there is no other
way to read it
(Orchestra task sensor).
Airflow Sub-DAGs are mostly an anti-pattern — they create scheduling complexity and have known issues. In Orchestra:
Option A — Flatten into stages: If the sub-DAG is small and tightly coupled to the parent, convert its tasks into additional stages in the same Orchestra pipeline.
Option B — Separate pipeline: If the sub-DAG represents a reusable or independently schedulable unit, convert it to its own Orchestra pipeline and trigger it with TRIGGER_PIPELINE.
# Airflow
subdag_op = SubDagOperator(
task_id="process_subdag",
subdag=create_subdag(dag_id, "process_subdag", default_args),
)
# Orchestra — Option B: separate pipeline + trigger
# In the parent pipeline:
task-trigger-subpipeline:
integration: ORCHESTRA
integration_job: TRIGGER_PIPELINE
name: process_subpipeline
parameters:
pipeline_id: "uuid-of-process-pipeline"
depends_on: []
trigger_events: with any pipelineAirflow Datasets (2.4+) trigger DAGs when an upstream DAG updates a dataset. In Orchestra, use trigger_events: with the relevant upstream pipeline UUID.
# Airflow
my_dataset = Dataset("s3://my-bucket/orders/")
with DAG("producer", schedule=None) as producer_dag:
update_task = PythonOperator(..., outlets=[my_dataset])
with DAG("consumer", schedule=[my_dataset]) as consumer_dag:
...
# Orchestra — consumer pipeline
trigger_events:
- type: pipeline
pipeline_id: "uuid-of-producer-pipeline"
statuses: [SUCCEEDED]
from airflow.operators.trigger_dagrun import TriggerDagRunOperator
from airflow.sensors.external_task import ExternalTaskSensor
with DAG("orchestrator") as dag:
wait_for_elt = ExternalTaskSensor(
task_id="wait_for_elt",
external_dag_id="nightly_elt",
)
trigger_report = TriggerDagRunOperator(
task_id="trigger_report",
trigger_dag_id="daily_report",
conf={"env": "prod"},
wait_for_completion=True,
)
wait_for_elt >> trigger_report
# nightly-elt pipeline (separate YAML)
version: v1
name: nightly-elt
pipeline:
... # existing ELT tasks
---
# orchestrator pipeline — triggered by nightly-elt completion
version: v1
name: orchestrator
trigger_events:
- type: pipeline
pipeline_id: "uuid-of-nightly-elt-pipeline"
statuses: [SUCCEEDED, WARNING]
pipeline:
stage-trigger-report:
tasks:
trigger-report:
integration: ORCHESTRA
integration_job: TRIGGER_PIPELINE
name: trigger_daily_report
parameters:
pipeline_id: "uuid-of-daily-report-pipeline"
run_inputs:
env: prod
depends_on: []
condition: null
tags: []
depends_on: []
pipeline_id is a UUID — find it in the Orchestra UI pipeline URL (e.g. app.getorchestra.io/pipelines/xxxxxxxx-xxxx-...). It's not the pipeline name.TRIGGER_PIPELINE always waits — unlike Airflow's wait_for_completion=False option, Orchestra always waits for the triggered pipeline before proceeding.trigger_events: uses OR logic — any single entry firing starts the pipeline. For AND logic (wait for both pipeline A and pipeline B), chain: trigger_events fires pipeline B, and pipeline A is a TRIGGER_PIPELINE task at the start of pipeline B.statuses default — if omitted, trigger_events fires on SUCCEEDED and WARNING only. Explicitly set statuses: [SUCCEEDED] if you don't want WARNING runs to trigger downstream.alerts:
- name: on-failure
statuses: [FAILED]
destinations:
- integration: SLACK
destination: '#data-alerts'
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub orchestra-hq/orchestra-skills --plugin migrate-to-orchestra52 skills in this plugin
/airbyte-cloud-airflow-to-orchestraUse this skill when the user wants to convert an Airflow task that uses AirbyteTriggerSyncOperator or AirbyteSensor (apache-airflow-providers-airbyte) into an equivalent Orchestra pipeline task targeting Airbyte Cloud. Triggers: any mention of migrating, converting, or rewriting Airflow Airbyte tasks to Orchestra; any Airflow DAG code containing AirbyteTriggerSyncOperator or AirbyteSensor pointed at Airbyte Cloud./airbyte-cloud-dagster-to-orchestraUse this skill when the user wants to convert a Dagster integration that syncs Airbyte Cloud — AirbyteCloudResource, build_airbyte_assets, load_airbyte_cloud_asset_specs, or airbyte_assets — into an equivalent Orchestra pipeline task targeting Airbyte Cloud. Triggers: any mention of migrating or rewriting Dagster Airbyte assets/resources to Orchestra; any Dagster code importing from dagster_airbyte pointed at Airbyte Cloud./airbyte-cloud-prefect-to-orchestraUse this skill when the user wants to convert a Prefect task that syncs Airbyte Cloud — AirbyteConnection block, trigger_sync_run_and_wait_for_completion, or AirbyteSyncResult — into an equivalent Orchestra pipeline task targeting Airbyte Cloud. Triggers: any mention of migrating or rewriting Prefect Airbyte tasks to Orchestra; any Prefect flow code importing from prefect_airbyte pointed at Airbyte Cloud.Other plugins' skills for the same job