skills/17-DAAF-Contribution-Community-daaf/dot-claude/skills/marimo/SKILL.md
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.
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research marimoInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
marimo reactive Python notebook system for reproducible and interactive data work. Covers cell reactivity model, UI elements (sliders, dropdowns, tables, forms), SQL cells, DataFrame display, plotting integration, validation patterns for data pipelines, and deployment as apps, scripts, or WASM. Use when assembling Stage 9 research notebooks, developing reactive marimo notebooks, building interactive data apps, or converting Jupyter notebooks to marimo's Git-friendly .py format.
Comprehensive skill for building reactive Python notebooks with marimo. Use decision trees below to find the right guidance, then load detailed references.
marimo is an open-source reactive Python notebook that automatically keeps code and outputs consistent:
.py files (Git-friendly)Each topic in ./references/ contains focused documentation:
| File | Purpose | When to Read |
|------|---------|--------------|
| quickstart.md | Installation, CLI, first notebook | Starting a new project |
| reactivity.md | Cell execution model, dataflow | Understanding marimo's reactive model |
| validation-patterns.md | Transform-validate patterns, checkpoints | REQUIRED for data analysis workflows |
| ui-elements.md | Interactive elements (mo.ui.*) | Adding interactivity |
| sql-data.md | SQL cells, dataframes, plotting | Working with data |
| outputs-layouts.md | Markdown, layouts, formatting | Styling outputs |
| apps-deployment.md | Apps, scripts, export, deploy | Sharing/deploying notebooks |
| gotchas.md | Common errors, best practices | Debugging issues |
quickstart.md then reactivity.mdvalidation-patterns.md (REQUIRED for rigorous analysis)gotchas.md firstLoad these skills together with marimo for comprehensive workflow support:
Always Load Together:
data-scientist - Provides validation methodology and EDA principles that inform notebook structurepolars - DataFrame operations for data transformations within notebooksLoad for Specific Features:
plotnine - Static publication-quality plots (ggplot2 style)plotly - Interactive visualizations with hover/zoomPrerequisite Knowledge: If new to marimo, first understand:
For data research workflows, the Stage 9 marimo notebook has ONE job: LITERALLY COPY script file contents into cells.
Stage 9 is handled by the notebook-assembler agent (see .claude/agents/notebook-assembler.md), which:
scripts/stage{5,6,7,8}_*/pl.read_parquet() + mo.ui.table() cellsThe following are NEVER ALLOWED in Stage 9 notebooks:
| Prohibited Element | Why |
|-------------------|-----|
| mo.ui.dropdown() | No dropdowns — not a dashboard |
| mo.ui.slider() | No sliders — not a dashboard |
| mo.ui.multiselect() | No multiselects — not a dashboard |
| mo.ui.text() for search | No search boxes — not a dashboard |
| .group_by() (new) | No new aggregations — copy script code only |
| .agg() (new) | No new aggregations — copy script code only |
| .pivot() (new) | No pivot tables — copy script code only |
| .filter() in data cells | No filtering — just load and display |
| .with_columns() in data cells | No transforms — just load and display |
| "Interactive Filters" section | Not a dashboard |
| "Data Explorer" section | Not a dashboard |
| "Institution Lookup" feature | Not a dashboard |
Data inspection cells may contain ONLY these two lines:
df = pl.read_parquet("path/to/file.parquet")
mo.ui.table(df.head(100))
No .filter(). No .with_columns(). No .select(). No aggregations. Just load and display.
# ❌ WRONG — This is new analysis code
tier_summary = risk_data.group_by("tier").agg(pl.len())
# ❌ WRONG — This is a dashboard widget
sector_dropdown = mo.ui.dropdown(options=["Public", "Private"])
# ❌ WRONG — This is a transformation when loading
df = pl.read_parquet("data.parquet").with_columns(pl.col("x") * 2)
# ❌ WRONG — This is filtering
filtered = df.filter(pl.col("state") == "VA")
# ✅ CORRECT — Verbatim script code in code cell
# SOURCE: scripts/stage5_fetch/01_fetch.py
import polars as pl
def _():
# ... exact script contents (marimo cell wrapper) ...
# ✅ CORRECT — Simple load + display
df = pl.read_parquet("data/raw/file.parquet")
mo.ui.table(df.head(100))
See:
.claude/agents/notebook-assembler.md for the complete behavioral protocolagent_reference/WORKFLOW_PHASE4_ANALYSIS.md Stage 9 for templateGetting started?
├─ Install marimo → ./references/quickstart.md
├─ Create first notebook → ./references/quickstart.md
├─ Understand how cells work → ./references/reactivity.md
└─ Run built-in tutorials → marimo tutorial intro
Need interactive elements?
├─ Sliders, dropdowns, text inputs → ./references/ui-elements.md
├─ Tables with selection → ./references/ui-elements.md
├─ Forms with submit buttons → ./references/ui-elements.md
├─ Dynamic arrays of elements → ./references/ui-elements.md
├─ Charts with selection → ./references/sql-data.md (plotting section)
└─ Custom widgets (anywidget) → ./references/ui-elements.md
Need data operations?
├─ Query dataframes with SQL → ./references/sql-data.md
├─ Connect to databases (Postgres, SQLite) → ./references/sql-data.md
├─ Display/filter dataframes → ./references/sql-data.md
├─ Create plots (Altair, Matplotlib, Plotly) → ./references/sql-data.md
└─ Interactive data exploration → ./references/sql-data.md
Need output formatting?
├─ Write markdown with Python values → ./references/outputs-layouts.md
├─ Arrange elements (hstack, vstack) → ./references/outputs-layouts.md
├─ Tabs, accordions, sidebars → ./references/outputs-layouts.md
├─ Progress bars, spinners → ./references/outputs-layouts.md
└─ Conditional output display → ./references/outputs-layouts.md
Need to share or deploy?
├─ Run as read-only web app → ./references/apps-deployment.md
├─ Execute as Python script → ./references/apps-deployment.md
├─ Export to HTML/WASM → ./references/apps-deployment.md
├─ Deploy with Docker → ./references/apps-deployment.md
├─ Grid/slides layout → ./references/apps-deployment.md
└─ Convert from Jupyter → ./references/quickstart.md
Having issues?
├─ "Multiple definitions" error → ./references/gotchas.md
├─ Cells not re-running as expected → ./references/reactivity.md
├─ UI element not updating → ./references/gotchas.md
├─ Cycle dependency error → ./references/gotchas.md
├─ Expensive cells running too often → ./references/gotchas.md
└─ Mutations not triggering updates → ./references/reactivity.md
| Command | Purpose |
|---------|---------|
| marimo edit | Launch notebook server |
| marimo edit notebook.py | Create/edit specific notebook |
| marimo run notebook.py | Run as read-only app |
| python notebook.py | Execute as script |
| marimo tutorial intro | Run interactive tutorial |
| marimo convert nb.ipynb -o nb.py | Convert other formats INTO marimo (inbound only) |
| marimo export html notebook.py | Export to HTML |
Docker: When running in a container, add
--host 0.0.0.0 --port 2718 --headlesstorunandeditcommands.
| Function | Purpose |
|----------|---------|
| mo.md("text") | Render markdown |
| mo.ui.slider(min, max) | Create slider |
| mo.ui.dropdown(options) | Create dropdown |
| mo.ui.table(data) | Interactive table |
| mo.hstack([...]) | Horizontal layout |
| mo.vstack([...]) | Vertical layout |
| mo.sql(f"SELECT ...") | SQL query |
| mo.stop(condition) | Conditionally stop execution |
| Topic | Reference File |
|-------|---------------|
| Installation & Setup | ./references/quickstart.md |
| CLI Commands | ./references/quickstart.md |
| Reactive Execution | ./references/reactivity.md |
| Cell Dataflow | ./references/reactivity.md |
| Validation Patterns | ./references/validation-patterns.md |
| Transform-Validate Pairs | ./references/validation-patterns.md |
| Data Quality Checkpoints | ./references/validation-patterns.md |
| Sliders & Inputs | ./references/ui-elements.md |
| Tables & Forms | ./references/ui-elements.md |
| SQL Cells | ./references/sql-data.md |
| DataFrames | ./references/sql-data.md |
| Plotting | ./references/sql-data.md |
| Markdown | ./references/outputs-layouts.md |
| Layouts | ./references/outputs-layouts.md |
| Apps & Scripts | ./references/apps-deployment.md |
| Export & Deploy | ./references/apps-deployment.md |
| Common Errors | ./references/gotchas.md |
| Best Practices | ./references/gotchas.md |
When this library is used as a primary analytical tool, include in the report's Software & Tools references:
marimo team. marimo: Reactive Python notebook [Computer software]. https://marimo.io/
Cite when: The analysis notebook is delivered as a marimo notebook (typically always true in DAAF pipelines). Do not cite when: marimo is not used for the analysis delivery format.
tools
Recommend AND run open-source AI tools, agents, Claude Code / Codex skills, and MCP servers for any stage of a literature review — searching, reading, extracting, synthesizing, screening, citation-checking, and paper writing. Use when the user asks "what tool should I use to..." OR "install/run/use <tool> to ..." for research/lit-review work: automating a survey or related-work section, PDF→Markdown extraction for LLMs (MinerU/marker/docling), PRISMA / systematic review (ASReview), citation-backed Q&A over PDFs (PaperQA2), wiring papers into Claude/Cursor via MCP (arxiv/paper-search/zotero servers), or chatting with a Zotero library. Ships a launcher (scripts/litrun.py) that installs each tool in an isolated venv and runs it. Curated catalog of 70+ vetted projects. 支持中英文(用于「文献综述工具选型」与「一键安装/运行」)。
development
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
documentation
Use when the project collects primary data or runs a field, lab, or survey experiment, before the intervention begins — write the pre-analysis plan, size the sample from a power calculation, and register with the AEA RCT Registry. Apply after the design is chosen in aer-identification and before any outcome data are seen.
tools
Guide economists to authoritative data sources with explicit, confirmed data specifications before retrieval; interfaces with Playwright MCP to navigate portals and extract real data, not articles about data.