marimo-notebook

Solid

marimo ノートブックを正しいフォーマットでPythonファイルに作成するスキル。 「marimoノートブック作成」「インタラクティブノートブック」「Pythonノートブック」等のリクエストで発動。

AI & Automation 347 stars 12 forks Updated 1 weeks ago

Install

View on GitHub

Quality Score: 81/100

Stars 20%
85
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
0
Description 5%
100

Skill Content

## トリガーワード 「marimoノートブック」「インタラクティブノートブック」「Pythonノートブック」「marimo」 # Notes for marimo Notebooks ## Running Marimo Notebooks ```bash # Run as script (non-interactive, for testing) uv run <notebook.py> # Run interactively in browser uv run marimo run <notebook.py> # Edit interactively uv run marimo edit <notebook.py> ``` ## Script Mode Detection Use `mo.app_meta().mode == "script"` to detect CLI vs interactive: ```python @app.cell def _(mo): is_script_mode = mo.app_meta().mode == "script" return (is_script_mode,) ``` ## Key Principle: Keep It Simple **Show all UI elements always.** Only change the data source in script mode. - Sliders, buttons, widgets should always be created and displayed - In script mode, just use synthetic/default data instead of waiting for user input - Don't wrap everything in `if not is_script_mode` conditionals - Don't use try/except for normal control flow ### Good Pattern ```python # Always show the widget @app.cell def _(ScatterWidget, mo): scatter_widget = mo.ui.anywidget(ScatterWidget()) scatter_widget return (scatter_widget,) # Only change data source based on mode @app.cell def _(is_script_mode, make_moons, scatter_widget, np, torch): if is_script_mode: # Use synthetic data for testing X, y = make_moons(n_samples=200, noise=0.2) X_data = torch.tensor(X, dtype=torch.float32) y_data = torch.tensor(y) data_error = None else: # Use widget data in interactive mode ...

Details

Author
minicoohei
Repository
minicoohei/ai-agent-camp
Created
5 months ago
Last Updated
1 weeks ago
Language
Python
License
None

Similar Skills

Semantically similar based on skill content — not just same category