Agent skill

Marimo Pair Vscode

by marimo-team in marimo-team/marimo-lsp

Drive a live marimo notebook in VS Code as a workspace: run Python in the same kernel the user does, inspect and explore live notebook state and data, prototype and debug code, and commit durable…

Apache-2.0Auto-check passedData & Analytics

Install Marimo Pair Vscode

skills CLI
$ npx skills add marimo-team/marimo-lsp --skill marimo-pair-vscode -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install marimo-team/marimo-lsp marimo-pair-vscode --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/marimo-team/marimo-lsp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/extension/skills/marimo-pair-vscode .claude/skills/marimo-pair-vscode && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
marimo-pair-vscode
GitHub stars
130
Token cost
~2.7k tokens
SKILL.md length
1,313 words
Files
4
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

Drive a live marimo notebook in VS Code as a workspace: run Python in the same kernel the user does, inspect and explore live notebook state and data, prototype and debug code, and commit durable…

  • Working with a marimo notebook open in VS Codes notebook editor with an active kernel — running code
  • SKILL.md covers Connect to a Notebook, Scratchpad Scope, Marimo Rules and The Notebook's Shape, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Inspecting variables

What it does

Marimo Pair Vscode is an agent skill from marimo-team/marimo-lsp. Drive a live marimo notebook in VS Code as a workspace: run Python in the same kernel the user does, inspect and explore live notebook state and data, prototype and debug code, and commit durable notebook changes (cells, values, packages). Use whenever working with a marimo notebook open in VS Code's notebook editor with an active kernel — running code, inspecting variables, exploring data, debugging, or editing and running cells — not only when explicitly "pairing" or starting a session.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files (for example `reference/gotchas.md`, `reference/notebook-improvements.md` and `reference/rich-representations.md`).

It sits in Data & Analytics, covering Jupyter notebooks. It works with marimo, Visual Studio Code and Python. The repository describes itself as: A language server and VS Code extension for marimo. The licence is Apache-2.0.

When your agent uses it

  • Working with a marimo notebook open in VS Codes notebook editor with an active kernel — running code
  • Inspecting variables
  • Editing and running cells — not only when explicitly pairing
  • Starting a session

Example prompts

  • “pairing”
  • “/marimo-pair-vscode”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 7b772f3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Marimo Pair Vscode loads about 2.7k tokens when it runs. Until then it costs about 128 tokens; SKILL.md has 1,313 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~128
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from marimo-team/marimo-lsp at commit 7b772f3, republished under its Apache-2.0 licence (© marimo-team). 1,313 words, ~2,709 tokens.

Download SKILL.mdSave it as .claude/skills/marimo-pair-vscode/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
marimo-pair-vscode
description
Drive a live marimo notebook in VS Code as a workspace: run Python in the same kernel the user does, inspect and explore live notebook state and data, prototype and debug code, and commit durable notebook changes (cells, values, packages). Use whenever working with a marimo notebook open in VS Code's notebook editor with an active kernel — running code, inspecting variables, exploring data, debugging, or editing and running cells — not only when explicitly "pairing" or starting a session.

marimo is a reactive Python runtime for building reproducible Python programs (marimo notebooks). Cells are connected by the variables they define and reference. Running a cell re-executes dependents in dataflow order. The active runtime holds the kernel namespace, cell state, and dataflow graph. The notebook (.py file) is the artifact the kernel writes from that state while a session is running.

A user interacts with the same runtime via a notebook UI with cells, outputs, and widgets.

WARNING. The active runtime is the source of truth. While the user is pairing on an open notebook, you SHOULD NOT modify the associated .py file directly, and you SHOULD NOT use VS Code's NotebookEdit to change cells. File edits WILL NOT reach the active kernel or user, and the kernel may overwrite them on save; NotebookEdit bypasses the kernel's dataflow graph. Use marimo._code_mode (cm) for all notebook changes. Reading disk is fine, but prefer ctx.cells[...].code for current cell code.

WARNING. Every notebook edit goes through code mode — no exceptions. When the user asks you to change the notebook (add, edit, delete, or run a cell; rename; change a value or a package), you MUST make that change through marimo._code_mode (cm). DO NOT edit the notebook .py file with Edit or Write, and DO NOT use VS Code's notebook-editing tools (NotebookEdit) — those bypass the live kernel, never reach the user's running session, and get clobbered when the kernel saves. Running ad-hoc Python with marimo_executeCode to explore or test is fine; persisting any change to the notebook is only ever done via cm.

