Loading...
Loading...
This skill should be used when the user asks to "use marimo", "create a marimo notebook", "debug a marimo notebook", "inspect cells", "understand reactive execution", "fix marimo errors", "convert from jupyter to marimo", or works with marimo reactive Python notebooks.
npx skill4agent add edwinhu/workflows marimo.py@app.cell@app.celldef _(deps):return var,marimo check notebook.pymarimo export ipynb notebook.py -o __marimo__/notebook.ipynb --include-outputs| Excuse | Reality | Do Instead |
|---|---|---|
| "marimo check passed, so it works" | Syntax check ≠ runtime correctness | EXECUTE with --include-outputs and inspect |
| "Just a small change, can't break anything" | Reactivity means small changes propagate everywhere | VERIFY with full execution |
| "I'll let marimo handle the dependency tracking" | Verification of correct behavior is still required | CHECK outputs match expectations |
| "The function signature looks right" | Wrong deps/returns break reactivity silently | VALIDATE all vars are in params AND returns |
| "I can modify the function signature" | Breaks marimo's dependency detection | ONLY edit inside function bodies |
| "Variables can be used without returning them" | Will cause NameError in dependent cells | RETURN all created variables |
| "I can skip the trailing comma for single returns" | Python treats | USE |
@app.cellmarimo check notebook.pymarimo export ipynb notebook.py -o __marimo__/notebook.ipynb --include-outputs1. EDIT → Modify code inside @app.cell function bodies only
2. CHECK → marimo check notebook.py
3. EXECUTE → marimo export ipynb notebook.py -o __marimo__/notebook.ipynb --include-outputs
4. INSPECT → Use notebook-debug verification
5. VERIFY → Outputs match expectations
6. CLAIM → "Notebook works" only after all gates passed.py@app.cellimport marimo
app = marimo.App()
@app.cell
def _(pl): # Dependencies as parameters
df = pl.read_csv("data.csv")
return df, # Trailing comma required for single return
@app.cell
def _(df, pl):
summary = df.describe()
filtered = df.filter(pl.col("value") > 0)
return summary, filtered # Multiple returns@app.cell$mo.md("Cost: ")mo.md("Cost: $50")| Command | Purpose |
|---|---|
| marimo: Open notebook in browser editor for interactive development |
| marimo: Run notebook as executable app |
| marimo: Validate notebook structure and syntax without execution |
| marimo: Convert Jupyter notebook to marimo format |
# marimo: Export to ipynb with code only
marimo export ipynb notebook.py -o __marimo__/notebook.ipynb
# marimo: Export to ipynb with outputs (runs notebook first)
marimo export ipynb notebook.py -o __marimo__/notebook.ipynb --include-outputs
# marimo: Export to HTML (runs notebook by default)
marimo export html notebook.py -o __marimo__/notebook.html
# marimo: Export to HTML with auto-refresh on changes (live preview)
marimo export html notebook.py -o __marimo__/notebook.html --watch--include-outputs__marimo__/mo.uimo.sql(df, "SELECT * FROM df")mo.md("# Heading")# scripts: Validate notebook syntax and cell structure
scripts/check_notebook.sh notebook.pynotebook-debug# marimo: Export to ipynb with outputs for inspection
marimo export ipynb notebook.py -o __marimo__/notebook.ipynb --include-outputs| Issue | Fix |
|---|---|
| Variable redefinition | Rename one variable or merge cells |
| Circular dependency | Break cycle by merging or restructuring |
| Missing return | Add |
| Import not available | Ensure import cell returns the module |
references/reactivity.mdreferences/debugging.mdreferences/widgets.mdreferences/sql.mdexamples/examples/basic_notebook.pyexamples/data_analysis.pyexamples/interactive_widgets.pyscripts/scripts/check_notebook.shscripts/get_cell_map.pynotebook-debug