Jupyter Live Kernel (hamelnb) Gives you a stateful Python REPL via a live Jupyter kernel. Variables persist across executions. Use this instead of when you need to build up state incrementally, explore APIs, inspect DataFrames, or iterate on complex code. When to Use This vs Other Tools | Tool | Use When | |------|----------| | This skill | Iterative exploration, state across steps, data science, ML, "let me try this and check" | | | One-shot scripts needing hermes tool access (web search, file ops). Stateless. | | | Shell commands, builds, installs, git, process management | Rule of thumb: I…

...' quoting:\n```\nuv run \"$SCRIPT\" execute --path scratch.ipynb --code

Jupyter Live Kernel (hamelnb) Gives you a stateful Python REPL via a live Jupyter kernel. Variables persist across executions. Use this instead of when you need to build up state incrementally, explore APIs, inspect DataFrames, or iterate on complex code. When to Use This vs Other Tools | Tool | Use When | |------|----------| | This skill | Iterative exploration, state across steps, data science, ML, "let me try this and check" | | | One-shot scripts needing hermes tool access (web search, file ops). Stateless. | | | Shell commands, builds, installs, git, process management | Rule of thumb: I…

import os\\nfiles = os.listdir(\".\")\\nprint(f\"Found {len(files)} files\")' --compact\n```\n\n### 3. Inspect live variables\n\n```\nuv run \"$SCRIPT\" variables --path \u003cnotebook.ipynb> list --compact\nuv run \"$SCRIPT\" variables --path \u003cnotebook.ipynb> preview --name \u003cvarname> --compact\n```\n\n### 4. Edit notebook cells\n\n```\n# View current cells\nuv run \"$SCRIPT\" contents --path \u003cnotebook.ipynb> --compact\n\n# Insert a new cell\nuv run \"$SCRIPT\" edit --path \u003cnotebook.ipynb> insert \\\n --at-index \u003cN> --cell-type code --source '\u003ccode>' --compact\n\n# Replace cell source (use cell-id from contents output)\nuv run \"$SCRIPT\" edit --path \u003cnotebook.ipynb> replace-source \\\n --cell-id \u003cid> --source '\u003cnew code>' --compact\n\n# Delete a cell\nuv run \"$SCRIPT\" edit --path \u003cnotebook.ipynb> delete --cell-id \u003cid> --compact\n```\n\n### 5. Verification (restart + run all)\n\nOnly use when the user asks for a clean verification or you need to confirm\nthe notebook runs top-to-bottom:\n\n```\nuv run \"$SCRIPT\" restart-run-all --path \u003cnotebook.ipynb> --save-outputs --compact\n```\n\n## Practical Tips from Experience\n\n1. **First execution after server start may timeout** — the kernel needs a moment\n to initialize. If you get a timeout, just retry.\n\n2. **The kernel Python is JupyterLab's Python** — packages must be installed in\n that environment. If you need additional packages, install them into the\n JupyterLab tool environment first.\n\n3. **--compact flag saves significant tokens** — always use it. JSON output can\n be very verbose without it.\n\n4. **For pure REPL use**, create a scratch.ipynb and don't bother with cell editing.\n Just use `execute` repeatedly.\n\n5. **Argument order matters** — subcommand flags like `--path` go BEFORE the\n sub-subcommand. E.g.: `variables --path nb.ipynb list` not `variables list --path nb.ipynb`.\n\n6. **If a session doesn't exist yet**, you need to start one via the REST API\n (see Setup section). The tool can't execute without a live kernel session.\n\n7. **Errors are returned as JSON** with traceback — read the `ename` and `evalue`\n fields to understand what went wrong.\n\n8. **Occasional websocket timeouts** — some operations may timeout on first try,\n especially after a kernel restart. Retry once before escalating.\n\n## Timeout Defaults\n\nThe script has a 30-second default timeout per execution. For long-running\noperations, pass `--timeout 120`. Use generous timeouts (60+) for initial\nsetup or heavy computation.\n---","attachment_filenames":[],"attachments":[],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Jupyter Live Kernel (hamelnb)","type":"text"}]},{"type":"paragraph","content":[{"text":"Gives you a ","type":"text"},{"text":"stateful Python REPL","type":"text","marks":[{"type":"strong"}]},{"text":" via a live Jupyter kernel. Variables persist across executions. Use this instead of ","type":"text"},{"text":"execute_code","type":"text","marks":[{"type":"code_inline"}]},{"text":" when you need to build up state incrementally, explore APIs, inspect DataFrames, or iterate on complex code.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"When to Use This vs Other Tools","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Tool","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Use When","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"This skill","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Iterative exploration, state across steps, data science, ML, \"let me try this and check\"","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"execute_code","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"One-shot scripts needing hermes tool access (web_search, file ops). Stateless.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"terminal","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Shell commands, builds, installs, git, process management","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"Rule of thumb:","type":"text","marks":[{"type":"strong"}]},{"text":" If you'd want a Jupyter notebook for the task, use this skill.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Prerequisites","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"uv","type":"text","marks":[{"type":"strong"}]},{"text":" must be installed (check: ","type":"text"},{"text":"which uv","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"JupyterLab","type":"text","marks":[{"type":"strong"}]},{"text":" must be installed: ","type":"text"},{"text":"uv tool install jupyterlab","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"A Jupyter server must be running (see Setup below)","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Setup","type":"text"}]},{"type":"paragraph","content":[{"text":"The hamelnb script location:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"SCRIPT=\"$HOME/.agent-skills/hamelnb/skills/jupyter-live-kernel/scripts/jupyter_live_kernel.py\"","type":"text"}]},{"type":"paragraph","content":[{"text":"If not cloned yet:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"git clone https://github.com/hamelsmu/hamelnb.git ~/.agent-skills/hamelnb","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Starting JupyterLab","type":"text"}]},{"type":"paragraph","content":[{"text":"Check if a server is already running:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"uv run \"$SCRIPT\" servers","type":"text"}]},{"type":"paragraph","content":[{"text":"If no servers found, start one:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"jupyter-lab --no-browser --port=8888 --notebook-dir=$HOME/notebooks \\\n --IdentityProvider.token='' --ServerApp.password='' > /tmp/jupyter.log 2>&1 &\nsleep 3","type":"text"}]},{"type":"paragraph","content":[{"text":"Note: Token/password disabled for local agent access. The server runs headless.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Creating a Notebook for REPL Use","type":"text"}]},{"type":"paragraph","content":[{"text":"If you just need a REPL (no existing notebook), create a minimal notebook file:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"mkdir -p ~/notebooks","type":"text"}]},{"type":"paragraph","content":[{"text":"Write a minimal .ipynb JSON file with one empty code cell, then start a kernel session via the Jupyter REST API:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"curl -s -X POST http://127.0.0.1:8888/api/sessions \\\n -H \"Content-Type: application/json\" \\\n -d '{\"path\":\"scratch.ipynb\",\"type\":\"notebook\",\"name\":\"scratch.ipynb\",\"kernel\":{\"name\":\"python3\"}}'","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Core Workflow","type":"text"}]},{"type":"paragraph","content":[{"text":"All commands return structured JSON. Always use ","type":"text"},{"text":"--compact","type":"text","marks":[{"type":"code_inline"}]},{"text":" to save tokens.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"1. Discover servers and notebooks","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"uv run \"$SCRIPT\" servers --compact\nuv run \"$SCRIPT\" notebooks --compact","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"2. Execute code (primary operation)","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"uv run \"$SCRIPT\" execute --path \u003cnotebook.ipynb> --code '\u003cpython code>' --compact","type":"text"}]},{"type":"paragraph","content":[{"text":"State persists across execute calls. Variables, imports, objects all survive.","type":"text"}]},{"type":"paragraph","content":[{"text":"Multi-line code works with

Jupyter Live Kernel (hamelnb) Gives you a stateful Python REPL via a live Jupyter kernel. Variables persist across executions. Use this instead of when you need to build up state incrementally, explore APIs, inspect DataFrames, or iterate on complex code. When to Use This vs Other Tools | Tool | Use When | |------|----------| | This skill | Iterative exploration, state across steps, data science, ML, "let me try this and check" | | | One-shot scripts needing hermes tool access (web search, file ops). Stateless. | | | Shell commands, builds, installs, git, process management | Rule of thumb: I…

...' quoting:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"uv run \"$SCRIPT\" execute --path scratch.ipynb --code

Jupyter Live Kernel (hamelnb) Gives you a stateful Python REPL via a live Jupyter kernel. Variables persist across executions. Use this instead of when you need to build up state incrementally, explore APIs, inspect DataFrames, or iterate on complex code. When to Use This vs Other Tools | Tool | Use When | |------|----------| | This skill | Iterative exploration, state across steps, data science, ML, "let me try this and check" | | | One-shot scripts needing hermes tool access (web search, file ops). Stateless. | | | Shell commands, builds, installs, git, process management | Rule of thumb: I…

import os\\nfiles = os.listdir(\".\")\\nprint(f\"Found {len(files)} files\")' --compact","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"3. Inspect live variables","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"uv run \"$SCRIPT\" variables --path \u003cnotebook.ipynb> list --compact\nuv run \"$SCRIPT\" variables --path \u003cnotebook.ipynb> preview --name \u003cvarname> --compact","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"4. Edit notebook cells","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"# View current cells\nuv run \"$SCRIPT\" contents --path \u003cnotebook.ipynb> --compact\n\n# Insert a new cell\nuv run \"$SCRIPT\" edit --path \u003cnotebook.ipynb> insert \\\n --at-index \u003cN> --cell-type code --source '\u003ccode>' --compact\n\n# Replace cell source (use cell-id from contents output)\nuv run \"$SCRIPT\" edit --path \u003cnotebook.ipynb> replace-source \\\n --cell-id \u003cid> --source '\u003cnew code>' --compact\n\n# Delete a cell\nuv run \"$SCRIPT\" edit --path \u003cnotebook.ipynb> delete --cell-id \u003cid> --compact","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"5. Verification (restart + run all)","type":"text"}]},{"type":"paragraph","content":[{"text":"Only use when the user asks for a clean verification or you need to confirm the notebook runs top-to-bottom:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"uv run \"$SCRIPT\" restart-run-all --path \u003cnotebook.ipynb> --save-outputs --compact","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Practical Tips from Experience","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"First execution after server start may timeout","type":"text","marks":[{"type":"strong"}]},{"text":" — the kernel needs a moment to initialize. If you get a timeout, just retry.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"The kernel Python is JupyterLab's Python","type":"text","marks":[{"type":"strong"}]},{"text":" — packages must be installed in that environment. If you need additional packages, install them into the JupyterLab tool environment first.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"--compact flag saves significant tokens","type":"text","marks":[{"type":"strong"}]},{"text":" — always use it. JSON output can be very verbose without it.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"For pure REPL use","type":"text","marks":[{"type":"strong"}]},{"text":", create a scratch.ipynb and don't bother with cell editing. Just use ","type":"text"},{"text":"execute","type":"text","marks":[{"type":"code_inline"}]},{"text":" repeatedly.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Argument order matters","type":"text","marks":[{"type":"strong"}]},{"text":" — subcommand flags like ","type":"text"},{"text":"--path","type":"text","marks":[{"type":"code_inline"}]},{"text":" go BEFORE the sub-subcommand. E.g.: ","type":"text"},{"text":"variables --path nb.ipynb list","type":"text","marks":[{"type":"code_inline"}]},{"text":" not ","type":"text"},{"text":"variables list --path nb.ipynb","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"If a session doesn't exist yet","type":"text","marks":[{"type":"strong"}]},{"text":", you need to start one via the REST API (see Setup section). The tool can't execute without a live kernel session.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Errors are returned as JSON","type":"text","marks":[{"type":"strong"}]},{"text":" with traceback — read the ","type":"text"},{"text":"ename","type":"text","marks":[{"type":"code_inline"}]},{"text":" and ","type":"text"},{"text":"evalue","type":"text","marks":[{"type":"code_inline"}]},{"text":" fields to understand what went wrong.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Occasional websocket timeouts","type":"text","marks":[{"type":"strong"}]},{"text":" — some operations may timeout on first try, especially after a kernel restart. Retry once before escalating.","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Timeout Defaults","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"The script has a 30-second default timeout per execution. For long-running operations, pass ","type":"text"},{"text":"--timeout 120","type":"text","marks":[{"type":"code_inline"}]},{"text":". Use generous timeouts (60+) for initial setup or heavy computation.","type":"text"}]}]},"metadata":{"date":"2026-06-05","name":"jupyter-live-kernel","author":"@skillopedia","source":{"stars":175796,"repo_name":"hermes-agent","origin_url":"https://github.com/nousresearch/hermes-agent/blob/HEAD/skills/data-science/jupyter-live-kernel/SKILL.md","repo_owner":"nousresearch","body_sha256":"e398461b0d2d409498aa10092c84b78b05484cd39d8eecb5ee1ad52ebbc35871","cluster_key":"1c3679e202473e4e1b02ebd672cc58fc30c3299043133ce32e8bfe16e31c3f70","clean_bundle":{"format":"clean-skill-bundle-v1","source":"nousresearch/hermes-agent/skills/data-science/jupyter-live-kernel/SKILL.md","bundle_sha256":"af858a63fef33f56c0a9a38467dad972bf917078faabbc5783c3c5658075eff5","attachment_count":0,"text_attachments":0,"binary_attachments":0},"cluster_size":3,"skill_md_path":"skills/data-science/jupyter-live-kernel/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"data-analytics","category_label":"Data"},"exact_dupes_collapsed_into_this":2},"license":"MIT","version":"v1","category":"data-analytics","metadata":{"hermes":{"tags":["jupyter","notebook","repl","data-science","exploration","iterative"],"category":"data-science"}},"platforms":["linux","macos","windows"],"import_tag":"clean-skills-v1","description":"Iterative Python via live Jupyter kernel (hamelnb)."}},"renderedAt":1782980850050}

Jupyter Live Kernel (hamelnb) Gives you a stateful Python REPL via a live Jupyter kernel. Variables persist across executions. Use this instead of when you need to build up state incrementally, explore APIs, inspect DataFrames, or iterate on complex code. When to Use This vs Other Tools | Tool | Use When | |------|----------| | This skill | Iterative exploration, state across steps, data science, ML, "let me try this and check" | | | One-shot scripts needing hermes tool access (web search, file ops). Stateless. | | | Shell commands, builds, installs, git, process management | Rule of thumb: I…