SKILL.md
Working with Marimo
Follows a Plan-Execute-Verify loop to ensure notebook correctness.
Feedback Loop
- Context & Plan:
Sessions: mcpmarimogetactivenotebooks (Find session IDs). Structure: mcpmarimogetlightweightcellmap (See cell IDs/content). Data State: mcpmarimogettablesandvariables (Inspect DataFrames/Variables). Cell Detail: mcpmarimogetcellruntime_data (Code, errors, local vars).
- Execute:
Edit the .py file directly using write or searchreplace. Rule: Follow [Best Practices](reference/bestpractices.md) (e.g., @app.cell, no global state).
- Verify (CRITICAL):
Lint: mcpmarimolintnotebook (Static analysis). Runtime Errors: mcpmarimogetnotebookerrors (Execution errors). * Outputs: mcpmarimogetcell_outputs (Visuals/Console).
Common Commands
- Start/Sync: Marimo automatically syncs file changes.
- SQL: Use
mo.sqlfor DuckDB queries. - Plots: Use
plt.gca()or return figure. Noplt.show().
Reference
See [Best Practices](reference/best_practices.md) for code formatting, reactivity rules, and UI element usage.