Skip to content

brycewang-stanford/Auto-Empirical-Research-Skills / skills/17-DAAF-Contribution-Community-daaf/dot-claude/skills/marimo

marimo

Verified

Reactive Python notebook system. Cell reactivity, UI elements (sliders, dropdowns, tables), SQL cells, plotting, app deployment. Use when assembling Stage 9 notebooks, building data apps, or converting Jupyter to marimo .py format.

references/quickstart.md

View on GitHub
# Quickstart

## Installation

### Minimal Install

```bash
pip install marimo
# or
uv add marimo
# or
conda install -c conda-forge marimo
```

### Recommended Install (SQL, AI, Plotting)

```bash
pip install "marimo[recommended]"
# or
uv add "marimo[recommended]"
```

This unlocks: SQL cells (DuckDB), AI completion, plotting in data viewer, Ruff formatting.

## CLI Commands

### Create/Edit Notebooks

```bash
# Launch notebook server (browse/create notebooks)
marimo edit

# Create or edit specific notebook
marimo edit my_notebook.py

# Watch for external edits (VS Code, vim, etc.)
marimo edit --watch my_notebook.py
```

### Run as App

```bash
# Serve notebook as read-only web app
marimo run my_notebook.py

# With custom host/port
marimo run my_notebook.py --host 0.0.0.0 --port 8080
```

### Run as Script

```bash
# Execute notebook as Python script
python my_notebook.py

# With CLI arguments
python my_notebook.py -- --arg1 value1
```

### Tutorials

```bash
# List all tutorials
marimo tutorial

# Recommended sequence
marimo tutorial intro      # Start here
marimo tutorial dataflow   # Understand reactivity
marimo tutorial ui         # Interactive elements
marimo tutorial markdown   # Formatting
marimo tutorial plots      # Visualization
marimo tutorial sql        # SQL cells
```

### Export

```bash
# Export to HTML
marimo export html notebook.py -o output.html

# Export to WASM (runs in browser)
marimo export html-wasm notebook.py -o output_dir/

# Export to Jupyter notebook
marimo export ipynb notebook.py -o output.ipynb

# Export to flat Python script
marimo export script notebook.py -o flat_script.py
```

### Convert from Jupyter (Inbound)

```bash
# Convert .ipynb INTO marimo (inbound only — marimo convert is for importing)
marimo convert notebook.ipynb -o notebook.py
# To export FROM marimo to other formats, use: marimo export {format}
# e.g., marimo export md notebook.py, marimo export html notebook.py
```

## First Notebook

### Basic Structure

Every marimo notebook starts with importing the library:

```python
import marimo as mo
```

### Cell Basics

- Each cell is a block of Python code
- The **last expression** in a cell is its output
- Cells execute based on **variable dependencies**, not position

```python
# Cell 1: Define data
data = [1, 2, 3, 4, 5]

# Cell 2: Process (runs after Cell 1 because it reads 'data')
total = sum(data)
total  # This is the output
```

### Adding Markdown

```python
mo.md("# My Analysis")
```

With Python values:

```python
mo.md(f"The total is **{total}**")
```

### Adding Interactivity

```python
slider = mo.ui.slider(1, 100, value=50, label="Choose a value")
slider  # Display it
```

Access value in another cell:

```python
mo.md(f"You selected: {slider.value}")
```

## File Format

marimo notebooks are **pure Python** (`.py` files):

```python
import marimo

__generated_with = "0.10.0"
app = marimo.App()

@app.cell
def _():
    import marimo as mo
    return (mo,)

@app.cell
def _(mo):
    mo.md("# Hello marimo!")
    return

if __name__ == "__main__":  # marimo framework boilerplate (auto-generated)
    app.run()
```

Benefits:
- Git-friendly (no JSON merge conflicts)
- Executable as scripts
- Import functions from other notebooks

## Package Management

### Auto-install on Import

marimo can detect missing packages and offer to install them. Enable in settings.

### Inline Dependencies (PEP 723)

Add dependencies to notebook header:

```python
# /// script
# dependencies = ["pandas", "altair"]
# ///
```

Run in isolated environment:

```bash
marimo edit --sandbox notebook.py
```

## VS Code / Cursor Integration

Install the [marimo VS Code extension](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo) for:
- Edit notebooks in VS Code
- Syntax highlighting
- Run notebooks directly

## Next Steps

- Learn about [reactivity](./reactivity.md) to understand how cells execute
- Add [UI elements](./ui-elements.md) for interactivity
- Work with [data and SQL](./sql-data.md)

## Official Resources

- Docs: https://docs.marimo.io
- GitHub: https://github.com/marimo-team/marimo
- Discord: https://marimo.io/discord
- Gallery: https://marimo.io/gallery
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall