notebooks
Skill1 starsChanged 3 months agoMITView on GitHub
Jupyter in this repo — thin, exploratory, reproducible; logic lives in importable modules under `src/`, notebooks import, they don't define. Carries: launch the kernel from the uv env (`uv run jupyter lab`), `%load_ext autoreload` so `src/` edits land without restart, strip outputs before committing (nbstripout — the guard hook blocks output-carrying `.ipynb`), never commit heavy outputs or data, parametrize repeatable runs with papermill or `nbconvert --execute`, and promote grown exploratory code into modules. Load before opening, editing, or committing a `.ipynb`, or when cells only work in a remembered order. Triggers: notebook, jupyter, jupyter lab, .ipynb, kernel, nbstripout, nbconvert, papermill, autoreload, clear outputs, strip outputs, out-of-order cells, restart and run all, EDA, exploratory analysis, promote notebook code.
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Don't define models, losses, dataset/transform logic, or metric functions in a cell — put them in src/ and from src.<pkg> import ....
- Distinctive: line 29
When a cell's code gets reused (copied to a second notebook, or run twice), that's the signal to
- Distinctive: line 44
Put this at the top of the first cell so editing a module doesn't need a kernel restart:
- Distinctive: line 68
When a notebook needs to run headless or across parameter sets, don't click through it:
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
notebooks — thin, exploratory, reproducible Jupyter
On-demand: load this before opening, editing, or committing a
.ipynb, or when a notebook only runs in the order you happened to execute cells. Notebooks are for looking, not for housing logic — the moment code is reused or trusted, it belongs in a tested module.
When this applies
Doing EDA or a quick experiment in Jupyter, wiring a notebook's kernel to the project env, committing a
.ipynb, turning a notebook into a repeatable run, or deciding whether a cell has outgrown the notebook.
Keep logic in modules — notebooks import, they don't define
The single load-bearing rule. A notebook is a thin driver: it imports from src/, calls, and plots.
- Don't define models, losses, dataset/transform logic, or metric functions in a cell — put them in
src/andfrom src.<pkg> import .... A cell-defined function can't be tested, imported, or reviewed. - When a cell's code gets reused (copied to a second notebook, or run twice), that's the signal to
promote it: move a train/fine-tune step into the module the
trainingskill owns, an eval/metric step into the module theevaluationskill owns, and dataset/split/label logic per thedatasetsskill. The notebook then imports the promoted function — same behavior, now tested and reproducible.
Launch the kernel from the uv env
The kernel must be the project env, or imports and CUDA/torch silently differ from uv run scripts:
uv run jupyter lab # or: uv run jupyter notebookThis matches the env-uv skill — same interpreter, same locked deps, same torch/CUDA wheel. If a notebook
can import torch but scripts can't (or vice-versa), the kernel isn't the uv env. Over SSH on a remote GPU
box, run the same command there and forward the port (ssh -L 8888:localhost:8888 <PLACEHOLDER: gpu-host>).
Autoreload so src/ edits land live
Put this at the top of the first cell so editing a module doesn't need a kernel restart:
%load_ext autoreload
%autoreload 2Now edit the function in src/, re-run the calling cell, and the new code runs — reinforcing "define in
the module, drive from the notebook."
Strip outputs before committing
Committed outputs bloat the repo, leak data into diffs, and make every re-run a noisy diff. Strip them:
- Automated (preferred):
nbstripout— a git filter, so it strips ongit add/commit no matter who made the edit (a ClaudePostToolUsehook would only catch the agent's). Installing it as a dev dep does nothing on its own — the filter must be activated, and it writes to.git/config, which is local and not shared, so every clone must run it:uv run nbstripout --install uv run nbstripout --status # verify the filter is active — do this before trusting it - Manual: Kernel → Restart Kernel and Clear All Outputs before saving.
- Never commit heavy outputs (rendered images, large tables), model weights, or dataset files from a
notebook — data/model artifacts are versioned by the
data-dvctool skill, not git. See the data/PII rules in thegovernanceskill (.claude/memory/policy/); don't restate them here.
Parametrized / repeatable runs (optional)
When a notebook needs to run headless or across parameter sets, don't click through it:
jupyter nbconvert --execute— run top-to-bottom, fail on any error (a reproducibility check in one):uv run jupyter nbconvert --to notebook --execute notebooks/eda.ipynb --output out.ipynbpapermill— same, but inject parameters into a taggedparameterscell for sweeps:
For anything beyond a quick sweep, promote the logic to auv run --with papermill papermill in.ipynb out.ipynb -p lr 3e-4 -p epochs 10src/entry point and drive it from the config system instead — that's thetraining/configpath, not a notebook's.
Gotcha
A notebook that only works in remembered execution order is not reproducible — hidden state from
deleted or out-of-order cells is a lie you'll ship. Before you trust or commit one: Restart Kernel and Run
All (or nbconvert --execute) so it proves it runs clean top-to-bottom. Anything you'd reuse gets
promoted into a tested module (training / evaluation / datasets), and outputs get stripped so the diff
stays legible. This is the repo's reproducibility convention applied to notebooks — see the Always-on
conventions in CLAUDE.md.
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- fmschulz/omics-skills★ 9same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository59 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agent-evaluationSkill
- agent-securitySkill
- annotationSkill
- authn-authzSkill
- caching-and-queuesSkill
- config-hydraSkill
- config-omegaconfSkill
- containersSkill
- data-acquisitionSkill
- data-dvcSkill
- datasetsSkill
- edaSkill
- env-uvSkill
- evaluationSkill
- example-skillSkill
- finetune-unslothSkill
- gitopsSkill
- governanceSkill
- graph-storesSkill
- guardrailsSkill
- hpo-optunaSkill
- iac-terraformSkill
- infra-awsSkill
- infra-azureSkill
- infra-gcpSkill
- kubernetesSkill
- llm-evalSkill
- llm-red-teamingSkill
- local-stackSkill
- mcp-securitySkill
- memorySkill
- monitoringSkill
- object-and-lakehouseSkill
- observabilitySkill
- pipelinesSkill
- policy-as-codeSkill
- processSkill
- relational-storesSkill
- reliability-sreSkill
- reportingSkill
- secrets-managementSkill
- secure-cicdSkill
- servingSkill
- sqlSkill
- statisticsSkill
- supply-chain-securitySkill
- tabularSkill
- testingSkill
- threat-modelingSkill
- timeseriesSkill
- tracking-mlflowSkill
- tracking-wandbSkill
- trainingSkill
- vector-storesSkill
- visualizationSkill
- wave-planningSkill
- workflow-orchestrationSkill
- wranglingSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

