Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add StamKavid/last-ds-mile --skill notebook-hygienegit clone --depth 1 https://github.com/StamKavid/last-ds-mileWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/stamkavid/last-ds-mile/notebook-hygiene)<a href="https://agentmods.dev/skills/stamkavid/last-ds-mile/notebook-hygiene"><img src="https://agentmods.dev/badge/skills/stamkavid/last-ds-mile/notebook-hygiene/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/stamkavid/last-ds-mile/notebook-hygiene"><img src="https://agentmods.dev/badge/skills/stamkavid/last-ds-mile/notebook-hygiene.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00071 | $0.00886 |
| Opus 5 | $0.00036 | $0.00443 |
| Sonnet 5 | $0.00014 | $0.00177 |
| Haiku 4.5 | $0.00007 | $0.00089 |
Grade A, and why
notebook-hygiene scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.
notebook-hygiene
Overview
A notebook is only as trustworthy as its ability to be rerun from a blank kernel and produce the same result — this skill is the concrete checklist for that property, which is otherwise easy to lose one out-of-order cell execution at a time.
When to Use
- Before considering exploratory work "done" — especially before
/ds-handoff. - A notebook has been edited/re-run out of order and you're not sure its current displayed output matches what the code would actually produce.
- NOT for: environment pinning itself (that's
/ds-handoff's Gate Check) — this skill is about the notebook's own internal consistency, handoff is about the surrounding environment.
Core Process
- Before finishing a session, do a Restart & Run All (or the script equivalent: run the whole file fresh, top to bottom, in a new process) and confirm it completes without error and without needing manual intervention.
- Check that cell execution order in the saved notebook matches top-to-bottom order — a notebook where cell 12 was run before cell 5 can display results that don't match a fresh run, even though it "looks fine" right now.
- Set random seeds explicitly wherever randomness is used (splits, model init, resampling) — an unset seed makes "restart and run all" produce different numbers each time, which looks like a reproducibility failure even when the code is correct.
- Remove or clearly mark any manual/interactive step (a value pasted in by hand, a file path typed once and never reused) that a rerun would silently skip.
Techniques/Patterns
| Hygiene issue | How it shows up | Fix |
|---|---|---|
| Out-of-order execution | Cell numbers in the saved notebook aren't sequential top to bottom | Restart & Run All before saving; if a cell must run early for exploration, don't leave the notebook in that state as "final" |
| Hidden global state | A later cell depends on a variable set by a cell above it that's since been deleted or edited | Restart & Run All will catch this immediately — that's exactly why it's step 1, not a nice-to-have |
| Unset random seeds | Rerunning produces different train/test splits, different model coefficients, different plots | Set random_state/np.random.seed/torch.manual_seed explicitly, once, near the top |
| Notebook-as-production-code | A notebook with real business logic that nobody can run non-interactively | For anything beyond exploration, extract the logic into a plain .py module/script the notebook imports and calls — the notebook becomes a thin driver, not the source of truth |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 73 lines · 71 tokens per session scan A aba176afcd20
notebook-hygiene is a skill published in the GitHub repository StamKavid/last-ds-mile (3 stars, last pushed 1mo ago), licensed MIT. It adds 71 tokens to every session and 886 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
science-vibecoding
Structured AI-assisted scientific code generation. 6 safety guards, 8 principles, 11 prompt templates. Grounded in Nature (2026).
metabolomics-analysis
Untargeted and targeted metabolomics data analysis using pyMZML, mzTab-M processing, and metabolite identification. Use for LC-MS/GC-MS feature detection, metabolite annotation, differential metabolite analysis, pathway mapping, and metabolic flux visualization. Covers XCMS-compatible workflows in Python.
ngs-pipeline-management
Next-generation sequencing pipeline management with Snakemake and Nextflow. Use for building, running, and debugging reproducible NGS workflows for RNA-seq, WGS, ChIP-seq, ATAC-seq, and amplicon sequencing. Covers pipeline design patterns, HPC/cloud execution, containerization, and workflow optimization.
omics-integration
Multi-omics data integration using MOFA+, DIABLO, and MixOmics for combining genomics, transcriptomics, proteomics, metabolomics, and epigenomics datasets. Use for identifying shared variation across omics layers, building integrative biomarker models, and discovering cross-modal biological patterns. Best for paired…
proteomics-analysis
Mass spectrometry-based proteomics data analysis with pyteomics, spectrumutils, and MaxQuant/DIA-NN output processing. Use for peptide identification, protein quantification (LFQ, TMT, SILAC), differential expression, PTM analysis, and proteomics data visualization. Covers both DDA and DIA proteomics workflows.
climate-data-analysis
Climate and Earth system data analysis using xarray, cartopy, cfgrib, and CMIP6/ERA5 datasets. Use for loading NetCDF/GRIB climate data, computing climatologies, spatial aggregation, anomaly detection, bias correction, and publication-quality climate maps. Best for atmospheric, oceanic, and land surface data analysis.