agentbull/ankole/jupyter-live-kernel
Claude Code and agent skill by agentbull/ankole
- community
Checking that the SKILL.md file is still in the repository.
Use for iterative Python via a live Jupyter notebook kernel, especially data science, DataFrame inspection, and stateful API exploration. Prefer a one-shot Python process for stateless scripts.
Install
npx vskill@latest install agentbull/ankole/jupyter-live-kernelSKILL.md
Jupyter Live Kernel
This is Ankole's built-in Unix-socket adapter around hamelnb. The implementation extends the vendored jupyter_live_kernel.py helper rather than introducing a separate notebook engine.
Use this skill when a task benefits from a live notebook kernel: variables persist across executions, notebook cells can be inspected or edited, and clean verification can restart and run the notebook from the saved file.
Prefer:
- One-shot shell execution for short Python scripts.
- Codex unified exec sessions for starting Jupyter and keeping the server process available across calls.
- This skill when you would normally want a Jupyter notebook or stateful Python REPL.
Runtime
Ankole Agent Computer images provide system Python, JupyterLab, ipykernel, and the hamelnb helper dependencies. A per-agent Python environment is optional and holds custom packages for the image Python version.
In the shell that runs these commands, set JUPYTER_SKILL_DIR to the directory value returned by the current skill_view call.
All helper traffic to Jupyter Server uses the session-local Unix socket. Do not start a TCP listener or pass port-based server selectors. Jupyter continues to own its private server-to-kernel transport internally.
Default to system Python. Create the per-agent env only when needed:
The bootstrap uses the image's /usr/local/bin/python wrapper and adds the image package directory through a .pth file. Repeated runs use that interpreter, including from an active Agent environment. The env stores only package deltas. If a saved env uses a different Python version, set ANKOLE_AGENT_PYTHON_ENV to a new directory; the bootstrap preserves the old directory.
File Analysis And Artifact Delivery
When the user asks for analysis of an uploaded file and expects a chart or file back, do not stop after saying that the server/session has started. Finish the artifact first, verify that the file exists in the Agent Home, and report its exact path. The calling main agent owns user-visible attachment delivery.
For a batch workflow, prefer one foreground shell call. It may start Jupyter in the background inside its own shell, but keep server startup, session creation, jupyter_live_kernel.py execute, artifact verification, and cleanup in that same call. For iterative work across calls, start Jupyter in a yielded Codex unified exec session, retain its session ID, and resume that exact session for later interaction instead of detaching an untracked process.
For readiness, use the explicit local REST API (curl --unix-socket "$JUPYTER_SOCKET" http://localhost/...) rather than jupyter_live_kernel.py servers; server discovery can miss a freshly-started server in constrained worker environments. When calling the hamelnb helper, pass --socket "$JUPYTER_SOCKET" so it does not depend on discovery.
For non-trivial multi-line Python, avoid shell-escaping the whole program into --code. For a disposable scratch script under temp/ in the current Workspace, create the code file inside the same foreground command with a single-quoted heredoc and then pass --code-file. This keeps ordinary Python syntax intact and avoids quoting bugs in f-strings, JSON, paths, or SQL. Use apply_patch instead when modifying an existing user/repo file; this workflow is only for temporary generated analysis code.
Minimal shape:
Start Jupyter
Start one Jupyter server per Session or Job Workspace. The socket belongs under its temp/ directory. Remove a stale socket before startup:
Run this command in a yielded Codex unified exec session so the server persists across calls, and retain the returned session ID. If using the per-agent env, replace python with "$AGENT_PYTHON".
Create A Live Notebook Session
If no notebook exists, create a scratch notebook:
Then create the live Jupyter session:
hamelnb executes against live notebook sessions. If execute says no live session matched the path, create or select the session first.
Core Loop
Use compact JSON output unless debugging.
The upstream hamelnb script supports uv run "$SCRIPT" ... through inline metadata. In Ankole, prefer python "$SCRIPT" ... because the computer image already owns the required dependencies.
Smoke test the bundled integration:
Target Selection
Resolve targets in this order:
- Server: if multiple Unix-socket servers are reachable, ask which socket path to use.
- Notebook path: if multiple live notebooks exist, ask which path to use.
- Session: if multiple sessions match a path, ask which session ID to pin.
Once selected, keep using the same --socket, --path, and when needed --session-id until the user asks to switch.
Editing And Verification
Use contents to get cell IDs before editing:
Keep restart, run-all, and restart-run-all for explicit verification or reset requests:
Failure Handling
- First execution after server start can timeout while the kernel initializes; retry once.
- If startup reports that the socket is already in use, stop the owning server or remove the stale socket before restarting.
- If the server returns 403, restart it with disabled token/password and
--ServerApp.disable_check_xsrf=True. - If package imports fail, decide whether the package belongs in the system baseline or the per-agent env. Task-specific packages go in
~/.ankole/python. contentsreads the saved notebook file. Unsaved frontend edits are not visible to hamelnb until saved.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingapp/library/skills/jupyter-live-kernel/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
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/agentbull/ankole/jupyter-live-kernel)