prefect-to-zenml-migration
Installation
SKILL.md
Migrate Prefect to ZenML
This skill translates Prefect flows into idiomatic ZenML pipelines. It handles the full migration workflow: analyzing Prefect code, classifying each pattern, translating what maps cleanly, flagging what needs redesign, and producing a working ZenML project plus a migration report.
How migration works at a high level
Prefect and ZenML look similar at first glance because both are Python-first and both decorate functions. But the execution story is different.
- Prefect runs the flow body like regular Python at runtime. That means the flow can branch on task outputs, inspect states, submit new tasks dynamically, and use pause/suspend semantics while the run is already in progress.
- ZenML static pipelines compile a DAG before steps run. Step outputs are versioned artifacts, not ordinary in-memory values available during pipeline construction.
- ZenML dynamic pipelines recover part of Prefect's runtime flexibility, but they are still an approximation rather than a full state-model match. They default to
STOP_ON_FAILURE;FAIL_FASTis supported with caveats around already-running inline steps;CONTINUE_ON_FAILUREis not supported for dynamic pipelines. They also support only a subset of orchestrators.
So migration is never just "rename @flow to @pipeline". The real job is to decide which Prefect behaviors:
- map cleanly,
- map with semantic differences, or
- require redesign.