/xtralab:guided-code-walkthroughfrom xtralab
Drives the JupyterLab UI via MCP commands to open files, highlight lines, and render charts/diagrams in side panels. Use for visual code walkthroughs instead of chat-only explanations.
Ships in xtralab. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
xtralab exposes the running JupyterLab frontend to coding agents through an MCP command bridge. You can open files, highlight lines, and render rich content into side panels by sending the same commands the UI itself dispatches. This turns a chat answer into a guided tour: the user watches their editor open the right file and jump to the right line, with the explanation beside it.
The catch is scale. The frontend registers more than 480 commands, far too many to scan each time. This skill gives you the ~25 that matter for walkthroughs, with their verified argument shapes, so you act precisely instead of guessing.
The jupyter MCP server (package jupyter-server-mcp, frontend bridge
jupyterlab-commands-toolkit) gives you exactly two tools:
list_all_commands(query?) returns every registered command. Pass a
query to filter by id, label, caption, or description (case-insensitive),
for example list_all_commands(query="console"). The full list is large;
always filter. Each entry has id, label, an optional caption, and args.execute_command(command_id, args?) runs one command and waits for the
frontend's result, returning { success, result, error }.args is a JSON Schema, not the arguments themselves. The real parameter
names live under args.properties, and args.required lists the mandatory
ones. Pass arguments to execute_command as a plain object:
execute_command("docmanager:open", { "path": "src/index.ts" }).
Read references/commands.md for the curated catalog with each command's verified argument shape.
When the user asks you to walk them through something, build it up in the
Walkthrough panel with xtralab:walkthrough instead of narrating only in
chat. The panel is a read-only column in the side area that accumulates the
whole tour, so the user reads at their own pace and can scroll back; the agent's
chat can otherwise race ahead of what they are reading.
execute_command("xtralab:walkthrough", {
"title": "1. The plugin array",
"body": "`src/index.ts` exports an **array** of plugins. Each is activated independently.",
"path": "src/index.ts", // optional: opens it full-width and highlights
"line": 30,
"endLine": 48
})
Each step can carry:
title and body (Markdown: prose, code snippets, lists, math, and Mermaid
diagrams from a ```mermaid block).path + line/endLine: a code reference. Adding it opens the file
full-width in the editor (no split) and highlights the lines, and the step
keeps an "Open …" button so the user can jump back later.media: an embedded visual, { mimeType, data } (e.g. a Vega-Lite spec).reset: true to clear the panel and start a fresh tour (use it on step 1).So a tour is a sequence of xtralab:walkthrough calls. Narrate briefly in chat
too, but the panel is the durable artifact the user follows.
| Goal | Command | Notes |
|---|---|---|
| Build a guided tour (recommended) | xtralab:walkthrough { title?, body?, path?, line?, endLine?, media?, reset? } | xtralab command. Appends a step to the read-only side panel; a step with a path opens the file full-width and highlights it. |
| Open a file in the editor | docmanager:open { path } | Opens full-width with the right viewer. |
| Highlight a range of lines | xtralab:highlight-lines { path?, line, endLine?, reveal? } | xtralab command. Opens the file if needed, scrolls, and paints a persistent overlay. Clear with xtralab:clear-highlights. |
| Highlight text matches | documentsearch:start { searchText } | Opens the find overlay and highlights every match. Clear with documentsearch:end. |
| Show a standalone panel | xtralab:show { mimeType, data, label?, id? } | xtralab command. Renders Markdown/Vega-Lite/HTML/image into a side panel (defaults to the side area, so it never splits the editor). |
| Show ad-hoc raw text/code | code-viewer:open { content, label?, mimeType? } | Read-only viewer for a snippet, diff, or log. Raw text only; does not render Markdown. |
| Focus the layout | application:set-mode { mode: "single-document" } | Hides tabs and side panels for a clean stage. "multiple-document" restores. |
| Switch theme | apputils:change-theme { theme } | The value is the theme's registered display name, e.g. "Pierre Dark", not the package id. |
For any "show me / walk me through" request:
list_all_commands(query="docmanager:open"). A normal result means a JupyterLab tab is connected. A timeout means no frontend is listening (see Gotchas); tell the user to open or focus their xtralab window, and stop.xtralab:walkthrough with reset: true and your first step.title, a short body, and the path/line/endLine it is about; the editor follows along full-width and highlights, and the step is saved with a jump-back button.media (a Vega-Lite chart, an SVG diagram) on a step, or a Mermaid block inside body.xtralab:clear-highlights removes highlights; the panel and any xtralab:show panels close like any tab.These are verified behaviors of the bridge, not guesses:
"Command timed out after 10.0 seconds". This is the first thing to check.success is the signal, not result. Commands that return a widget or other non-JSON value come back as { success: true, result: "[Complex object - cannot serialize]" }. Treat success: true as "it worked"; do not parse result for those.xtralab:show dock in the side area, so opening files never splits the editor. Pass area: "main" to xtralab:show only if you deliberately want a document-area split.xtralab:highlight-lines works in CodeMirror file editors, not notebooks, terminals, or the settings editor.xtralab:show render Markdown, Vega-Lite, HTML, and images with no kernel. Reach for a notebook only when the result must be computed by running code, and note the shipped kernel is minimal (matplotlib/pandas not guaranteed); see references/rich-display.md.If the user says "show me", "walk me through", "open", "highlight", "plot", or "visualize", you want this skill. If they say "change the default", "hide", "disable", or "set up", you want customize-jupyterlab.
list_all_commands.xtralab:walkthrough, plus the lower-level highlight and panel moves.xtralab:show, and the notebook fallback for computed output.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub jtpio/xtralab --plugin xtralab4 skills in this plugin
/customize-jupyterlabUse this skill whenever the user wants to change how JupyterLab or xtralab looks or behaves — hide or show sidebar tabs, change the default theme, disable extensions, hide the status bar, move the activity bar, register a language server, tweak CodeMirror or notebook defaults, customize the xtralab launcher or sidebar, change keyboard shortcuts, edit context or menu items, set per-user defaults that survive reinstalls. Also use it when the user wants to _add_ new UI or behavior — a toolbar button, status-bar item, sidebar panel, custom command, menu entry, launcher card, file handler, mime renderer, or any "ad-hoc extension" — since those need a labextension, not a config tweak. Use it even when the user does not say "JupyterLab" or "xtralab" explicitly, as long as the context is a Jupyter notebook environment or the xtralab desktop app. Teaches the four config surfaces (page_config.d, default_setting_overrides.d, jupyter_server_config.d, lab/user-settings) and the fifth surface for runtime behavior (`share/jupyter/labextensions/`), how to find them with `jupyter --paths`, and where to write changes safely without touching installed package files./openStart xtralab (JupyterLab) in a folder from the terminal and open it in the browser. Use when the user asks to open, start, launch, or show xtralab or JupyterLab for a folder, a git worktree, or the current project, for example "open xtralab in this worktree", "start xtralab here", "show me these changes in xtralab". Runs `uvx xtralab open`, so nothing is installed into the project. Prints the URL, reuses a server that already serves the folder, and can update xtralab to the latest release./stopStop the xtralab (JupyterLab) server that serves a folder, stop all xtralab servers, or list the running ones. Use when the user asks to stop, close, shut down, or kill xtralab or JupyterLab for a folder, a git worktree, or the current project, or asks which xtralab servers run, for example "stop xtralab", "close the xtralab server for this worktree", "stop all xtralab servers", "which xtralab servers are running?". Runs `uvx xtralab stop` and `uvx xtralab list`, which find servers by folder, so no port is needed.Other plugins' skills for the same job