Connect to a Notebook

The notebook is already open in VS Code, and the extension manages its kernel. Run Python in that kernel with the marimo_executeCode tool, passing the notebookUri of the notebook the user is working in (VS Code provides the active notebook as context; if several are open or you are unsure which one, ask rather than guessing). The tool runs your code in the scratchpad — see below.

Scratchpad Scope

marimo_executeCode evaluates Python in marimo's scratchpad: a temporary namespace with a shallow copy of the kernel globals. Notebook variables are available by name, but new top-level bindings and rebindings are discarded after each call. In-place mutations to notebook-owned objects can persist because those names still reference live objects.

Each call reports stdout and stderr from the scratchpad, plus console output from notebook cells it causes to run, including reactive descendants.

Ordinary Python

Use ordinary Python in the scratchpad to inspect variables, sample data, test transformations, probe APIs, check imports, and read widget state.

python
print(df.head())

x = 10
print(x)

Here df comes from notebook globals, while x is a scratchpad-local binding. x exists for this call only and WILL NOT be added to notebook globals.

Persist with cm

Top-level scratchpad assignments and rebindings are temporary. To persist work, including new variables, you MUST submit changes through marimo._code_mode (cm).

marimo._code_mode is a PRIVATE, UNSTABLE agent API (note the leading underscore). It exists for tools like this skill to drive a live kernel from the scratchpad. DO NOT import it from notebook cells, library code, or anything a user would run — methods can change or disappear across marimo versions and kernels. Treat every import marimo._code_mode as cm as scratchpad-only.

At session start, inspect what cm exposes in the active kernel:

python
import marimo._code_mode as cm

help(cm)

Open a code-mode context to queue notebook changes.

python
import marimo._code_mode as cm

async with cm.get_context() as ctx:
    cid = ctx.create_cell("x = df.head()")
    ctx.run_cell(cid)

The scratchpad supports top-level async code. Use async with directly; wrapping it in asyncio.run(...) is unnecessary and can conflict with the kernel's event loop.

After this block exits and the new cell runs, x is notebook state. Later scratchpad calls can read x by name. Code later in the same scratchpad call should read ctx.globals["x"], because the scratchpad namespace was copied before the cell ran.

Inside the context, queued mutation methods are synchronous. Call them directly; do not await them. Each call queues an operation for marimo to apply when the context exits normally. If the block raises, the queue is discarded.

On clean exit, marimo applies packages, validates and applies structural cell changes, runs queued cells, then may run dependents. Validation is only structural since queued cell runs can still error. create_cell and edit_cell change notebook structure only. Use run_cell to execute.

create_cell currently defaults to hide_code=True, which collapses the code editor in the UI. Pass hide_code=False if the user wants created cells to be visible without manually expanding them.

Marimo Rules

marimo imposes a small contract on notebook code so it can keep the notebook as a directed acyclic graph (DAG):

  • No cycles - cells cannot depend on each other in a cycle.
  • No public redefinitions across cells - each name has one owning cell.
  • No wildcard imports - import * prevents static analysis of definitions.

These rules keep the kernel, UI, and saved artifact consistent.

When cm submits a cell body, marimo parses its top-level definitions and references. A top-level name enters the graph unless it is private with a leading underscore.

python
# Public definitions: values, total, i, value, mean
values = np.array([1, 2, 3])
total = 0
for i, value in enumerate(values):
    total += value
mean = total / len(values)
mean
python
# Public definition: mean
_values = np.array([1, 2, 3])
_total = 0
for _i, _value in enumerate(_values):
    _total += _value
mean = _total / len(_values)
mean

Use private names for intermediates that no other cell should read. Public names define the notebook-level dataflow. If a cm edit violates the contract, marimo rejects the structural change and returns the validation error.

Show full SKILL.md (467 more words)Show less

The Notebook's Shape

A notebook is an ordered collection of cells. ctx.cells is the document view and ctx.graph is the dataflow view.

