hamelsmu/hamelnb/jupyter-live-kernel
Claude Code and agent skill by hamelsmu/hamelnb
- community
Checking that the SKILL.md file is still in the repository.
Work against a live local Jupyter notebook kernel. Use this when an agent needs a Jupyter-like in-memory REPL, wants to inspect or edit a notebook while keeping the kernel alive, or needs an explicit verification pass at the end.
Install
npx vskill@latest install hamelsmu/hamelnb/jupyter-live-kernelSKILL.md
hamelnb
Use this skill when a local notebook kernel already holds useful state and you do not want to rerun expensive setup.
Starting JupyterLab
When launching JupyterLab for use with this skill, disable token and password auth so the script can access the server API without browser session cookies:
If the server is already running but returns 403 errors, restart it with these flags.
Core Loop
Run from the repo root.
Prefer uv for this skill. The helper script declares its runtime dependencies inline, so the default invocation is:
Because the script uses inline metadata, uv run "$SCRIPT" stays self-contained even when you launch it from inside this repo.
If the script is executable and uv is on PATH, direct execution also works:
Fallback:
- Use
python3 "$SCRIPT" ...only ifuvis unavailable and the required packages are already installed. - If you need to add a new runtime dependency to the helper script, prefer
uv add --script "$SCRIPT" <package>.
- Discover reachable servers.
- Find live notebooks.
- Inspect the saved notebook.
- Execute code incrementally in the live kernel.
- Edit saved notebook cells.
Use a real cell ID returned by contents.
To insert a new cell, use insert with --at-index, --before <int>, or --after <int>. Note: --before/--after accept integer indices, not cell IDs.
The available edit subcommands are: replace-source, insert, delete, move, clear-outputs.
Core guidance:
- Prefer
--cell-idover--indexfor existing cells (replace-source,delete,move). - For
insert, use--at-index(integer) — cell IDs are not accepted by--before/--after. - Use
executefor the normal loop. - Keep
restart,run-all, andrestart-run-allfor explicit verification or reset requests, not routine iteration. - Use
--save-outputswithrun-allorrestart-run-allto persist cell outputs into the notebook file so they appear in the JupyterLab UI. - When using
executewith--cell-id, outputs are automatically saved to the notebook file (no need to pass--save-outputsseparately). Without--cell-id, outputs are not saved. - To use the kernel as a pure REPL without persisting outputs, pass
--no-save-outputs. This suppresses the automatic save even when--cell-idis provided. Only use this flag when the user explicitly says they don't need the notebook updated (e.g. "run this headlessly", "I don't care about the notebook output"). Default to saving outputs.
Target Selection And Ambiguity
Always make the live target explicit before edits or execution. Never guess when more than one live option exists.
Required behavior:
- Resolve server first.
- If multiple reachable servers are discovered, ask the user to choose one.
- After selection, pass
--port(or--server-url) on all follow-up commands.
- Resolve notebook path second.
- If the user already specified
--path, use it. - Otherwise run
notebooksfor the selected server and collect candidates. - If there is exactly one live notebook, state it explicitly and proceed.
- If there are multiple notebook candidates, ask the user to choose one.
- Resolve session/kernel when needed.
- If multiple live sessions exist for the chosen path, ask the user to choose a session.
- Then pass
--session-idon execute/restart/run-all/variables commands to pin the exact kernel.
Claude Code ambiguity flow:
- Use
AskUserQuestionfor each ambiguity point (server, notebook, session) as a picker. - Keep each picker to one short question with a short header (
Server,Notebook,Session). - Option labels must include enough context to disambiguate:
- Server:
port,base URL. - Notebook:
path,port. - Session:
session id,kernel id,path. - After selection, confirm in plain language (for example:
Using port 8888, notebook notebooks/tiny-demo.ipynb, session 1234...), then continue.
Codex ambiguity flow:
- Ask a direct clarifying question in plain text listing candidates.
- Continue only after the user confirms a specific target.
Once selected, keep using the same port + path and, when applicable, session_id until the user asks to switch.
Advanced
Inspect live Python-kernel variables:
Verification commands:
Advanced guidance:
variablesis Python-only.run-allandrestart-run-allrequire a notebook-backed live session.run-allandrestart-run-allexit non-zero when a cell fails.run-allandrestart-run-allverify a saved snapshot loaded at the start.- Pass
--save-outputstorun-allorrestart-run-allto persist cell outputs and execution counts back into the notebook file. Without this flag outputs are not written back.
Transport
execute, variables, run-all, and restart-run-all default to --transport auto.
websocket: use Jupyter Server kernel channels at/api/kernels/<kernel_id>/channelszmq: fall back to the local kernel connection file withjupyter_clientauto: try websocket first, then use local ZMQ fallback only when the websocket request did not already reach the kernel
Prefer auto unless you are debugging transport behavior.
Limits
contentsreturns the saved notebook file, not unsaved browser edits.editwrites through the Contents API and changes the saved notebook on disk.- The stale-write guard is best-effort, not atomic.
- Concurrent notebook edits can invalidate a verification run after it starts.
- Concurrent execution from other clients can affect kernel state during verification.
- Variable listing is bounded to
--limit <= 100. - Variable preview is bounded to
--max-chars <= 2000and avoids arbitraryrepr(...)calls for non-scalar objects. - Workspace-derived notebook tabs are a persisted JupyterLab snapshot, not guaranteed real-time UI truth.
- Workspace-derived notebook tabs can include historical workspaces for the same relative path.
- The skill assumes local Jupyter runtime metadata is visible to the current user.
Resources
- Script: jupyter_live_kernel.py
- Architecture notes: jupyter-hooks.md
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/jupyter-live-kernel/SKILL.md
Popularity
- Repository stars
- 36
- Repository forks
- 1
- 7-day trend score
- 18
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hamelsmu/hamelnb/jupyter-live-kernel)