agentleFS
febshhyfebshhy/mimir-codex/.agents/skills/marimo-notebooks/SKILL.md

marimo-notebooks

Skill0 starsChanged 5 days agoMITArchived repositoryView on GitHub

Create, edit, review, compose, test and export analytical, data engineering and ML notebooks using Marimo Python source only. Never directly create or edit .ipynb files. Use Marimo to generate Jupyter exports; combine multiple Marimo sources into a generated Marimo Python composition before exporting a single .ipynb.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write only Marimo source: Use marimo edit notebooks/marimo/analysis.py or maintain the same @app.cell structure in a text editor.

    line 15
  2. Distinctive:

    Keep the dependency graph sound: No cross-cell mutable hidden state, duplicate globals, circular cell dependencies, wildcard imports or …

    line 16
  3. Very specific:

    Verify source and claims: Run marimo check path/to/notebook.py.

    line 18
  4. Very specific:

    Export only through Marimo: Use python scripts/mimir-notebooks export --source notebooks/marimo/analysis.py --output …

    line 19

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Marimo notebooks — Python source → validated computation → generated Jupyter

Non-negotiable: The only editable notebook source is a Marimo .py notebook (import marimo, app = marimo.App(...), @app.cell). Never hand-author, patch, rewrite, merge, or manipulate .ipynb JSON, whether in an editor, with nbformat, or with scripts. .ipynb is a generated, disposable delivery artifact, created only by marimo export ipynb. On review, fix the Marimo .py and regenerate. Read an existing Jupyter file for migration only; marimo convert existing.ipynb -o notebook.py is the approved one-time input conversion.

Why: Marimo tracks cell dependencies, rejects conflicting global definitions and cycles, and stores notebook source as reviewable Python. Jupyter export is for recipients who need .ipynb; it does not retain Marimo's reactive execution model. Read authoring, composition/export, and role-specific quality selectively.

Mandatory workflow (scale checks to risk)

  1. Define a notebook contract. Audience, question/decision, expected outputs, data sources, source grain, as-of period, privacy constraints, reproducibility target, resource/time budget, and acceptance checks. Mark real-data access and unknowns.
  2. Write only Marimo source. Use marimo edit notebooks/marimo/analysis.py or maintain the same @app.cell structure in a text editor. Put reusable transformations in normal Python modules; one cell should have one intelligible purpose. Keep sources under version control.
  3. Keep the dependency graph sound. No cross-cell mutable hidden state, duplicate globals, circular cell dependencies, wildcard imports or import-time production writes. Use deterministic functions, explicit data and configuration, named time zones, seeded randomness when needed, and time-aware splits for ML.
  4. Separate exploration from production effects. Analytical and ML notebooks should be read-only by default. Restrict large queries, network calls, materializations, retraining, filesystem writes and deployment to explicit, reviewed entry points. Reactive re-execution must not accidentally repeat side effects.
  5. Verify source and claims. Run marimo check path/to/notebook.py. When safe and dependencies are available, execute with representative fixtures and verify numerical results, SQL grain/fanout, nulls, time boundaries, feature leakage and measured performance. Do not claim runtime success from linting alone.
  6. Export only through Marimo. Use python scripts/mimir-notebooks export --source notebooks/marimo/analysis.py --output notebooks/generated/analysis.ipynb (or the documented marimo export ipynb command). For a single combined notebook from several Marimo files, use a reviewed ordered manifest and python scripts/mimir-notebooks bundle --manifest notebooks/collection.json. This builds a generated Marimo .py composition first and then calls Marimo's exporter.
  7. Verify generated artifacts. python scripts/mimir-notebooks verify --manifest notebooks/collection.json re-exports from source and checks the existing .ipynb. Run python scripts/mimir-notebooks audit --root notebooks to reject unregistered .ipynb files and verify all manifest-managed exports before release. Single-file export is for ad hoc handoff; register committed artifacts in an ordered manifest (even for one source) to pass audit. If verification fails, change the Marimo source, not the export. Keep __marimo__/, .build/, credentials and large derived data out of commits as appropriate; committing generated .ipynb is optional, with regeneration checks if committed.
  8. Communicate limits. Record dependency versions, as-of data, uncertainty, whether cells were actually executed, and differences in widgets/behaviors between Marimo and exported Jupyter. For downstream models or dashboards, pair with $data-decision-science, $data-statistics, $advanced-sql, $data-lifecycle, $data-storytelling and $testing as needed.

Composition limits: Mimir's composer accepts standard Marimo Python modules with top-level @app.cell functions. It preserves cell source, ordering and references; it refuses unsupported top-level code, duplicate global outputs or colliding named cells, except for a repeat of the identical standard import marimo as mo cell. Do not treat composition as module isolation or automatic namespace resolution. For independent reports that cannot compose safely, export them separately rather than silently altering code.

Deliverable contract: .py source files and ordered manifest (when combining); generated .ipynb path; actual checks and execution evidence; assumptions, data freshness, and export/portability limitations. Never report an .ipynb as manually edited or use it as the new source of truth.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.