python
for cell in ctx.cells:
    cell  # .id, .code, .name, .config, .status, .errors

ctx.cells["setup"]  # by name
ctx.cells[0]  # by position
list(ctx.cells.keys())  # all IDs, in notebook order

Cell IDs are opaque strings which can be queried from the notebook or captured from cm return values:

python
cid = ctx.create_cell("df = pd.read_csv('data.csv')")
print(cid)  # e.g. 'Hbol'

Alternatively, cells can be assigned and referenced by name. The graph can be used to understand its role in the dataflow.

python
for cid, impl in ctx.graph.cells.items():
    impl  # .defs, .refs   (sets of public names)

ctx.graph.descendants(cid)  # cells that re-run when this one changes
ctx.graph.ancestors(cid)  # cells this one depends on

In marimo, deletes are destructive so it can be useful to query the descendants prior to deleting to understand it's impact.

Writing Notebook Changes

The graph contract keeps marimo able to run and save the notebook. Passing those checks alone does not guarantee a useful artifact. Committed cells should still be readable, rerunnable, and editable.

Make durable edits that reuse the notebook's existing names, imports, dependencies, and UI model. Don't be lazy. Avoid one-off workarounds that pass cm validation but leave a brittle notebook.

Cell Bodies

Submit the code that belongs in the cell.

  • Submit cell contents - create_cell and edit_cell take cell contents, not saved-file @app.cell wrappers.
  • Read before replacing - for now, another editor may change a cell between scratchpad calls. Before edit_cell, read the current body from ctx.cells[...] and submit the full replacement.
  • Reuse notebook imports - if np already exists, use it or edit the owning import cell. DO NOT add import numpy as _np just to bypass the graph.
  • Define public names intentionally - use public names for values later cells should reference. Use private _name bindings or function locals for same-cell intermediates.
  • Define each public name once - a public name has one owning cell. Reassigning it in another cell fails with Multiply-defined names; edit the owning cell or give the result a new name. See gotchas.md.
  • Run cells deliberately - create_cell and edit_cell change structure only. Queue ctx.run_cell(...) when the cell should execute.
Prefer cm-Managed Changes

Use cm APIs when they exist. Avoid direct file edits, shell package commands, and scratchpad-only state for changes that should persist.

  • Do not edit the .py artifact - DO NOT use Edit, Write, or NotebookEdit on the notebook file during a live session. Use ctx.edit_cell(...) even for small changes.
  • Manage packages through cm - use ctx.packages.add() or ctx.packages.remove() instead of direct uv or pip; confirm non-obvious dependency changes.
  • Avoid transient paths - persisted cells should not depend on /tmp/... unless the work is intentionally transient.
  • Delete deliberately - deleting a cell removes globals it defines. Reuse empty cells when convenient and delete cells left empty after edits.
UI and Widgets

Inspect the object before changing it. Different UI objects update through different paths.

  • Set mo.ui.* through cm - use ctx.set_ui_value(element, value) inside cm.get_context().
  • Set anywidget traitlets directly - synced traitlets are Python attributes, for example widget.value = 5.

For designing custom visual or interactive output, see rich-representations.md.

References

© marimo-team, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files in extension/skills/marimo-pair-vscode of marimo-team/marimo-lsp.

  • SKILL.md
  • reference/gotchas.md
  • reference/notebook-improvements.md
  • reference/rich-representations.md

Open the folder on GitHubat commit 7b772f3

Compare with similar skills

Marimo Pair Vscode next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Marimo Pair Vscode compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Marimo Pair Vscode this skillmarimo-team/marimo-lsp130—~2.7kAutomated safety check: PassApache-2.0
Wasm Compatibilityericmjl/llamabot1822 repos~1.6kAutomated safety check: PassNone
Marimo Paircosanlab/nltools1311 repos~3kAutomated safety check: PassMIT
Marimo Notebookcosanlab/nltools1314 repos~2.1kAutomated safety check: PassMIT
Marimo PairPhySpace/SimpleCADAPI141—~3kAutomated safety check: PassApache-2.0
Marimobrycewang-stanford/Auto-Empirical-Research-Skills4.5k—~2.8kAutomated safety check: PassCustom licence

