mcpField
J
jupyter

jupyter

github.com/openhandsData & databases175135 installsUpdated today
Repository

About jupyter

A practical guide skill for working with Jupyter notebooks as JSON files. It covers editing cells, executing notebooks, converting formats, searching code, and clearing outputs.

Key features

  1. 01Edit notebook cells as JSON
  2. 02Execute notebooks with nbconvert
  3. 03Convert notebooks to HTML, script, or Markdown
  4. 04Search notebook contents
  5. 05Clear code cell outputs

Use cases

  1. 01Editing notebook source programmatically
  2. 02Running a notebook in place
  3. 03Exporting notebook content to other formats

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/openhands/extensions --skill jupyter

After installing, type/jupyterin Claude Code to confirm it loaded.

Bundled files.plugin/plugin.jsonREADME.md

Details

From the project README

Jupyter Notebook Guide

Notebooks are JSON files. Cells are in nb['cells'], each has source (list of strings) and cell_type ('code', 'markdown', or 'raw').

Modifying Notebooks

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)

Executing & Converting

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

Finding Code

grep -n "search_term" notebook.ipynb

PowerShell equivalent:

Select-String -Path notebook.ipynb -Pattern "search_term"

Cell Structure

# Code cell
{"cell_type": "code", "execution_count": None, "metadata": {}, "outputs": [], "source": ["code\n"]}
# Markdown cell
{"cell_type": "markdown", "metadata": {}, "source": ["# Title\n"]}

Clear Outputs

for cell in nb['cells']:
    if cell['cell_type'] == 'code':
        cell['outputs'] = []
        cell['execution_count'] = None

Comments

Markdown supported