Agent skill

jupyter

Read, modify, execute, and convert Jupyter notebooks programmatically. Use when working with .ipynb files for data science workflows, including editing cells, clearing outputs, or converting to other formats.

Stars 78
Forks 21

Install this agent skill to your Project

npx add-skill https://github.com/OpenHands/extensions/tree/main/skills/jupyter

SKILL.md

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

python
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

bash
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

bash
grep -n "search_term" notebook.ipynb

Cell Structure

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

Clear Outputs

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

Expand your agent's capabilities with these related and highly-rated skills.

OpenHands/extensions

releasenotes

Generate formatted changelogs from git history since the last release tag. Use when preparing release notes that categorize changes into breaking changes, features, fixes, and other sections.

78 21
Explore
OpenHands/extensions

bitbucket

Interact with Bitbucket repositories and pull requests using the BITBUCKET_TOKEN environment variable. Use when working with code hosted on Bitbucket or managing Bitbucket resources via API.

78 21
Explore
OpenHands/extensions

add-skill

Add an external skill from a GitHub repository to the current workspace. Use when users want to import, install, or add a skill from a GitHub URL (e.g., `/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview` or "add the codereview skill from https://github.com/OpenHands/extensions/"). Handles fetching the skill files and placing them in .agents/skills/.

78 21
Explore
OpenHands/extensions

add-javadoc

Add comprehensive JavaDoc documentation to Java classes and methods. Use when documenting Java code, adding API documentation, or improving code documentation.

78 21
Explore
OpenHands/extensions

flarglebargle

A test skill that responds to the magic word "flarglebargle" with a compliment. Use for testing skill activation and trigger functionality.

78 21
Explore
OpenHands/extensions

codereview-roasted

Brutally honest code review in the style of Linus Torvalds, focusing on data structures, simplicity, and pragmatism. Use when you want critical, no-nonsense feedback that prioritizes engineering fundamentals over style preferences.

78 21
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results