Similar skills

  • Wasm Compatibility

    ericmjl/llamabot

    Check if a marimo notebook is compatible with WebAssembly (WASM) and report any issues.

    182 GitHub starsUsed in 2 repos~1.6k tokens
    Data & AnalyticsAuto-check passed
  • Marimo Pair

    cosanlab/nltools

    Work inside a running marimo notebook's kernel — execute code, create cells, and build a notebook as an artifact.

    131 GitHub starsUsed in 1 repo~3k tokens
    Data & AnalyticsAuto-check passed
  • Marimo Notebook

    cosanlab/nltools

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

    131 GitHub starsUsed in 4 repos~2.1k tokens
    Data & AnalyticsAuto-check passed
  • Marimo Pair

    PhySpace/SimpleCADAPI

    Drive a live marimo notebook as a workspace: run Python in the same kernel the user does, inspect live notebook state, and commit durable notebook changes.

    141 GitHub stars~3k tokensUpdated 5 days ago
    Data & AnalyticsAuto-check passed
  • Marimo

    brycewang-stanford/Auto-Empirical-Research-Skills

    Reactive Python notebook system. An agent skill from brycewang-stanford/Auto-Empirical-Research-Skills.

    4.5k GitHub stars~2.8k tokensUpdated 2 days ago
    Data & AnalyticsAuto-check passed
  • Marimo Notebook

    minicoohei/ai-agent-camp

    marimo ノートブックを正しいフォーマットでPythonファイルに作成するスキル. An agent skill from minicoohei/ai-agent-camp.

    347 GitHub stars~1.5k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed

Questions about Marimo Pair Vscode

What does Marimo Pair Vscode do?

Drive a live marimo notebook in VS Code as a workspace: run Python in the same kernel the user does, inspect and explore live notebook state and data, prototype and debug code, and commit durable…. Marimo Pair Vscode is an agent skill from marimo-team/marimo-lsp. Drive a live marimo notebook in VS Code as a workspace: run Python in the same kernel the user does, inspect and explore live notebook state and data, prototype and debug code, and commit durable notebook changes (cells, values, packages).

When should I use Marimo Pair Vscode?

Marimo Pair Vscode fits situations like: working with a marimo notebook open in VS Codes notebook editor with an active kernel — running code; inspecting variables; editing and running cells — not only when explicitly pairing; starting a session.

How do I install Marimo Pair Vscode in Claude Code?

Run `npx skills add marimo-team/marimo-lsp --skill marimo-pair-vscode -a claude-code`. Or copy the skill folder (extension/skills/marimo-pair-vscode in marimo-team/marimo-lsp) into .claude/skills/marimo-pair-vscode in your project. Claude Code loads it when a task matches its description.

How do I install Marimo Pair Vscode in Codex?

Run `npx skills add marimo-team/marimo-lsp --skill marimo-pair-vscode -a codex`. Or copy the skill folder (extension/skills/marimo-pair-vscode in marimo-team/marimo-lsp) into .agents/skills/marimo-pair-vscode in your project. Codex loads it when a task matches its description.

Can I use Marimo Pair Vscode in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add marimo-team/marimo-lsp --skill marimo-pair-vscode -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/marimo-pair-vscode, .gemini/skills/marimo-pair-vscode, .github/skills/marimo-pair-vscode and .opencode/skills/marimo-pair-vscode in your project.

What does Marimo Pair Vscode need to run?

SKILL.md names no scripts, command-line tools or credentials: Marimo Pair Vscode is instructions for the agent only. Our summary lists: Python 3.

Does Marimo Pair Vscode access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Marimo Pair Vscode safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Marimo Pair Vscode use?

Marimo Pair Vscode is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Marimo Pair Vscode use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Marimo Pair Vscode?

Skills that share tags, products or a category with Marimo Pair Vscode: Wasm Compatibility (ericmjl/llamabot, 182 stars), Marimo Pair (cosanlab/nltools, 131 stars), Marimo Notebook (cosanlab/nltools, 131 stars) and Marimo Pair (PhySpace/SimpleCADAPI, 141 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Marimo Pair Vscode?

marimo-team (a GitHub organization) maintains it in marimo-team/marimo-lsp, which has 130 GitHub stars. The repository was last updated on October 6, 2026.

Source: marimo-team/marimo-lsp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.