ユーザーが実験、探索、またはチュートリアル用の Jupyter ノートブック(`.ipynb`)を作成、スキャフォールド、または編集するよう依頼したときに使用します。バンドルされたテンプレートを優先し、ヘルパースクリプト `new_notebook.py` を実行してクリーンな開始ノートブックを生成してください。
クリーンで再現可能な Jupyter ノートブックを、主に次の2つのモード向けに作成します:
同梱のテンプレートとヘルパースクリプトを使うことで、一貫した構造を保ち、JSONのミスを減らすことを推奨します。
.ipynb ノートブックをゼロから作成するとき。experiment を選びます。tutorial を選びます。export CODEX_HOME="${CODEX_HOME:-$HOME/.codex}"
export JUPYTER_NOTEBOOK_CLI="$CODEX_HOME/skills/jupyter-notebook/scripts/new_notebook.py"
<!-- CO-OP TRANSLATOR DISCLAIMER START -->
<!-- CO-OP TRANSLATOR DISCLAIMER END -->3d:["$","$L45",null,{"content":"$46","frontMatter":{"name":"jupyter-notebook","description":"ユーザーが実験、探索、またはチュートリアル用の Jupyter ノートブック(`.ipynb`)を作成、スキャフォールド、または編集するよう依頼したときに使用します。バンドルされたテンプレートを優先し、ヘルパースクリプト `new_notebook.py` を実行してクリーンな開始ノートブックを生成してください。"}}]User-scoped skills install under $CODEX_HOME/skills (default: ~/.codex/skills).
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 "$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
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.
assets/experiment-template.ipynb and assets/tutorial-template.ipynb.Script path:
$JUPYTER_NOTEBOOK_CLI(インストール時のデフォルト: $CODEX_HOME/skills/jupyter-notebook/scripts/new_notebook.py)tmp/jupyter-notebook/ for intermediate files; delete when done.output/jupyter-notebook/ when working in this repo.ablation-temperature.ipynb).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.
No required environment variables.
references/experiment-patterns.md: 実験の構成と経験則。references/tutorial-patterns.md: チュートリアルの構成と教育的な流れ。references/notebook-structure.md: ノートブックJSONの構造と安全な編集ルール。references/quality-checklist.md: 最終検証チェックリスト。免責事項: 本書はAI翻訳サービス「Co-op Translator」(https://github.com/Azure/co-op-translator)を使用して翻訳されました。正確さには努めていますが、自動翻訳には誤りや不正確な箇所が含まれる可能性があります。原文(原言語の文書)を正本としてご参照ください。重要な情報については、専門の人間による翻訳を推奨します。本翻訳の利用により生じたいかなる誤解や解釈の相違についても、当社は責任を負いません。