Back to Skills

jupyter-to-marimo

Convert a Jupyter notebook (.ipynb) to a marimo notebook (.py).

149stars12forksUpdated 6/22/2026

Security Assessment

Safe(100/100)
Security Score100/100

About jupyter-to-marimo

This skill automates the conversion of Jupyter notebooks (.ipynb) to marimo notebooks (.py), a modern reactive notebook format. It provides a streamlined workflow that prioritizes efficiency by converting notebooks first before reading them, which can save over 30,000 tokens when working with large notebooks. The conversion process uses the marimo CLI tool via uvx, eliminating the need for manual installation.

The skill goes beyond simple file conversion by including validation and cleanup steps. After the initial conversion using the marimo convert command, it runs marimo check to identify any issues in the generated code. The process then involves manual review to remove Jupyter-specific artifacts like display() calls and magic commands, ensure proper cell expression rendering, and verify that all required packages are listed in the script metadata. Special consideration is given to common migration challenges like environment variable handling, widget compatibility, and LaTeX syntax differences.

This skill is ideal for data scientists and developers who want to migrate their existing Jupyter workflows to marimo's reactive notebook environment. It's particularly valuable for teams transitioning large notebook repositories, educators updating course materials, or individual developers seeking the benefits of marimo's reactive execution model. The skill handles common migration patterns including ipywidgets-to-marimo widget mapping, LaTeX/MathJax-to-KaTeX conversion, and environment configuration setup, making it suitable for notebooks of varying complexity.

FAQ

Why should I convert the notebook before reading it?

Converting first saves significant tokens - large Jupyter notebooks can consume 30k+ tokens when read directly, while the converted marimo .py file is much smaller and easier to work with.

Do I need to install marimo to use this skill?

No, the skill uses uvx to run marimo commands, which means no installation is required. The tool is automatically fetched and executed.

What happens to Jupyter magic commands during conversion?

Jupyter magic commands (like %magic) don't apply in marimo and need to be removed during the cleanup phase after conversion.

How are ipywidgets handled in the conversion?

The skill includes references for mapping ipywidgets to marimo equivalents, covering patterns for callbacks, linking, and anywidget integration to ensure interactive elements work properly.

What if my notebook uses LaTeX math expressions?

Marimo uses KaTeX instead of MathJax, so LaTeX syntax may need adjustment. The skill provides guidance on porting MathJax syntax to KaTeX-compatible format.

All Files

3 files
references/latex.md1.7 KB
View
references/widgets.md7.7 KB
View
SKILL.md1.9 KB
View

Install jupyter-to-marimo

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill