Use dis one wen di user dey ask make you create, scaffold, or edit Jupyter notebooks (`.ipynb`) for experiments, explorations, or tutorials; prefer di bundled t
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-jupyter-notebook-34a4336ab11a ,按照其中的说明把「jupyter-notebook」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Make clean, reproducible Jupyter notebooks for two main modes:
Dey prefer di bundled templates and di helper script for consistent structure and to reduce JSON mistakes.
.ipynb notebook from scratch.experiment.tutorial.export CODEX_HOME="${CODEX_HOME:-$HOME/.codex}"
export JUPYTER_NOTEBOOK_CLI="$CODEX_HOME/skills/jupyter-notebook/scripts/new_notebook.py"
User-scoped skills dey install under $CODEX_HOME/skills (default: ~/.codex/skills).
Lock the intent.
Identify di notebook kind: experiment or tutorial.
Capture di objective, audience, and wetin "done" suppose look like.
Scaffold from the template. Use di helper script so you no go hand-author 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. Make each code cell focus on one step. Add short markdown cells wey explain di purpose and wetin dem suppose expect. Avoid big, noisy outputs if small summary fit do.
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 di notebook structure; no dey reorder cells unless e go improve di top-to-bottom story.
Prefer targeted edits rather than full rewrites.
If you must edit raw JSON, check references/notebook-structure.md first.
Validate the result.
Run the notebook top-to-bottom when environment allow.
If execution no possible, talk am clear and explain how to validate locally.
Use di final pass checklist in references/quality-checklist.md.
assets/experiment-template.ipynb and assets/tutorial-template.ipynb.Script path:
$JUPYTER_NOTEBOOK_CLI (installed default: $CODEX_HOME/skills/jupyter-notebook/scripts/new_notebook.py)tmp/jupyter-notebook/ for intermediate files; delete when done.output/jupyter-notebook/ when you dey work for this repo.ablation-temperature.ipynb).Prefer uv for dependency management.
Optional Python packages for local notebook execution:
uv pip install jupyterlab ipykernel
Di bundled scaffold script dey use only di Python standard library and no need extra dependencies.
No required environment variables.
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.Disclaimer: Dis dokument don translate wit AI translation service Co-op Translator (https://github.com/Azure/co-op-translator). Even though we dey try make am correct, abeg sabi say automatic translations fit get errors or mistakes. The original dokument for im own language na the correct/official source. For important information, na professional human translator we dey recommend. We no dey responsible for any wrong understanding or misinterpretation wey fit come from using this translation.