colab-notebook

Builds, executes, and publishes chapter notebooks with Colab twins and HTML pages.

Updated Sep 13, 2026
One-click install
npx skills add https://github.com/shammun/fluidpy --skill colab-notebook-shammun
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: colab-notebook
Source: https://github.com/shammun/fluidpy/tree/main/.claude/skills/colab-notebook
Command: npx skills add https://github.com/shammun/fluidpy --skill colab-notebook-shammun

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It standardizes how each fluidpy chapter notebook is generated from code, executed headlessly for verification, and published as three deliverables (GitHub notebook, Colab notebook, HTML page) without manual editing or public-repo leaks. ## Core Features & Use Cases - Code-driven notebook generation: notebooks/build_chNN.py uses tools/nbkit.py with a ChapterNotebook API (sections, derivations, worked examples, explainers) and save() refuses invalid notebooks. - Headless execution and verification: tools/run_notebook.py runs notebooks on the fluidpy-venv kernel with FAST mode, runtime budgets, and error reporting. - Publishing pipeline: tools/publish_notebook.py produces the executed .ipynb, outputs-stripped _colab.ipynb, and HTML page, then regenerates the site index and audits with check_public.py. - Use Case: When adding Chapter 7 on gravity waves, write build_ch07.py with derivations and explainers, run it headlessly, then publish all three deliverables in one verified pass. ## Quick Start Build and publish the chapter 7 notebook by running its build script, executing it headlessly with tools/run_notebook.py, and then publishing it with tools/publish_notebook.py.

Frequently Asked Questions about colab-notebook

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Jupyter notebook from a Python script?

Use notebooks/build_chNN.py with the ChapterNotebook API from tools/nbkit.py to declare sections, derivations, worked examples, and explainers, then call save(). The save step refuses to write notebooks missing required blocks, visuals, or sympy checks.

How do I execute a Jupyter notebook headlessly for verification?

Run tools/run_notebook.py chNN with optional --fast and --save flags, which executes on the dedicated fluidpy-venv kernel and reports runtime, slowest cells, and errors. Avoid jupyter nbconvert because PATH may dispatch to the wrong Anaconda kernel.

How do I publish a notebook to Google Colab and GitHub Pages?

Run tools/publish_notebook.py chNN, which gates on embed checks, executes the notebook, writes an outputs-stripped _colab.ipynb, an executed GitHub .ipynb, and an HTML page, then regenerates the site index and runs a public-safety audit.

Why does my notebook run on the wrong Python kernel?

Anaconda's python3 kernelspec can shadow the virtual environment's kernel. The workflow registers a dedicated fluidpy-venv kernel so headless execution always uses the venv interpreter instead of Anaconda.

What happens if Colab saves a copy back to GitHub?

Colab's File > Save a copy in GitHub commits outputs into the _colab.ipynb on main, violating the outputs-stripped policy. Recover by fetching, rebasing, re-running publish_notebook.py, and committing a restore commit without force-pushing.