Export ML Notebook
SkillFiles & storageTurns a # %% marked-up Python script into an executed Jupyter notebook with cell outputs.
Available today. Use it from your connected AI after setup.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the Export ML Notebook skill
About this skill
Convert a jupytext percent `# %%` Python file into an executed `.ipynb` with cell outputs. Pass `--html` when the notebook should also become a viewer on the site. Trigger on notebook, ipynb, HTML, or executed-report requests, or when export-ml-project dispatches notebooks.
What this skill tells your AI
The instructions your AI receives, as published by probabl-ai/skills in skills/export-ml-notebook/SKILL.md and read by ahel’s review.
Source of truth stays the # %% .py. This skill only writes
derived .ipynb (and optional .nb.html). Do not rewrite the
.py from the notebook. cells run is not a substitute.
Human-facing prose
Details: setup-workspace references/human_facing_prose.md.
Tell the user the written .ipynb (and HTML viewer) paths. Do
not quote notebook convert, --html, or site build as
something they should run.
While policy.notebooks is true, explore-ml-data,
model-ml-pipeline, and audit-ml-pipeline already convert the
percent file they wrote that turn. This skill owns on-demand
conversions, other sources, and turning the flag on when it is
null or false.
Sequence
-
python -m skore_skills status. Readpolicy.notebooksandskills. -
If
policy.notebooksisnull: persistpython -m skore_skills policy set notebooks true. Do not AskUserQuestion. Then loadadd-python-packageforjupytextandnbclient(agent) and continue. -
If
policy.notebooksis false: say executed notebooks are off; offer to turn them on. Do not convert until the policy is true. -
Convert the requested percent file (default
data_analysis/data_analysis.pywhen the user did not name one):python -m skore_skills notebook convert data_analysis/data_analysis.pyConvert injects
%matplotlib inlinefor the kernel run so seaborn / matplotlib last expressions emitimage/png, then strips that setup cell from the written notebook. Do not put%matplotlib inlinein the.py(style/ ruff would reject it).If the user wants the executed notebook on the site, load
add-python-packagefornbconvert(agent) and pass--html(writes a self-contained<stem>.nb.htmlnext to the.py). The site embeds that file in the associated exploratory data analysis or design report with open-separately and fullscreen controls.Optional
--out path.ipynb. Keep*.ipynbgitignored unless the user askssetup-gitto track them.Convert-only requests (executed notebook / ipynb / convert, no HTML or site viewer): run only that
notebook convertline, with no--html. Tell the user the written.ipynbpath. Do not mention--htmlorsite buildas an optional aside. -
After
--html, ifpolicy.siteis true,export-ml-siteis installed, runpython -m skore_skills site buildso the viewer is packaged. Run--htmlandsite buildonly when the user asked for HTML or a site viewer. Convert without--htmldoes not rebuild the site. Skip in one line otherwise. Name a build error; do not fail the convert. Point the user at the HTML viewer /report.html, not the CLI.
Stop conditions
- Do not
git commitorgit end-turn. - Do not run
cells runas a substitute for convert. - Do not
pixi add/uv add; loadadd-python-package. - Missing skill or missing source → one-line skip.
- Do not name
--htmlorpython -m skore_skills site buildunless the user asked for HTML or a site viewer. Tell the user paths, not the CLI.
Signals
- GitHub stars
- 132
- Forks
- 9
- Last commit
- Sep 2026
Advanced
- Item type
- skill
- Key
export-ml-notebook- Source
- github.com/probabl-ai/skills