jupyter-to-marimo

📁 marimo-team/skills 📅 3 days ago
148
总安装量
18
周安装量
#3168
全站排名
安装命令
npx skills add https://github.com/marimo-team/skills --skill jupyter-to-marimo

Agent 安装分布

claude-code 14
opencode 6
pi 5
github-copilot 5
codex 5
gemini-cli 5

Skill 文档

Converting Jupyter Notebooks to Marimo

IMPORTANT: When asked to translate a notebook, ALWAYS run uvx marimo convert <notebook.ipynb> -o <notebook.py> FIRST before reading any files. This saves precious tokens – reading large notebooks can consume 30k+ tokens, while the converted .py file is much smaller and easier to work with.

Steps

  1. Convert using the CLI

Run the marimo convert command via uvx so no install is needed:

uvx marimo convert <notebook.ipynb> -o <notebook.py>

This generates a marimo-compatible .py file from the Jupyter notebook.

  1. Run marimo check on the output
uvx marimo check <notebook.py>

Fix any issues that are reported before continuing.

  1. Review and clean up the converted notebook

Read the generated .py file and apply the following improvements:

  • Ensure the script metadata block lists all required packages. The converter may miss some.
  • Drop leftover Jupyter artifacts like display() calls, or %magic commands that don’t apply in marimo.
  • Make sure the final expression of each cell is the value to render. Indented or conditional expressions won’t display.
  • If the original notebook requires environment variables via an input, consider adding the EnvConfig widget from wigglystuff. Details can be found here.
  • If the original notebook uses ipywidgets, replace them with corresponding ui from marimo. A slider, for example, would be replaced with mo.ui.slider().
  1. Run marimo check again after your edits to confirm nothing was broken.