/migrate-to-orchestra:prefect-cross-flow-to-orchestrafrom migrate-to-orchestra
Maps Prefect cross-flow patterns (run_deployment, subflows) to Orchestra equivalents using trigger_events and pipeline triggers. Helps migrate Prefect workflows to Orchestra.
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.
Prefect cross-flow coordination uses two patterns: run_deployment() (trigger a separate deployment, optionally waiting for completion) and subflows (calling one @flow from inside another). In Orchestra, both patterns become separate pipelines. The recommended approach for cross-pipeline triggering is trigger_events: on the downstream pipeline, which fires when an upstream pipeline reaches a given status.
Which mechanism: prefer trigger_events: on the downstream pipeline root — it is event-driven, needs no polling window, and keeps each flow a pipeline of its own. ORCHESTRA + TRIGGER_PIPELINE is a valid task job and is the closer match when the parent must trigger the child and wait mid-run; it requires the child to be published, and takes run_inputs, input_set and branch. To wait on a single upstream task rather than a whole run, use a sensor check of type ORCHESTRA_TASK_STATUS instead (Orchestra task sensor).
| Prefect construct | Orchestra equivalent | Notes |
|---|---|---|
run_deployment("name/deployment") — fire and wait | trigger_events: on downstream pipeline | downstream waits for upstream SUCCEEDED |
run_deployment(..., timeout=0) — fire and forget | trigger_events: on downstream pipeline | set statuses: [SUCCEEDED] on upstream |
| Prefect Automation: on parent SUCCEEDED → run child | trigger_events: at child pipeline root | |
child_flow() called inside parent_flow() (subflow) | child → separate Orchestra pipeline; trigger_events: | no inline subpipeline concept |
run_deployment(..., parameters={...}) | trigger_events: [{..., run_inputs: {...}}] | |
Sequential run_deployment calls | chain via trigger_events: with pipeline_id of each upstream | |
await run_deployment(...) (async) | same as sync — trigger_events: | Orchestra handles async natively |
# On the DOWNSTREAM (child) pipeline:
version: v1
name: downstream-pipeline
trigger_events:
- type: pipeline
pipeline_id: "uuid-of-upstream-pipeline" # UUID from Orchestra UI pipeline URL
run_inputs: # optional — equivalent to run_deployment parameters
env: prod
date: '{{ run_date }}'
Multiple upstream triggers (OR logic — any entry fires the pipeline):
trigger_events:
- type: pipeline
pipeline_id: "uuid-of-pipeline-a"
- type: pipeline
pipeline_id: "uuid-of-pipeline-b"
For AND logic (both must complete before downstream runs), create a parent "coordinator" pipeline that sequences the upstreams, then use a single trigger_events: entry pointing at the coordinator.
run_deployment() call and every subflow invocation (child_flow() inside parent_flow())trigger_events: block with type: pipeline and the upstream pipeline_idrun_deployment(..., parameters={...}) passes params: add run_inputs: under the trigger_event entrytrigger_events: on B pointing to A, and on C pointing to Brun_deployment() calls from the parent flow body — parent pipeline no longer needs to call childrun_deployment() returns: keep that work in the parent; only the trigger moves to trigger_events:TRIGGER_PIPELINE as an integration_job unless verified in your Orchestra instance schema@flow
def child_report_flow(env: str = "prod"):
# generate daily report
...
@flow
def orchestrator_flow():
# trigger nightly ELT and wait
run_deployment("nightly-elt/prod", timeout=300)
# then trigger report with parameters
run_deployment(
"daily-report/prod",
parameters={"env": "prod"},
timeout=300,
)
# Subflow pattern
@flow
def parent_flow():
child_report_flow(env="prod")
# nightly-elt pipeline — runs on its own schedule, no changes needed
# (abbreviated)
version: v1
name: nightly-elt
schedule:
- cron: '0 2 * * ? *'
pipeline:
{}
---
# daily-report pipeline — triggered by nightly-elt completing
version: v1
name: daily-report
trigger_events:
- type: pipeline
pipeline_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" # UUID of nightly-elt
run_inputs:
env: prod
pipeline:
stage-report:
tasks:
{}
---
# child-report pipeline — triggered by parent-flow completing
version: v1
name: child-report
trigger_events:
- type: pipeline
pipeline_id: "b2c3d4e5-f6a7-8901-bcde-f12345678901" # UUID of parent-flow
run_inputs:
env: prod
pipeline:
{}
pipeline_id is a UUID from the Orchestra UI pipeline URL — never the pipeline name stringtrigger_events: over a TRIGGER_PIPELINE task for plain downstream triggering; TRIGGER_PIPELINE exists and waits for the child, so use it only when the parent must block on the child mid-run (the child must be published)trigger_events: uses OR logic — any entry firing starts the pipeline; for AND logic, use a coordinator pipelinerun_deployment parameters → run_inputs under the trigger_event entryrun_deployment(), split into separate pipelines connected via trigger_events:timeout=0 (fire-and-forget) in Prefect → still use trigger_events: in Orchestra; Orchestra manages the async executionawait run_deployment() is equivalent to sync run_deployment() — same Orchestra patternSee prefect-alerts-to-orchestra for all notification patterns.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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