npx skills add ...
npx skills add marimo-team/skills --skill add-molab-badge
Add "Open in molab" badge(s) linking to marimo notebooks. Works with READMEs, docs, websites, or any markdown/HTML target.
npx skills add marimo-team/skills --skill add-molab-badge
Add "Open in molab" badge(s) linking to marimo notebooks. The badge can be added to any target: a GitHub README, documentation site, blog post, webpage, or any other markdown/HTML file.
molab previews render much nicer if the github repository has session information around. This can be added via:
This executes notebooks and exports their session snapshots, which molab uses to serve pre-rendered notebooks.
Key flags:
--sandbox — run each notebook in an isolated environment using PEP 723 dependencies--continue-on-error — keep processing other notebooks if one fails--force-overwrite — overwrite all existing snapshots, even if up-to-dateThe user may provide notebook links in one of two ways:
.py files) in the repository. Use Glob with patterns like **/*.py and then check for the marimo header (import marimo or app = marimo.App) to confirm they are marimo notebooks.marimo.app links or existing badges), replace those.For each notebook, construct the molab URL using this format:
{owner}/{repo}: the GitHub owner and repository name. Determine from the git remote (git remote get-url origin), the user-provided URL, or by asking the user.{branch}: typically main. Confirm from the repository's default branch.{path_to_notebook}: the path to the .py notebook file relative to the repository root./wasm suffix rulesmarimo.app link, append /wasm to the molab URL. This is because marimo.app runs notebooks client-side (WASM), so the molab equivalent needs the /wasm suffix to preserve that behavior.marimo.app link), do not append /wasm unless the user explicitly requests it.Use the following markdown badge format:
Where URL is the constructed molab URL (with or without /wasm per the rules above).
For HTML targets, use:
marimo.app URLs with the equivalent molab.marimo.io URLs.https://marimo.io/shield.svg or camo-proxied versions) with https://marimo.io/molab-shield.svg.Open in molab.Replacing a marimo.app badge in a README:
Before:
After:
Note: /wasm is appended because this replaces a marimo.app link.
Adding a new badge from user-provided links:
User says: "Add molab badges for these notebooks: https://github.com/owner/repo/blob/main/demo.py, https://github.com/owner/repo/blob/main/tutorial.py"
Output:
Note: no /wasm suffix by default for new badges.**