From openhands-skills
Reads, modifies, executes, and converts Jupyter notebooks (.ipynb) programmatically. Use for data science workflows: edit cells, clear outputs, convert formats.
npx claudepluginhub openhands/extensionsThis skill uses the workspace's default tool permissions.
Notebooks are JSON files. Cells are in `nb['cells']`, each has `source` (list of strings) and `cell_type` ('code', 'markdown', or 'raw').
Creates and edits reproducible Jupyter notebooks (.ipynb) for experiments, explorations, or tutorials using templates and helper script to avoid JSON errors.
Use when working with jupytext — converting notebooks to/from text formats, syncing paired .ipynb/.py files, multi-kernel projects (Python/R/Stata/SAS), or executing notebooks via papermill.
Interacts with a live local Jupyter notebook kernel for Jupyter-like in-memory REPL, notebook inspection/editing with persistent kernel, and explicit verification passes.
Share bugs, ideas, or general feedback.
Notebooks are JSON files. Cells are in nb['cells'], each has source (list of strings) and cell_type ('code', 'markdown', or 'raw').
import json
with open('notebook.ipynb') as f:
nb = json.load(f)
# Modify nb['cells'][i]['source'], then:
with open('notebook.ipynb', 'w') as f:
json.dump(nb, f, indent=1)
jupyter nbconvert --to notebook --execute --inplace notebook.ipynb # Execute in place
jupyter nbconvert --to html notebook.ipynb # Convert to HTML
jupyter nbconvert --to script notebook.ipynb # Convert to Python
jupyter nbconvert --to markdown notebook.ipynb # Convert to Markdown
grep -n "search_term" notebook.ipynb
# Code cell
{"cell_type": "code", "execution_count": None, "metadata": {}, "outputs": [], "source": ["code\n"]}
# Markdown cell
{"cell_type": "markdown", "metadata": {}, "source": ["# Title\n"]}
for cell in nb['cells']:
if cell['cell_type'] == 'code':
cell['outputs'] = []
cell['execution_count'] = None