Output format·Data Science & ML

marimo Notebook

Write a marimo notebook in a Python file in the right format.

You say
Buy it · $29 Read it before you buy $29 Written by marimo-team · unverified publisher
Context cost
9.5k tokensestimated from the bundle, loaded when it triggers
Bundle
14 files · 38.1 kBtext throughout, nothing executable
Licence
Apache-2.0paid listing
Last change
no release on file
Servers it uses
Noneruns standalone

What it does

Write a marimo notebook in a Python file in the right format.

Installed, it changes the agent in these ways.

What this skill changes about the agent is not written down here yet. The listing was collected from its source, and the description is in its own SKILL.md.

Output format

Produces one artefact, exactly shaped.

marimonotebookspython

The skill itself

This is the whole product. A skill is instructions the model reads, so there is nothing behind the listing you cannot see first — the front matter loads with every session, and the body below it loads when the skill triggers.

SKILL.md8.3 kB · 283 lines
--- name: marimo-notebook description: Write a marimo notebook in a Python file in the right format. ---
6# Notes for marimo Notebooks
7
8marimo uses Python to create notebooks, unlike Jupyter which uses JSON. Here's an example notebook:
9
10```python
11# /// script
12# dependencies = [
13# "marimo",
14# "numpy==2.4.3",
15# ]
16# requires-python = ">=3.14"
17# ///
18
19import marimo
20
21__generated_with = "0.20.4"
22app = marimo.App(width="medium")
23
24
25@app.cell
26def _():
27 import marimo as mo
28 import numpy as np
29
30 return mo, np
31
32
33@app.cell
34def _():
35 print("hello world")
36 return
37
38
39@app.cell
40def _(np, slider):
41 np.array([1,2,3]) + slider.value
42 return
43
44
45@app.cell
46def _(mo):
47 slider = mo.ui.slider(1, 10, 1, label="number to add")
48 slider
49 return (slider,)
50
51
52@app.cell
53def _():
54 return
55
56
57if __name__ == "__main__":
58 app.run()
59
60```
61
62Notice how the notebook is structured with functions can represent cell contents. Each cell is defined with the @app.cell decorator and the inputs/outputs of the function are the inputs/outputs of the cell. marimo usually takes care of the dependencies between cells automatically.
63
64## Running Marimo Notebooks
65
66```bash
67# Run as script (non-interactive, for testing)
68uv run <notebook.py>
69
70# Run interactively in browser
71uv run marimo run <notebook.py>
72
73# Edit interactively
74uv run marimo edit <notebook.py>
75```
76
77## Script Mode Detection
78
79Use mo.app_meta().mode == "script" to detect CLI vs interactive:
80
81```python
82@app.cell
83def _(mo):
84 is_script_mode = mo.app_meta().mode == "script"
85 return (is_script_mode,)
86```
87
88## Key Principle: Keep It Simple
89
90**Show all UI elements always.** Only change the data source in script mode.
91
92- Sliders, buttons, widgets should always be created and displayed
93- In script mode, just use synthetic/default data instead of waiting for user input
94- Don't wrap everything in if not is_script_mode conditionals
95- Don't use try/except for normal control flow
96
97### Good Pattern
98
99```python
100# Always show the widget
101@app.cell
102def _(ScatterWidget, mo):
103 scatter_widget = mo.ui.anywidget(ScatterWidget())
104 scatter_widget
105 return (scatter_widget,)
106
107# Only change data source based on mode
108@app.cell
109def _(is_script_mode, make_moons, scatter_widget, np, torch):
110 if is_script_mode:
111 # Use synthetic data for testing
112 X, y = make_moons(n_samples=200, noise=0.2)
113 X_data = torch.tensor(X, dtype=torch.float32)
114 y_data = torch.tensor(y)
115 data_error = None
116 else:
117 # Use widget data in interactive mode
118 X, y = scatter_widget.widget.data_as_X_y
119 # ... process data ...
120 return X_data, y_data, data_error
121
122# Always show sliders - use their .value in both modes
123@app.cell
124def _(mo):
125 lr_slider = mo.ui.slider(start=0.001, stop=0.1, value=0.01)
126 lr_slider
127 return (lr_slider,)
128
129# Auto-run in script mode, wait for button in interactive
130@app.cell
131def _(is_script_mode, train_button, lr_slider, run_training, X_data, y_data):
132 if is_script_mode:
133 # Auto-run with slider defaults
134 results = run_training(X_data, y_data, lr=lr_slider.value)
135 else:
136 # Wait for button click
137 if train_button.value:
138 results = run_training(X_data, y_data, lr=lr_slider.value)
139 return (results,)
140```
141
142## State and Reactivity
143
144Variables between cells define the reactivity of the notebook for 99% of the use-cases out there. No special state management needed. Don't mutate objects across cells (e.g., my_list.append()); create new objects instead. Avoid mo.state() unless you need bidirectional UI sync or accumulated callback state. See [STATE.md](references/STATE.md) for details.
145
146## Don't Guard Cells with if Statements
147
148Marimo's reactivity means cells only run when their dependencies are ready. Don't add unnecessary guards:
149
150```python
151# BAD - the if statement prevents the chart from showing
152@app.cell
153def _(plt, training_results):
154 if training_results: # WRONG - don't do this
155 fig, ax = plt.subplots()
156 ax.plot(training_results['losses'])
157 fig
158 return
159
160# GOOD - let marimo handle the dependency
161@app.cell
162def _(plt, training_results):
163 fig, ax = plt.subplots()
164 ax.plot(training_results['losses'])
165 fig
166 return
167```
168
169The cell won't run until training_results has a value anyway.
170
171## Don't Use try/except for Control Flow
172
173Don't wrap code in try/except blocks unless you're handling a specific, expected exception. Let errors surface naturally.
174
175```python
176# BAD - hiding errors behind try/except
177@app.cell
178def _(scatter_widget, np, torch):
179 try:
180 X, y = scatter_widget.widget.data_as_X_y
181 X = np.array(X, dtype=np.float32)
182 # ...
183 except Exception as e:
184 return None, None, f"Error: {e}"
185
186# GOOD - let it fail if something is wrong
187@app.cell
188def _(scatter_widget, np, torch):
189 X, y = scatter_widget.widget.data_as_X_y
190 X = np.array(X, dtype=np.float32)
191 # ...
192```
193
194Only use try/except when:
195- You're handling a specific, known exception type
196- The exception is expected in normal operation (e.g., file not found)
197- You have a meaningful recovery action
198
199## Cell Output Rendering
200
201Marimo only renders the **final expression** of a cell. Indented or conditional expressions won't render:
202
203```python
204# BAD - indented expression won't render
205@app.cell
206def _(mo, condition):
207 if condition:
208 mo.md("This won't show!") # WRONG - indented
209 return
210
211# GOOD - final expression renders
212@app.cell
213def _(mo, condition):
214 result = mo.md("Shown!") if condition else mo.md("Also shown!")
215 result # This renders because it's the final expression
216 return
217```
218
219## PEP 723 Dependencies
220
221Notebooks created via marimo edit --sandbox have these dependencies added to the top of the file automatically but it is a good practice to make sure these exist when creating a notebook too:
222
223```python
224# /// script
225# requires-python = ">=3.12"
226# dependencies = [
227# "marimo",
228# "torch>=2.0.0",
229# ]
230# ///
231```
232
233## marimo check
234
235When working on a notebook it is important to check if the notebook can run. That's why marimo provides a check command that acts as a linter to find common mistakes.
236
237```bash
238uvx marimo check <notebook.py>
239```
240
241Make sure these are checked before handing a notebook back to the user.
242
243**Important**: you have a tendency to over-do variables with an underscore prefix. You should only apply this to one or two variables at most. Consider creating a new variable instead of prefixing entire cells in marimo.
244
245## api docs
246
247If the user specifically wants you to use a marimo function, you can locally check the docs via:
248
249```
250uv --with marimo run python -c "import marimo as mo; help(mo.ui.form)"
251```
252
253## tests
254
255By default, marimo discovers and executes tests inside your notebook.
256When the optional pytest dependency is present, marimo runs pytest on cells that
257consist exclusively of test code - i.e. functions whose names start with test_.
258If the user asks you to add tests, make sure to add the pytest dependency is added and that
259there is a cell that contains only test code.
260
261For more information on testing with pytest see [PYTEST.md](references/PYTEST.md)
262
263Once tests are added, you can run pytest from the commandline on the notebook to run pytest.
264
265```
266pytest <notebook.py>
267```
268
269## Additional resources
270
271- For marimo notebooks that run in width=columns [SQL.md](references/COLUMNS.md)
272- For SQL use in marimo see [SQL.md](references/SQL.md)
273- For UI elements in marimo [UI.md](references/UI.md)
274- For exposing functions/classes as top level imports [TOP-LEVEL-IMPORTS.md](references/TOP-LEVEL-IMPORTS.md)
275- For exporting notebooks (PDF, HTML, markdown, etc.) [EXPORTS.md](references/EXPORTS.md)
276- For state management and reactivity [STATE.md](references/STATE.md)
277- For deployment of marimo notebooks [DEPLOYMENT.md](references/DEPLOYMENT.md)
278- For custom interactive widgets with anywidget [ANYWIDGET.md](references/ANYWIDGET.md)
279- For external editing and --watch mode [WATCHING.md](references/WATCHING.md)
280- For expensive notebooks (caching, lazy eval, mo.stop) [EXPENSIVE.md](references/EXPENSIVE.md)
281- For configuration (pyproject.toml, marimo.toml) [CONFIGURATION.md](references/CONFIGURATION.md)
282- For reactivity model (DAG, variable scoping, mutations) [REACTIVITY.md](references/REACTIVITY.md)
283
In the file
SKILL.md1,119 words
Files14
LicenceApache-2.0
Why you can read it

