Create, clean, organize, optimize, and convert Jupyter notebooks. Build new notebooks from scratch with proper cell structure, cell IDs, and Colab compatibility. Extract reusable functions, add documentation, generate requirements.txt, and convert to scripts. Use when the user wants to create a notebook, clean a notebook, organize cells, extract functions, convert to script, or optimize a notebook for production.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Instruções da origem · Visualização somente leitura
name
notebook
description
Create, clean, organize, optimize, and convert Jupyter notebooks. Build new notebooks from scratch with proper cell structure, cell IDs, and Colab compatibility. Extract reusable functions, add documentation, generate requirements.txt, and convert to scripts. Use when the user wants to create a notebook, clean a notebook, organize cells, extract functions, convert to script, or optimize a notebook for production.
allowed-tools
Bash(uv run * scripts/assess.py *) Read Write Glob Grep
uv run ${CLAUDE_SKILL_DIR}/scripts/assess.py notebook.ipynb
Assess a notebook
# Text report
uv run ${CLAUDE_SKILL_DIR}/scripts/assess.py $ARGUMENTS# JSON output
uv run ${CLAUDE_SKILL_DIR}/scripts/assess.py notebook.ipynb --json
The assess.py script analyzes notebook structure, detects issues (empty cells, scattered imports, missing documentation, hardcoded paths, missing seeds), and returns a quality score out of 10.
Capabilities
Action
What
Clean
Remove empty cells, clear stale outputs, fix order
Organize
Add section headers, TOC, logical grouping
Extract
Pull reusable code into utils.py
Document
Add docstrings, markdown, type hints
Optimize
Memory management, chunked processing
Reproduce
Set seeds, pin versions, freeze requirements
Convert
Export to .py script
Recommended notebook structure
1. Title & Description
2. Table of Contents
3. Setup & Imports
4. Configuration & Constants
5. Data Loading
6. EDA
7. Data Preparation
8. Feature Engineering
9. Model Training
10. Evaluation
11. Conclusions
Creating notebooks
.ipynb structure
When creating a notebook from scratch, the JSON structure is:
{"nbformat":4,
"nbformat_minor"
:
0
,
"metadata"
:
{
"kernelspec"
:
{
"name"
:
"python3"
,
"display_name"
:
"Python 3"
}
,
"colab"
:
{
"provenance"
:
[
]
}
}
,
"cells"
:
[
]
}
Use the NotebookEdit tool to create and modify cells — it handles JSON serialization correctly. Only fall back to raw json.load/dump when the tool is unavailable.
Cell source format
source is an array of strings, each ending with \n (except possibly the last):
"source":["import pandas as pd\n","import numpy as np\n","\n","df = pd.read_csv('data.csv')\n"]
NOT a single string. This is the most common formatting mistake when writing notebook JSON directly.
Cell IDs
Every cell needs a unique metadata.id. Use descriptive names: