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 giacomogaglione/claude-awesome-stack --skill notebook-refactorgit clone --depth 1 https://github.com/giacomogaglione/claude-awesome-stackWrote 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/giacomogaglione/claude-awesome-stack/notebook-refactor)<a href="https://agentmods.dev/skills/giacomogaglione/claude-awesome-stack/notebook-refactor"><img src="https://agentmods.dev/badge/skills/giacomogaglione/claude-awesome-stack/notebook-refactor/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/giacomogaglione/claude-awesome-stack/notebook-refactor"><img src="https://agentmods.dev/badge/skills/giacomogaglione/claude-awesome-stack/notebook-refactor.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.00030 | $0.00519 |
| Opus 5 | $0.00015 | $0.00260 |
| Sonnet 5 | $0.00006 | $0.00104 |
| Haiku 4.5 | $0.00003 | $0.00052 |
Grade A, and why
notebook-refactor 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 9d 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 — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Notebook Refactoring Skill
Convert Jupyter notebook exploration code into clean, tested Python modules.
Process
1. Analyze the Notebook
Read the notebook and identify:
- Data loading cells ->
src/data/module - Preprocessing/transformation cells ->
src/data/orsrc/preprocessing/module - Model definition cells ->
src/models/module - Training loop cells ->
src/training/module - Evaluation/metrics cells ->
src/evaluation/module - Visualization cells -> keep in notebook (these are exploratory)
- Configuration values (magic numbers, paths) ->
src/config/or config file
2. Extract Functions
For each group of cells:
- Identify inputs and outputs of the cell block
- Extract into a function with:
- Type-annotated parameters for all inputs
- A clear return type
- A docstring explaining what it does and why
- Replace hardcoded values with parameters
- Remove
display(),print()debugging statements - Keep the notebook cell but replace the code with an import + function call
3. Write Tests
For each extracted function, write tests that:
- Use small, deterministic test fixtures (not the full dataset)
- Test the function's contract (input types -> output types/shapes)
- Test edge cases (empty input, single row, missing values)
- Use
np.testing.assert_allclosefor numerical outputs - Do NOT test exact numerical values from model operations (non-deterministic)
4. Update the Notebook
After extraction, the notebook should:
- Import from the new modules instead of defining functions inline
- Still be runnable end-to-end
- Serve as a high-level walkthrough / documentation of the pipeline
- Keep exploratory visualizations and analysis inline
5. Refactoring Checklist
Before marking complete:
- All extracted functions have type hints
- All extracted functions have tests
- Notebook still runs end-to-end with imports
- No hardcoded paths or magic numbers remain
- No unused imports in extracted modules
-
pyproject.tomlorsetup.pyupdated if new packages are needed
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 9d ago First seen · 66 lines · 30 tokens per session scan A 7586ceba46ec
notebook-refactor is a skill published in the GitHub repository giacomogaglione/claude-awesome-stack (2 stars, last pushed 6mo ago), licensed MIT. It adds 30 tokens to every session and 519 once invoked, about $0.0002 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
python-pytest-ops
Modern pytest patterns for effective testing.
temporal-python-testing
Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.
temporal-python-testing
Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.
test-generator
Generate pytest test cases for Python functions and classes.
ai-ml-development
AI and machine learning development with PyTorch, TensorFlow, and LLM integration. Use when building ML models, training pipelines, fine-tuning LLMs, or implementing AI features.
python-logging-best-practices
Python logging with loguru, structlog, and orjson. TRIGGERS - loguru, structlog, structured logging.