Jupyter Notebook
Overview
- 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.
Workflow
Lock the intent.
Identify the notebook kind: experiment or tutorial.
Capture the objective, audience, and what "done" looks like.
Scaffold from the template.
Use the helper script to avoid hand-authoring raw notebook JSON.
uv run --python 3.12 python scripts/new_notebook.py \
--kind experiment \
--title "Compare prompt variants" \
--out output/jupyter-notebook/compare-prompt-variants.ipynb
uv run --python 3.12 python scripts/new_notebook.py \
--kind tutorial \
--title "Intro to embeddings" \
--out output/jupyter-notebook/intro-to-embeddings.ipynb
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.
Apply the right pattern.
For experiments, follow references/experiment-patterns.md.
For tutorials, follow references/tutorial-patterns.md.
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.
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:
scripts/new_notebook.py (relative to this skill's own directory)
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.
1---2name: jupyter-notebook-23domain: system4skill_type: skill5description: >-6 Use when the user asks to create, scaffold, or edit Jupyter notebooks (`.ipynb`)7 for experiments, explorations, or tutorials; prefer the bundled templates and8 run the helper script `new_notebook.py` to generate a clean starting notebook.9license: MIT10tags: [jupyter, notebook, python, data-science, research]11metadata:12 source: https://skillmd.com/skills/knuckles-team/jupyter-notebook-213 version: '1.6.0'14 author: Genius15---1617# Jupyter Notebook1819## Overview2021- Experiments and exploratory analysis22- Tutorials and teaching-oriented walkthroughs2324Prefer the bundled templates and the helper script for consistent structure and fewer JSON mistakes.2526## When to use27- Create a new `.ipynb` notebook from scratch.28- Convert rough notes or scripts into a structured notebook.29- Refactor an existing notebook to be more reproducible and skimmable.30- Build experiments or tutorials that will be read or re-run by other people.3132## Decision tree33- If the request is exploratory, analytical, or hypothesis-driven, choose `experiment`.34- If the request is instructional, step-by-step, or audience-specific, choose `tutorial`.35- If editing an existing notebook, treat it as a refactor: preserve intent and improve structure.3637## Workflow381. Lock the intent.39Identify the notebook kind: `experiment` or `tutorial`.40Capture the objective, audience, and what "done" looks like.41422. Scaffold from the template.43Use the helper script to avoid hand-authoring raw notebook JSON.4445```bash46uv run --python 3.12 python scripts/new_notebook.py \47 --kind experiment \48 --title "Compare prompt variants" \49 --out output/jupyter-notebook/compare-prompt-variants.ipynb50```5152```bash53uv run --python 3.12 python scripts/new_notebook.py \54 --kind tutorial \55 --title "Intro to embeddings" \56 --out output/jupyter-notebook/intro-to-embeddings.ipynb57```58593. Fill the notebook with small, runnable steps.60Keep each code cell focused on one step.61Add short markdown cells that explain the purpose and expected result.62Avoid large, noisy outputs when a short summary works.63644. Apply the right pattern.65For experiments, follow `references/experiment-patterns.md`.66For tutorials, follow `references/tutorial-patterns.md`.67685. Edit safely when working with existing notebooks.69Preserve the notebook structure; avoid reordering cells unless it improves the top-to-bottom story.70Prefer targeted edits over full rewrites.71If you must edit raw JSON, review `references/notebook-structure.md` first.72736. Validate the result.74Run the notebook top-to-bottom when the environment allows.75If execution is not possible, say so explicitly and call out how to validate locally.76Use the final pass checklist in `references/quality-checklist.md`.7778## Templates and helper script79- Templates live in `assets/experiment-template.ipynb` and `assets/tutorial-template.ipynb`.80- The helper script loads a template, updates the title cell, and writes a notebook.8182Script path:83- `scripts/new_notebook.py` (relative to this skill's own directory)8485## Temp and output conventions86- Use `tmp/jupyter-notebook/` for intermediate files; delete when done.87- Write final artifacts under `output/jupyter-notebook/` when working in this repo.88- Use stable, descriptive filenames (for example, `ablation-temperature.ipynb`).8990## Dependencies (install only when needed)91Prefer `uv` for dependency management.9293Optional Python packages for local notebook execution:9495```bash96uv pip install jupyterlab ipykernel97```9899The bundled scaffold script uses only the Python standard library and does not require extra dependencies.100101## Environment102No required environment variables.103104## Reference map105- `references/experiment-patterns.md`: experiment structure and heuristics.106- `references/tutorial-patterns.md`: tutorial structure and teaching flow.107- `references/notebook-structure.md`: notebook JSON shape and safe editing rules.108- `references/quality-checklist.md`: final validation checklist.