Agent skill
marimo-compact
Compact marimo notebook patterns. Reactive cells, UI elements, data visualization.
Install this agent skill to your Project
npx add-skill https://github.com/CodingKaiser/kaiser-skills/tree/main/marimo
SKILL.md
Marimo Essentials
Cell Structure
@app.cell
def _():
import marimo as mo
return
@app.cell
def _():
slider = mo.ui.slider(0, 100, value=50, label="Value")
slider # Display it
return
@app.cell
def _():
result = slider.value * 2 # Reactive: re-runs when slider changes
mo.md(f"Result: {result}")
return
Reactivity Rules
- Variables auto-propagate: changing
xre-runs cells usingx - No redeclaration: each variable defined once across all cells
- UI
.valuein separate cell from definition _var= cell-local variable- Last expression displays automatically
Common UI Elements
mo.ui.slider(start, stop, value=None, label=None)
mo.ui.dropdown(options, value=None, label=None)
mo.ui.text(value="", label=None)
mo.ui.checkbox(label="", value=False)
mo.ui.button(value=None, kind="primary")
mo.ui.table(data, sortable=True, filterable=True)
mo.ui.dataframe(df) # Editable
mo.ui.data_explorer(df) # Interactive explorer
mo.ui.form(element, label="") # Wrap in form
Layouts
mo.md("# Title") # Markdown
mo.hstack([a, b, c]) # Horizontal
mo.vstack([top, mid, bot]) # Vertical
mo.tabs({"Tab 1": content1, "Tab 2": content2})
mo.accordion({"Section": content})
Data & SQL
# DataFrames display automatically
import polars as pl
df = pl.read_csv("data.csv")
df # Shows as table
# SQL with DuckDB
result = mo.sql(f"SELECT * FROM df WHERE x > 100")
Visualization
- matplotlib:
plt.gca()as last expression (notplt.show()) - plotly: return figure object directly
- altair: return chart object; accepts polars DataFrames
Control Flow
mo.stop(condition, mo.md("Stopped")) # Stop cell execution
mo.output.replace(content) # Replace output
Pitfalls to Avoid
- Circular dependencies between cells
- Accessing
.valuein same cell as UI definition - Using
globalkeyword - Not returning visualization object as last expression
CLI
marimo edit notebook.py # Edit
marimo run notebook.py # Run as app
marimo check --fix # Fix formatting issues
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
bookdown
Cross-referencing in R Markdown documents using bookdown. Use when creating Rmd files that need references to figures, tables, equations, or sections. Triggers on requests for academic reports, technical documents, or any R Markdown with numbered cross-references.
general-agentic
snakemake-compact
Compact Snakemake workflow patterns. Keep rules short, complex logic in Python modules.
plotly
Plotly visualization patterns for statistical and scientific charts. Use when creating interactive visualizations, statistical plots (scatter, box, violin, heatmaps), UpSet plots for set intersections, network graphs, or exporting figures to HTML/PNG/PDF/SVG formats. Covers both Plotly Express (high-level) and Graph Objects (low-level) APIs.
python-cli-patterns
CLI application patterns for Python. Triggers on: cli, command line, typer, click, argparse, terminal, rich, console, terminal ui.
r-development
Modern R development practices emphasizing tidyverse patterns (dplyr 1.1 and later, native pipe, join_by, .by grouping), rlang metaprogramming, performance optimization, and package development. Use when you needs to write R code, create R packages, optimize R performance, or provide R programming guidance.
Didn't find tool you were looking for?