Nothing in a skill executes. The client loads the text and the model follows it, so a skill can be audited the way a runbook is — by reading it.

What it costs in context

Skills are not billed by the call. They are paid for in context: every token the instructions occupy is a token your code, your diff and your conversation cannot use. Here is what this one takes and when it takes it.

≈30
always loaded
The name and description, so the model knows the skill exists and when to reach for it.
9,495
on trigger
The instruction body and 13 supporting files, read only when the skill fires.
4.8%
of a 200k window
Ten skills this size would take about 48% of the window before you open a file.
050k100k150k200k context window

9.5k tokens, estimated from the bundle at four bytes to the token, held for the rest of the session once it triggers. Heavy. Teams tend to install this one per project rather than globally, and load it only when the job comes up.

Servers bill, skills cost

A server charges by the month. A skill charges once per session, in context, and then keeps charging it for as long as the session lives.

Before and after

The same question, put to the same model twice: once as it comes, and once with these instructions loaded.

No worked example has been published for this skill yet.

Adoption
Installsnone yet
Ratingno reviews yet

The procedure it runs

The procedure has not been published here. It is in the skill’s own SKILL.md, which its author has not sent to the marketplace yet.

Prose, not code

These steps are written for a model to follow, not executed by a runtime. It can still be told to skip one, and it will say so when it does.

