Marimo

by hydrosolutions

data

Create reactive marimo notebooks for data analysis and visualization. Use when the user asks to create a marimo notebook, work with reactive notebooks, or build interactive data visualizations. User-invocable with /marimo command.

Skill Details

Repository Files

3 files in this skill directory


name: marimo description: Create reactive marimo notebooks for data analysis and visualization. Use when the user asks to create a marimo notebook, work with reactive notebooks, or build interactive data visualizations. User-invocable with /marimo command. user_invocable: /marimo

Marimo Notebooks

Marimo is a reactive notebook framework. Key differences from Jupyter:

  • Reactive: Cells auto-execute when dependencies change
  • No redeclaration: Variables cannot be redeclared across cells
  • DAG structure: Notebook forms a directed acyclic graph
  • Auto-display: Last expression in a cell is displayed automatically

Cell Structure

@app.cell
def _():
    # your code here
    return

Marimo handles function parameters and return statements based on variable dependencies.

Code Requirements

  1. All code must be complete and runnable
  2. Import all modules in the first cell, always including import marimo as mo
  3. Never redeclare variables across cells
  4. Ensure no cycles in the dependency graph
  5. Never use global definitions
  6. No comments in markdown or SQL cells

Reactivity Rules

  • UI element values accessed via .value (e.g., slider.value)
  • UI values cannot be accessed in the same cell where defined
  • Underscore-prefixed variables (e.g., _my_var) are cell-local

Quick Reference

Task Pattern
Markdown mo.md("# Title")
Matplotlib Use plt.gca() as last expression
Plotly/Altair Return figure/chart object directly
SQL (DuckDB) df = mo.sql(f"SELECT * FROM table")
Layout mo.hstack([a, b]), mo.vstack([a, b]), mo.tabs({...})
Stop execution mo.stop(condition, output)

Troubleshooting

Issue Solution
Circular dependencies Reorganize code to remove cycles
UI value access error Move value access to separate cell from definition
Viz not showing Ensure viz object is last expression

Run marimo check --fix to catch and fix common issues.

Creating a Notebook

Use scripts/create_notebook.py to generate a starter notebook:

uv run scripts/create_notebook.py my_analysis -o notebooks/

Resources

Related Skills

Xlsx

Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas

data

Clickhouse Io

ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.

datacli

Clickhouse Io

ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.

datacli

Analyzing Financial Statements

This skill calculates key financial ratios and metrics from financial statement data for investment analysis

data

Data Storytelling

Transform data into compelling narratives using visualization, context, and persuasive structure. Use when presenting analytics to stakeholders, creating data reports, or building executive presentations.

data

Kpi Dashboard Design

Design effective KPI dashboards with metrics selection, visualization best practices, and real-time monitoring patterns. Use when building business dashboards, selecting metrics, or designing data visualization layouts.

designdata

Dbt Transformation Patterns

Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.

testingdocumenttool

Sql Optimization Patterns

Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.

designdata

Anndata

This skill should be used when working with annotated data matrices in Python, particularly for single-cell genomics analysis, managing experimental measurements with metadata, or handling large-scale biological datasets. Use when tasks involve AnnData objects, h5ad files, single-cell RNA-seq data, or integration with scanpy/scverse tools.

arttooldata

Xlsx

Spreadsheet toolkit (.xlsx/.csv). Create/edit with formulas/formatting, analyze data, visualization, recalculate formulas, for spreadsheet processing and analysis.

tooldata

Skill Information

Category:Data
Last Updated:1/7/2026