/migrate-to-orchestra:prefect-alerts-to-orchestrafrom migrate-to-orchestra
Maps Prefect notification hooks and Automation actions (Slack, email, Teams, PagerDuty) to Orchestra alert destinations. Covers all seven Orchestra integration types.
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 notifications live in three places: @flow(on_failure=...) / @flow(on_completion=...) hooks, @task(on_failure=...) hooks, and Prefect Automation notification actions. All three map to Orchestra's alerts: block, placed at pipeline level (for flow-level hooks) or task level (for task-level hooks). Orchestra supports seven destination integrations: SLACK, EMAIL, PAGER_DUTY, MICROSOFT_TEAMS, GOOGLE_CHAT, WEBHOOK, and DATADOG.
| Prefect construct | Orchestra field | Notes |
|---|---|---|
@flow(on_failure=[slack_hook]) | statuses: [FAILED] + SLACK destination | pipeline-level alerts: |
@flow(on_completion=[slack_hook]) | statuses: [SUCCEEDED] + SLACK | pipeline-level |
@flow(on_crashed=[hook]) | statuses: [FAILED] | no CRASHED status in Orchestra |
@flow(on_cancellation=[hook]) | statuses: [CANCELLED] | |
@task(on_failure=[hook]) | task-level alerts: on that specific task | |
| Prefect Automation → Slack notification | statuses: [FAILED/SUCCEEDED] + SLACK | |
| Prefect Automation → email notification | statuses: [...] + EMAIL | |
| Prefect Automation → PagerDuty action | statuses: [...] + PAGER_DUTY | requires connection_id |
| Prefect Automation → Teams notification | statuses: [...] + MICROSOFT_TEAMS | requires connection_id |
| Prefect Automation → Google Chat notification | statuses: [...] + GOOGLE_CHAT | requires connection_id; one connection per space |
SlackWebhook.load("x").notify(...) | SLACK destination with destination field | channel from notify(channel=...) |
MicrosoftTeamsWebhook.load("x").notify(...) | MICROSOFT_TEAMS with connection_id |
Valid statuses values: FAILED, SUCCEEDED, CANCELLED, WARNING, SKIPPED
Destination rules:
SLACK and EMAIL → require destination field (channel or address)PAGER_DUTY, MICROSOFT_TEAMS, GOOGLE_CHAT, WEBHOOK, DATADOG → require connection_id (Orchestra connection name with 5-digit suffix)# Pipeline-level alerts
alerts:
- name: <unique-alert-name>
statuses:
- FAILED # FAILED | SUCCEEDED | CANCELLED | WARNING | SKIPPED
destinations:
- integration: SLACK # SLACK | EMAIL | PAGER_DUTY | MICROSOFT_TEAMS | GOOGLE_CHAT | WEBHOOK | DATADOG
destination: '#channel' # required for SLACK and EMAIL only
connection_id: null # required for PAGER_DUTY, MICROSOFT_TEAMS, GOOGLE_CHAT, WEBHOOK, DATADOG
custom_message: null # optional, max ~200 chars
Task-level alerts (inside a task definition):
pipeline:
stage-name:
tasks:
my-task:
integration: SNOWFLAKE
integration_job: SNOWFLAKE_QUERY
# ...
alerts:
- name: task-failure-alert
statuses: [FAILED]
destinations:
- integration: SLACK
destination: '#data-alerts'
@flow(on_failure=...), @flow(on_completion=...), @flow(on_crashed=...), @flow(on_cancellation=...) hooks@task(on_failure=...) hooksSlackWebhook.load(...).notify(...) and MicrosoftTeamsWebhook.load(...).notify(...) callsalerts: blockalerts: block inside that task's YAMLon_crashed → FAILED status (no CRASHED in Orchestra); add comment noting thison_cancellation → CANCELLED statusnotify(channel=...) or Prefect block config → destinationdestinationconnection_idconnection_id values include the 5-digit Orchestra suffixcustom_message under ~200 charsfrom prefect_slack import SlackWebhook
from prefect.blocks.notifications import MicrosoftTeamsWebhook
def post_failure_to_slack(flow, flow_run, state):
SlackWebhook.load("data-alerts").notify(
body=f"Flow {flow.name} failed.",
channel="#incidents"
)
def send_pagerduty_on_failure(flow, flow_run, state):
# calls PagerDuty API directly
requests.post(PAGERDUTY_URL, json={"routing_key": PD_KEY, "event_action": "trigger"})
def notify_teams_on_success(flow, flow_run, state):
MicrosoftTeamsWebhook.load("teams-data-channel").notify(body="Pipeline succeeded!")
@flow(
on_failure=[post_failure_to_slack, send_pagerduty_on_failure],
on_completion=[notify_teams_on_success],
)
def critical_pipeline():
...
@task(on_failure=[post_failure_to_slack])
def critical_task():
...
version: v1
name: critical-pipeline
alerts:
- name: slack-on-failure
statuses: [FAILED]
destinations:
- integration: SLACK
destination: '#incidents'
custom_message: 'Critical pipeline failed — immediate attention required.'
- name: pagerduty-on-failure
statuses: [FAILED]
destinations:
- integration: PAGER_DUTY
connection_id: pagerduty_prod_12345
custom_message: 'Pipeline down — SLA at risk.'
- name: teams-on-success
statuses: [SUCCEEDED]
destinations:
- integration: MICROSOFT_TEAMS
connection_id: teams_data_channel_67890
custom_message: 'Pipeline succeeded!'
pipeline:
stage-main:
tasks:
critical-task:
integration: SNOWFLAKE
integration_job: SNOWFLAKE_QUERY
connection: snowflake_prod_12345
parameters:
query: 'SELECT 1'
depends_on: []
alerts:
- name: task-slack-on-failure
statuses: [FAILED]
destinations:
- integration: SLACK
destination: '#incidents'
on_crashed maps to FAILED — Orchestra has no CRASHED status; add a comment so reviewers knowon_cancellation maps to CANCELLEDon_failure → task-level alerts: block, not pipeline-levelSLACK and EMAIL require destination field; PAGER_DUTY, MICROSOFT_TEAMS, GOOGLE_CHAT, WEBHOOK, DATADOG require connection_idGOOGLE_CHAT connection posts through one space's incoming webhook, so several spaces means several connections, each listed as its own destinationconnection_id must include the 5-digit Orchestra suffix (e.g. pagerduty_prod_12345)custom_message max ~200 characters — truncate verbose Prefect message templatesalerts: listThis skill IS the alerts reference. For sensor/trigger patterns, see prefect-automations-to-orchestra.
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