For general marimo notebook conventions (cell structure, PEP 723 metadata, output rendering,
, variable naming, etc.), refer to the
skill. This skill focuses specifically on
mapping Streamlit concepts to marimo equivalents.
-
Read the Streamlit app to understand its widgets, layout, and state management.
-
Create a new marimo notebook following the
skill conventions. Add all dependencies the Streamlit app uses (pandas, plotly, altair, etc.) — but replace
with
. You should not overwrite the original file.
-
Map Streamlit components to marimo equivalents using the reference tables below. Key principles:
- UI elements are assigned to variables and their current value is accessed via .
- Cells that reference a UI element automatically re-run when the user interacts with it — no callbacks needed.
-
Handle conceptual differences in execution model, state, and caching (see below).
-
Run on the result and fix any issues.
is the primary caching decorator — it works like
but is aware of marimo's reactivity.
goes further by persisting results to disk across sessions, useful for expensive computations like model training.
marimo features molab to host marimo apps instead of the streamlit community cloud. You can generate an "open in molab" button via the
skill.
streamlit has a feature for custom components. These are not compatible with marimo. You might be able to generate an equivalent anywidget via the
skill but discuss this with the user before working on that.