New to Claude Skills? Learn how to install them →

openai on GitHub

Jupyter Notebook

OfficialFree

Effortlessly create structured Jupyter notebooks for experiments and tutorials.

by openai24.8k stars on openai/skills
1 views
Updated Jun 24, 2026
Get this skill

Free · Opens the source repo

What Jupyter Notebook does

The Jupyter Notebook skill is designed to streamline the process of creating, scaffolding, and editing Jupyter notebooks, particularly for experiments and educational tutorials. With this skill, users can leverage bundled templates and a helper script to generate clean, reproducible notebooks that follow best practices. It enables developers and educators to focus on content rather than formatting, ensuring that notebooks are both functional and easy to understand.

Users can choose between two primary modes: experiments, which are suited for exploratory analysis and hypothesis testing, and tutorials, which are tailored for instructional purposes. By using the helper script new_notebook.py, users can quickly scaffold a new notebook, reducing the likelihood of JSON formatting errors and ensuring a consistent structure. This is particularly beneficial for those who may not be familiar with the intricacies of Jupyter notebook JSON formatting.

The skill also provides guidance on editing existing notebooks, emphasizing the importance of preserving the original intent while improving the overall structure. Users are encouraged to follow specific patterns outlined in the provided references, which help maintain clarity and reproducibility. This makes the skill a valuable tool for researchers, educators, and anyone who needs to present data or findings in a structured manner.

Overall, the Jupyter Notebook skill is an essential resource for anyone looking to enhance their workflow with Jupyter notebooks, whether for personal projects, academic research, or teaching purposes. Its focus on usability and best practices makes it a worthwhile addition to any developer or educator's toolkit.

When to use it

Use this skill when you need to create a new Jupyter notebook for an experiment or tutorial, or when refactoring an existing notebook for better clarity and reproducibility.

When not to use it

This skill may not be suitable for users who require advanced customizations beyond the provided templates or those who prefer to work entirely outside of Jupyter notebooks.

What you can build with it

Creating a New Experiment Notebook

Use the helper script to scaffold a new notebook for an experiment, ensuring a clean structure and proper formatting.

Refactoring a Tutorial Notebook

Edit an existing tutorial notebook to improve its clarity and instructional flow while preserving the original content.

Converting Notes to Notebooks

Transform rough notes or scripts into a well-structured Jupyter notebook using the provided templates.

How to install Jupyter Notebook

View source

1. Install with the skills CLI

npx skills add openai/skills/jupyter-notebook --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by openai

Jupyter Notebook Skill

Create clean, reproducible Jupyter notebooks for two primary modes:

  • Experiments and exploratory analysis
  • Tutorials and teaching-oriented walkthroughs

Prefer the bundled templates and the helper script for consistent structure and fewer JSON mistakes.

When to use

  • Create a new .ipynb notebook from scratch.
  • Convert rough notes or scripts into a structured notebook.
  • Refactor an existing notebook to be more reproducible and skimmable.
  • Build experiments or tutorials that will be read or re-run by other people.

Decision tree

  • If the request is exploratory, analytical, or hypothesis-driven, choose experiment.
  • If the request is instructional, step-by-step, or audience-specific, choose tutorial.
  • If editing an existing notebook, treat it as a refactor: preserve intent and improve structure.

Skill path (set once)

export CODEX_HOME="${CODEX_HOME:-$HOME/.codex}"
export JUPYTER_NOTEBOOK_CLI="$CODEX_HOME/skills/jupyter-notebook/scripts/new_notebook.py"

User-scoped skills install under $CODEX_HOME/skills (default: ~/.codex/skills).

Workflow

  1. Lock the intent. Identify the notebook kind: experiment or tutorial. Capture the objective, audience, and what "done" looks like.

  2. Scaffold from the template. Use the helper script to avoid hand-authoring raw notebook JSON.

uv run --python 3.12 python "$JUPYTER_NOTEBOOK_CLI" \
  --kind experiment \
  --title "Compare prompt variants" \
  --out output/jupyter-notebook/compare-prompt-variants.ipynb
uv run --python 3.12 python "$JUPYTER_NOTEBOOK_CLI" \
  --kind tutorial \
  --title "Intro to embeddings" \
  --out output/jupyter-notebook/intro-to-embeddings.ipynb
  1. Fill the notebook with small, runnable steps. Keep each code cell focused on one step. Add short markdown cells that explain the purpose and expected result. Avoid large, noisy outputs when a short summary works.

  2. Apply the right pattern. For experiments, follow references/experiment-patterns.md. For tutorials, follow references/tutorial-patterns.md.

  3. Edit safely when working with existing notebooks. Preserve the notebook structure; avoid reordering cells unless it improves the top-to-bottom story. Prefer targeted edits over full rewrites. If you must edit raw JSON, review references/notebook-structure.md first.

  4. Validate the result. Run the notebook top-to-bottom when the environment allows. If execution is not possible, say so explicitly and call out how to validate locally. Use the final pass checklist in references/quality-checklist.md.

Templates and helper script

  • Templates live in assets/experiment-template.ipynb and assets/tutorial-template.ipynb.
  • The helper script loads a template, updates the title cell, and writes a notebook.

Script path:

  • $JUPYTER_NOTEBOOK_CLI (installed default: $CODEX_HOME/skills/jupyter-notebook/scripts/new_notebook.py)

Temp and output conventions

  • Use tmp/jupyter-notebook/ for intermediate files; delete when done.
  • Write final artifacts under output/jupyter-notebook/ when working in this repo.
  • Use stable, descriptive filenames (for example, ablation-temperature.ipynb).

Dependencies (install only when needed)

Prefer uv for dependency management.

Optional Python packages for local notebook execution:

uv pip install jupyterlab ipykernel

The bundled scaffold script uses only the Python standard library and does not require extra dependencies.

Environment

No required environment variables.

Reference map

  • references/experiment-patterns.md: experiment structure and heuristics.
  • references/tutorial-patterns.md: tutorial structure and teaching flow.
  • references/notebook-structure.md: notebook JSON shape and safe editing rules.
  • references/quality-checklist.md: final validation checklist.

Frequently asked questions about Jupyter Notebook

Similar skills