ワンクリックで
marimo-notebook
Write a marimo notebook in a Python file in the right format.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Write a marimo notebook in a Python file in the right format.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Create well-structured commits following Conventional Commits spec. Use this skill whenever the user wants to commit, make a commit, stage changes, or write a commit message. Automatically detects jj vs git, groups changed files into logical commits, and formats messages as `type(scope): description`. Trigger on: "commit", "make a commit", "commit my changes", "stage and commit", "write a commit", "commit this", "conventional commit", "split into commits".
Audits a frontend codebase for design token and component extraction opportunities, then produces a structured proposal before touching any code. Use this skill whenever the user says things like "extract my design tokens", "set up a token system", "clean up my CSS variables", "create shared components", "reduce duplication in my UI", "set up a design system", "my components have too much copy-paste", "add a Button component", "standardize my buttons", "add shadcn", "use cva for variants", or asks to refactor repeated UI patterns (nav items, form fields, modals, page headers, buttons, inputs). Works with any frontend stack — React, Vue, Svelte, plain HTML/CSS, Tailwind, CSS Modules, vanilla CSS. Trigger even if the user only mentions one aspect (just tokens OR just components OR just buttons) — the skill handles all and will focus on whichever is relevant.
Jujutsu (jj) version control workflows and GitHub integration. Use when working with jj commands, creating commits with bookmarks, pushing to remote, creating PRs, or when the user mentions "jj", "jujutsu", "bookmark", or version control operations that involve jj instead of git. Also use when encountering jj-specific concepts like changes vs commits, bookmark tracking requirements, or when troubleshooting jj/GitHub integration issues.
Set up oxlint (linting) + oxfmt (formatting) for JavaScript/TypeScript projects. Use when user asks to "migrate to oxlint", "switch to oxc", "use oxfmt", "set up oxlint", or wants to adopt the oxc toolchain for linting and formatting — whether migrating from ESLint, Biome, Prettier, or starting fresh.
Search past Claude Code and Codex sessions. Triggers: /recall, "search old conversations", "find a past session", "recall a previous conversation", "search session history", "what did we discuss", "remember when we"
oRPC client-side patterns for TypeScript frontends using @orpc/contract, @orpc/client, @orpc/openapi-client, and @orpc/tanstack-query. Use when writing or modifying API client code that uses oRPC, adding new API endpoints to an oRPC contract, creating queries or mutations with oRPC + TanStack Query, or migrating from raw fetch to oRPC. Triggers: "add endpoint", "add API call", "oRPC", "contract", "queryOptions", "mutationOptions", "OpenAPILink".
| name | marimo-notebook |
| description | Write a marimo notebook in a Python file in the right format. |
# Run as script (non-interactive, for testing)
uv run <notebook.py>
# Run interactively in browser
uv run marimo run <notebook.py>
# Edit interactively
uv run marimo edit <notebook.py>
Use mo.app_meta().mode == "script" to detect CLI vs interactive:
@app.cell
def _(mo):
is_script_mode = mo.app_meta().mode == "script"
return (is_script_mode,)
Show all UI elements always. Only change the data source in script mode.
if not is_script_mode conditionals# Always show the widget
@app.cell
def _(ScatterWidget, mo):
scatter_widget = mo.ui.anywidget(ScatterWidget())
scatter_widget
return (scatter_widget,)
# Only change data source based on mode
@app.cell
def _(is_script_mode, make_moons, scatter_widget, np, torch):
if is_script_mode:
# Use synthetic data for testing
X, y = make_moons(n_samples=200, noise=0.2)
X_data = torch.tensor(X, dtype=torch.float32)
y_data = torch.tensor(y)
data_error = None
else:
# Use widget data in interactive mode
X, y = scatter_widget.widget.data_as_X_y
# ... process data ...
return X_data, y_data, data_error
# Always show sliders - use their .value in both modes
@app.cell
def _(mo):
lr_slider = mo.ui.slider(start=0.001, stop=0.1, value=0.01)
lr_slider
return (lr_slider,)
# Auto-run in script mode, wait for button in interactive
@app.cell
def _(is_script_mode, train_button, lr_slider, run_training, X_data, y_data):
if is_script_mode:
# Auto-run with slider defaults
results = run_training(X_data, y_data, lr=lr_slider.value)
else:
# Wait for button click
if train_button.value:
results = run_training(X_data, y_data, lr=lr_slider.value)
return (results,)
Variables 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 for details.
if StatementsMarimo's reactivity means cells only run when their dependencies are ready. Don't add unnecessary guards:
# BAD - the if statement prevents the chart from showing
@app.cell
def _(plt, training_results):
if training_results: # WRONG - don't do this
fig, ax = plt.subplots()
ax.plot(training_results['losses'])
fig
return
# GOOD - let marimo handle the dependency
@app.cell
def _(plt, training_results):
fig, ax = plt.subplots()
ax.plot(training_results['losses'])
fig
return
The cell won't run until training_results has a value anyway.
Don't wrap code in try/except blocks unless you're handling a specific, expected exception. Let errors surface naturally.
# BAD - hiding errors behind try/except
@app.cell
def _(scatter_widget, np, torch):
try:
X, y = scatter_widget.widget.data_as_X_y
X = np.array(X, dtype=np.float32)
# ...
except Exception as e:
return None, None, f"Error: {e}"
# GOOD - let it fail if something is wrong
@app.cell
def _(scatter_widget, np, torch):
X, y = scatter_widget.widget.data_as_X_y
X = np.array(X, dtype=np.float32)
# ...
Only use try/except when:
Marimo only renders the final expression of a cell. Indented or conditional expressions won't render:
# BAD - indented expression won't render
@app.cell
def _(mo, condition):
if condition:
mo.md("This won't show!") # WRONG - indented
return
# GOOD - final expression renders
@app.cell
def _(mo, condition):
result = mo.md("Shown!") if condition else mo.md("Also shown!")
result # This renders because it's the final expression
return
Variables in for loops that would conflict across cells need underscore prefix:
# Use _name, _model to make them cell-private
for _name, _model in items:
...
Notebooks 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:
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "marimo",
# "torch>=2.0.0",
# ]
# ///
When 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.
uvx marimo check <notebook.py>
Make sure these are checked before handing a notebook back to the user.
If the user specifically wants you to use a marimo function, you can locally check the docs via:
uv --with marimo run python -c "import marimo as mo; help(mo.ui.form)"