Skip to content

gpsaggese/helpers / .claude/skills/notebook.implement_outline

notebook.implement_outline

Verified

Implement a Jupyter notebook with widgets from an outline description

Goal

  • Input: A notebook_outline.<TAG>.md outline file that describes each notebook cell (created via .claude/skills/notebook.create_outline/SKILL.md)
  • Outputs:
    1. .ipynb file: Fully functional Jupyter notebook with working code, visualizations, and interactive widgets
    2. .py file: Paired with the .ipynb using jupytext in py:percent format
    3. *_utils.py file: Reusable helper functions for the notebook code
  • Purpose: Implement the pedagogical design as an executable, interactive notebook
  • Each visualization is a triplet of pre-viz markdown, a code cell, and post-viz markdown (see "Cell Structure in Notebook")

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)
  • Follow the separation principle: Utilities hold the implementation. The notebook holds only function calls

Key Conventions

  • Follow .claude/skills/notebook.rules.md for 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 the outline cell format in .claude/skills/notebook.create_outline/SKILL.md
  • Follow .claude/skills/coding.rules.md for Python in *_utils.py and in the .ipynb Python cells

Code Organization

  • Follow the section ## Utilities vs. Notebook Responsibilities from the file .claude/skills/notebook.rules.md for organizing utility files and notebook cells

Reference Templates

  • Study these before implementing. They set 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
  • In the title cell, right after the title, add:
    - Generated by `.claude/skills/notebook.implement_outline/SKILL.md`
    
  • 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 a sequence of cells (a triplet of stages, with more than one cell per stage):
    1. Markdown cells (pre-viz): Goal, then Description split into Inputs and Panels
    2. Code cell: Visualization / interactive widget, with a comments panel that holds only variable state
    3. 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
  • Follow ## Visualization Cell Triplet Details in .claude/skills/notebook.rules.md

Simple Interactive Widgets

  • Follow ## Simple Interactive Widgets in .claude/skills/notebook.rules.md

Complex Interactive Widgets

  • Follow ## Complex Interactive Widgets in .claude/skills/notebook.rules.md

Sync with Jupytext

  • After all modifications, sync the paired .py file with Jupytext following # Code Architecture and Responsibility -> ## Utilities vs. Notebook Responsibilities in .claude/skills/notebook.rules.md

Verification

  • Confirm the .ipynb, paired .py, and *_utils.py files are in sync via Jupytext
  • Run the notebook top to bottom following ## Testing Notebook in .claude/skills/notebook.rules.md and confirm it completes without errors
  • Check that every outline cell has a corresponding notebook cell and no step from notebook_outline.<TAG>.md was skipped
  • The title cell of the notebook says that it was generated by .claude/skills/notebook.implement_outline/SKILL.md
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 117kUpdated Claude CodeCodexVerifiedInstall
Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 117kUpdated Claude CodeCodexVerifiedInstall