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 gpsaggese/helpers --skill notebook.refactor_to_utilsgit clone --depth 1 https://github.com/gpsaggese/helpersWrote 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/gpsaggese/helpers/notebook.refactor_to_utils)<a href="https://agentmods.dev/skills/gpsaggese/helpers/notebook.refactor_to_utils"><img src="https://agentmods.dev/badge/skills/gpsaggese/helpers/notebook.refactor_to_utils/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/gpsaggese/helpers/notebook.refactor_to_utils"><img src="https://agentmods.dev/badge/skills/gpsaggese/helpers/notebook.refactor_to_utils.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.00012 | $0.00806 |
| Opus 5.5 | $0.00005 | $0.00322 |
| Sonnet 5.5 | $0.00002 | $0.00161 |
| Haiku 4.5 | $0.00001 | $0.00081 |
Grade A, and why
notebook.refactor_to_utils 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 yesterday.
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 — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Goal
-
You are an expert Python developer
-
I will pass you a Python file paired with a Jupyter notebook using jupytext in
py:percentformat
Constraints
-
Follow
.claude/skills/coding.rules.mdfor all code -
Important Notes
- Always sync before editing:
uvx jupytext --sync notebook.py - Always sync after editing:
uvx jupytext --sync notebook.py
- Always sync before editing:
Scenarios
- This skill handles two complementary scenarios:
Scenario 1: Moving Existing Functions to Utils
- Extract functions from an existing notebook and move them to utils
Scenario 2: Adding New Code to Utils
- Add new functions or code to the utils file that corresponds to the notebook
Workflow
Identify or Create the Utils File
- Find or create the library file for the notebook, named after it with underscores
- E.g.,
Lesson94-Information_Theory.ipynb->Lesson94_Information_Theory_utils.py - E.g.,
tutorial_advanced.ipynb->tutorial_advanced_utils.py
- E.g.,
Organize Code Structure in Utils File
-
Mirror the notebook's flow, with section separators for each notebook section
- Example:
# ############################################################################# # Cell 1: Visual Bin - Population of Marbles # ############################################################################# def cell1_draw_bin_with_marbles_interactive(...): ... def _cell1_helper_function(...): ... # ############################################################################# # Cell 2: Entropy Calculations # ############################################################################# def cell2_calculate_entropy(...): ...
- Example:
-
Put each function in the part of the utils file that matches its notebook section
-
Group related functions together
-
Use private functions (prefix
_) for helpers not called from the notebook
Move or Add Functions
For Moving Functions (Scenario 1):
-
Follow these steps:
- Copy all functions from the notebook to the utils file, without changing code
- Remove the functions from the notebook
- Update the notebook cells to call the utils functions
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.
- yesterday First seen · 115 lines · 12 tokens per session scan A 202a7ea0a492
notebook.refactor_to_utils is a skill published in the GitHub repository gpsaggese/helpers (158 stars, last pushed today), licensed Apache-2.0. It adds 12 tokens to every session and 806 once invoked, about $0.0000 per session on Opus 5.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-11-06.
notebook.refactor_to_utils compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| notebook.refactor_to_utilsgpsaggese/helpers | Skill | 158 | today | Apache-2.0 | A | 12 | Claude Code |
| future-self-liteTHU-MAIC/OpenMAIC | Skill | 43k | yesterday | MIT | A | 20 | Claude Code, Codex |
| courseCoderWanFeng/python-office | Skill | 1.4k | 9d ago | Apache-2.0 | A | 38 | Claude Code, Codex |
| triton-cuda-apimindspore-ai/akg | Skill | 266 | 2d ago | Apache-2.0 | A | 69 | Claude Code, Codex |
| triton-cuda-basicsmindspore-ai/akg | Skill | 266 | 2d ago | Apache-2.0 | A | 64 | Claude Code, Codex |
| triton-ascend-elementwisemindspore-ai/akg | Skill | 266 | 2d ago | Apache-2.0 | A | 205 | Claude Code, Codex |
| python-fast-skilljiushiwon/wg-skills | Skill | 136 | today | Apache-2.0 | A | 155 | Claude Code, Codex |