AGENT SKILL
Jupyter 笔记本大纲实现
notebook.implement_outline
根据大纲描述实现一个带有交互小部件(widgets)的 Jupyter 笔记本。
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-02
- Stars
- ★ 155
- Forks
- 170
01 前言 Front Matter
- model
- opus
- description
- Implement a Jupyter notebook with widgets from an outline description
03 SKILL.md 正文
Goal
- Input: A
notebook_outline.<TAG>.mdoutline file describing each notebook cell (created via.claude/skills/notebook.create_outline/SKILL.md) - Outputs:
.ipynbfile: Fully functional Jupyter notebook with working code, visualizations, and interactive widgets.pyfile: A Python file paired usingjupytextto the.ipynbusing py:percent*_utils.pyfile: Reusable helper functions for the notebook code
- Purpose: Implement the pedagogical design as a fully executable, interactive notebook
- Each visualization follows the triplet structure:
- Pre-visualization markdown (goal, then the input/panel description)
- Code cell (visualization / interactive widget)
- Post-visualization markdown (guided usage: actions plus observations, then
the implementation followed by the
print_obj_info()code cell)
Core Workflow
- Understand the outline: Review each cell's Purpose, Display, and (if present) Widgets and Guided Usage
- Implement utility functions: Write reusable widget and visualization code in
*_utils.py - Create notebook cells: Add markdown cells (context) and code cells (widget calls) to the notebook
- Follow the separation principle: Utilities contain implementation; notebook contains only function calls
Key Conventions
- Follow
.claude/skills/notebook.rules.md: General notebook conventions and structure, especially:## Visualization Cell Triplet Details: Pre-viz and post-viz markdown cells# Visualization and Interactivity: Widget patterns and comments panel conventions
- Follow outline cell format from
.claude/skills/notebook.create_outline/SKILL.md - Follow
.claude/skills/coding.rules.mdfor Python code in*_utils.pyand in the Python cells in.ipynbfile - Follow
.claude/skills/notebook.rules.md# Code Architecture and Responsibility->## Utilities vs. Notebook Responsibilitiesfor organizing utility files and notebooks
Code Organization
- Follow the section
## Utilities vs. Notebook Responsibilitiesfrom the file.claude/skills/notebook.rules.mdfor organizing utility files and notebook cells
Reference Templates
- Study these before implementing; they establish the quality bar and idioms
.claude/templates/notebook.template.py- End-to-end notebook covering both static and interactive cell types
.claude/templates/notebook_utils_template.py- Paired utilities file with widget creation, state management, and visualization functions
- Examples of notebooks
msml610/tutorials/Lesson94_Information_Theory_utils.py- Production example with complex interactive patterns (especially
plot_joint_entropy_interactive())
Implementation Patterns
Cell Structure in Notebook
- Each visualization in the outline becomes the cell sequence (triplet of stages,
more than one cell per stage):
- Markdown cells (pre-viz): Goal, then Description split into Inputs and Panels
- Code cell: Visualization / interactive widget with comments panel containing only variable state
- Markdown cells (post-viz): Guided usage (one action per control plus the
observation it produces, not general facts to learn), then Implementation,
then the
print_obj_info()code cell
- Make sure to follow the section
## Visualization Cell Triplet Detailsfrom the file.claude/skills/notebook.rules.md
Simple Interactive Widgets
- Follow the conventions in
.claude/skills/notebook.rules.md## Simple Interactive Widgets
Complex Interactive Widgets
- Follow the conventions in
.claude/skills/notebook.rules.md## Complex Interactive Widgets
Sync with Jupytext
- After all modifications are complete, sync the paired
.pyfile with Jupytext following the conventions in# Code Architecture and Responsibility->## Utilities vs. Notebook Responsibilitiesin.claude/skills/notebook.rules.md
Verification
- [ ] Confirm the
.ipynb, paired.py, and*_utils.pyfiles are in sync via Jupytext - [ ] Run the notebook top to bottom following
## Testing Notebookin.claude/skills/notebook.rules.mdand confirm it completes without errors - [ ] Check that every outline cell has a corresponding notebook cell and no step
from
notebook_outline.<TAG>.mdwas skipped
04 同仓库更多 Skills
Docker 文件同步与模板对齐
tutorial_in_60_mins.propagate_docker_changes
同步教程和课程项目的 Docker 文件,使其与 project_template 保持一致。
★ 155
Markdown 合并至 Jupyter Notebook
tutorial_in_60_mins.merge_markdown
将 Markdown 文件的内容合并到 Jupyter Notebook 中。
★ 155
60 分钟教程格式规范化
tutorial_in_60_mins.format
格式化目录,使其遵循「Learn X in 60 Minutes」(60 分钟学会 X)教程约定。
★ 155
60 分钟教程目录创建
tutorial_in_60_mins.create
按照「Learn X in 60 Minutes」(60 分钟学会 X)约定创建教程目录。
★ 155
todo.reorg_in_progress
Reorganize ai_task_queue.md so in-progress tasks, not-started tasks, and mislabeled topic headers sit under the right H1 stage
★ 155
todo.reorg_headers
Reorganize ai_task_queue.md .md so every H2 topic matches ALL TOPICS and every H3 task sits under the right topic, keeping its H1 stage
★ 155