Servers it uses

None. This skill calls no MCP servers at all.

Everything it needs is in the instructions, so it works in a project with nothing connected — the model reads the file and changes how it works with what it can already reach.

It writes no files and reaches no network. All it changes is how the model reasons and writes.

What it asks for
Writes filesno
Network accessno

Read from the allowed-tools line of this skill’s own SKILL.md. A skill grants no permissions of its own — it can only ask for tools your client already has.

What it will not do

Every skill is narrow, and the useful ones say where they stop. These are the jobs this one is the wrong tool for.

What this skill is not for has not been published here. Nothing is implied by that: it is a section the author has not filled in.

What is in the bundle

14 files, 38.1 kB on disk. A bundle is text throughout: the instructions the model reads, plus the templates it fills in.

  • SKILL.md8.3 kB
  • references/ANYWIDGET.md3.8 kB
  • references/COLUMNS.md1.1 kB
  • references/CONFIGURATION.md1.0 kB
  • references/DEPLOYMENT.md1.3 kB
  • references/EXPENSIVE.md1.8 kB
  • references/EXPORTS.md2.3 kB
  • references/PYTEST.md5.3 kB
  • references/REACTIVITY.md1.9 kB
  • references/SQL.md1.6 kB
  • references/STATE.md2.5 kB
  • references/TOP-LEVEL-IMPORTS.md1.7 kB
  • references/UI.md3.8 kB
  • references/WATCHING.md1.7 kB
What is not in it

No dependencies and nothing executable: a skill is text the agent reads, so the bundle is 14 files you can review in full before installing. The Apache-2.0 licence covers the templates and examples as well as the instructions.

Install

Installing copies the bundle into your project. Nothing runs at install time — the files sit on disk until the model reads them.

$29 once
marimo Notebook · Apache-2.0 · marimo-team
one-time
Price$29 once
LicenceApache-2.0 — the author’s, unchanged by this purchase
Paid throughStripe, once, on the card you add at the checkout
Keeps workingfor good — the files are yours once they are on disk
Updatesevery update its author ships, delivered through this account

You can read the whole bundle before paying — the SKILL.md above is the product, not a preview of it. What the money buys is the delivery: the folder packaged and handed to your machine by key, every update its author ships, and our support if it does not do what this listing says. The terms of use are Apache-2.0, set by the author and unchanged by buying it here.

Payment runs through Stripe, on a page like this one rather than a redirect. Once there is an account it joins the same mcprush invoice as everything else you run, so there is never a second card to enter.

Which clients pick it up on their own

A skill is a folder of text. A client with a skills folder reads it without being told; everywhere else the same text works, it is just handed to the model rather than found.

Claude Code.claude/skills/
Claude Desktop
ChatGPT
Cursor.cursor/skills/
VS Code.github/skills/
Codex CLI.agents/skills/
Gemini CLI.gemini/skills/
Grok.grok/skills/
Zed.agents/skills/
Windsurf.windsurf/skills/
Agent SDK.claude/skills/
HTTP / API
This release
Versionnot versioned
Publishedno release date on file
Price$29
Referencemarimo-team/marimo-notebook

Versions

Its author publishes no version number, so there is nothing here to pin to: what you install is the folder as it stands today. Instructions change more often than APIs do — a skill can be rewritten entirely without anything it depends on moving.

v
  • No earlier releases have been published to the marketplace.
Pinning

Nothing to pin to: this skill carries no version number of its own. What you install is what the folder holds on the day you install it.

Reviews

no reviews yet · no installs yet

Nobody has reviewed this skill yet. The rating is the mean of the reviews written here, so there is none until somebody writes the first.

Who can post

Only accounts that have had the skill installed for fourteen days, so a review is written after living with it rather than after reading it. Publishers may reply once.

Who wrote it

MA
marimo-team

Publishes on mcprush.

0 servers listed1 skill listednot claimed
Profile
Publisher
Servers0