Back to Skills

jupyter-notebook-writing

Write Milvus application-level Jupyter notebook examples using a Markdown-first workflow with jupyter-switch for format conversion.

Updated 7/2/2026

Security Assessment

Medium Risk(65/100)

Detected risks:

Secret Exposure([SKILL.md] API_KEY=)
Sensitive File Access([references/bootcamp-format.md] .env, [SKILL.md] .env)
Security Score65/100

About jupyter-notebook-writing

Write Milvus application-level Jupyter notebook examples through a Markdown-first developer-relations workflow. The core idea is that raw `.ipynb` files are awkward JSON documents full of metadata, execution counts, and cached outputs, so the skill keeps a clean `.md` file as the source of truth and converts it to a runnable notebook with the `jupyter-switch` tool invoked via `uvx`. Python fenced code blocks become code cells while all other Markdown becomes markdown cells; conversion runs in both directions and never deletes the original input, writing a `.bak` backup if an output file already exists.

Reach for it when creating or editing a notebook that demonstrates Milvus in an application context such as RAG, semantic search, or hybrid search. Prerequisites are Python 3.10 or newer and uv. A typical notebook follows a fixed template: title, prerequisites, setup with a MilvusClient connection, data preparation, collection creation and insertion, query or search, and cleanup.

The skill also details how to execute notebooks reliably. Because the system default environment may lack the required packages, it walks through detecting conda or mamba environments and registered Jupyter kernels, asking the user which environment to use, and registering a kernel with ipykernel when needed before running `jupyter execute --kernel_name=<name>`. Before a test run it comments out setup-only cells such as `pip install` cells, API-key placeholder cells, and mock or demo cells so they stay in the notebook structure but do nothing, with credentials supplied externally as environment variables instead. Two bundled references, bootcamp-format.md and milvus-code-style.md, cover tutorial layout and pymilvus coding conventions and should be read when the task touches those topics.

FAQ

What prerequisites does this skill require?

Python 3.10 or newer and uv, so that the `uvx` command is available to run jupyter-switch. FFmpeg and other tools are not needed.

Why edit Markdown instead of the .ipynb directly?

Jupyter `.ipynb` files are complex JSON with metadata, outputs, and execution counts that are painful for AI to edit directly. The `.md` file is kept as the source of truth and converted to a notebook.

How does conversion map Markdown to notebook cells?

Python fenced code blocks become code cells and everything else becomes markdown cells. Cell outputs are not preserved in the `.md`; they are regenerated when the notebook runs.

Will converting overwrite my existing files?

No. The original input file is never modified or deleted, and if the output file already exists a `.bak` backup is created automatically.

How do I run a notebook when the default environment lacks packages?

Detect available conda/mamba environments, Jupyter kernels, or a local venv, ask the user which to use, register it as a kernel if needed, then run `jupyter execute --kernel_name=<name>` after commenting out pip install and API-key cells.

All Files

3 files
references/milvus-code-style.md4.5 KB
View
references/bootcamp-format.md8.0 KB
View
SKILL.md8.7 KB
View

Install jupyter-notebook-writing

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill