/jupyterlab-skills:jupyterlab-distributionfrom jupyterlab-skills
Package a customized JupyterLab as one installable Python package - a "distribution" such as xtralab - that brings JupyterLab, its configuration (disabled plugins, default settings, layout, menus), its extensions and themes, extra dependencies, a launch command and its own name. Use it when the user wants an artifact to install or share instead of changes in one environment - "make this a package", "create my own JupyterLab app", "something I can pip install", "ship these customizations to my team", "turn this environment into a wheel". Gives a script that scaffolds the project, imports customizations already made in an environment, and checks the project and the wheel; plus the steps to build, test in a clean environment, and brand the application.
Ships in jupyterlab-skills. 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; scripts run unread.
A distribution is a normal Python package whose wheel carries data files
that pip copies below sys.prefix:
etc/jupyter/labconfig/page_config.d/<name>.json disabled plugins, appName
etc/jupyter/labconfig/default_setting_overrides.d/<name>.json default settings
share/jupyter/labextensions/<extension>/… extensions and themes
JupyterLab reads these folders at startup. The package depends on
jupyterlab and on any extension packages it wants, and it adds a command
that starts the application. No build of JupyterLab, no Node.js.
python scripts/jlab_dist.py new my-lab --app-name "My Lab" --python <env>/bin/python
Create the project (above). --python pins the JupyterLab version
range to that of an environment. Other options: --command (name of the
launch command, default: the package name), --dir (name of the project
folder, default: the package name), --description,
--depends <requirement> (repeat for each extra dependency), --dest.
Fill it, in one of two ways (they combine):
Write into the project: config with
jlab_config.py --config-dir my-lab/jupyter-config --name my-lab …
(skill jupyterlab-settings), extensions with
jlab_ext.py new <ext> --dest my-lab/labextensions (skill
jupyterlab-extensions), themes with
new_theme.py <theme> --dest my-lab/labextensions (skill
jupyterlab-theming).
Import from an environment that you customized and tested:
python scripts/jlab_dist.py collect my-lab --python <env>/bin/python
It merges the snippets named 50-custom.json (the default name of
jlab_config.py; change with --snippet) and copies the extensions that
jlab_ext.py installed (add others with --extension <name>).
Run it while you work, with no install. The server reads the project folders directly:
python <verify>/jlab_server.py start --name my-lab --python <env>/bin/python --project my-lab --root-dir /tmp/my-lab-demo
node <verify>/jlab_probe.cjs --server my-lab --fail-on-console-error --screenshot my-lab.png
After a change to a JSON file: jlab_server.py restart --name my-lab.
<env> is any environment with JupyterLab that does not have the
distribution installed. The inspect script reads the project the same
way: <env>/bin/python <inspect>/jlab_inspect.py --project my-lab overrides.
Check the project, before each build. --fix marks every extension
in labextensions/ as owned by the package (themes and extensions that
other scripts created are not). It also writes a new stamp for each
extension whose static/ files changed: without it, the browser of a
person who upgrades keeps the JavaScript and CSS of the old version.
python scripts/jlab_dist.py check my-lab --fix
Build the wheel:
cd my-lab && uv build --wheel
Without uv: python -m pip install build && python -m build --wheel.
Check the wheel (check lists its data files when dist/ has one),
then test in a clean environment. This is the real test: it proves
that the wheel alone carries everything.
uv venv /tmp/my-lab-test && uv pip install --python /tmp/my-lab-test/bin/python dist/my_lab-0.1.0-py3-none-any.whl
python <verify>/jlab_server.py start --name my-lab --cmd /tmp/my-lab-test/bin/my-lab --root-dir /tmp/my-lab-demo
node <verify>/jlab_probe.cjs --server my-lab --expect-title "My Lab" --fail-on-console-error --screenshot my-lab.png
<verify> is scripts/ of the skill jupyterlab-verify, <inspect>
that of jupyterlab-inspect. Without uv: python -m venv and
pip install.
Hand over: the path of the wheel, the install and run commands, and what the distribution changes. Do not publish to PyPI and do not push to a remote unless the user asks.
my-lab/
├── pyproject.toml
├── README.md
├── my_lab/
│ ├── __init__.py version
│ ├── __main__.py python -m my_lab
│ └── cli.py the `my-lab` command
├── jupyter-config/ → etc/jupyter/
│ └── labconfig/
│ ├── page_config.d/my-lab.json
│ └── default_setting_overrides.d/my-lab.json
└── labextensions/ → share/jupyter/labextensions/
└── my-lab/ core extension of the application
├── package.json
├── install.json
├── schemas/my-lab/plugin.json menus, toolbar items, shortcuts, settings
└── static/
├── remoteEntry.js plugins: starts with an About command
└── style.css
The two arrows are these lines of pyproject.toml:
[tool.hatch.build.targets.wheel.shared-data]
"jupyter-config" = "etc/jupyter"
"labextensions" = "share/jupyter/labextensions"
jupyter-config/ and labextensions/ goes into the
wheel. Keep only what must ship.labextensions/ is one extension. The core extension
my-lab is the place for the code and CSS of the application itself. Its
schema belongs to the plugin my-lab:plugin: declare the menus, toolbar
buttons and shortcuts of your own commands there (skill
jupyterlab-extensions). Add more folders for themes or for separate
features. Real folders only: no symlinks.my-lab.json): files of different
packages in the same .d folder must not collide.jupyter-config/jupyter_server_config.d/my-lab.json to enable a server
extension of the package.my_lab/cli.py starts JupyterLab with two additions:
A separate user state. It sets JUPYTERLAB_SETTINGS_DIR and
JUPYTERLAB_WORKSPACES_DIR to a folder of the distribution
(<user config>/my-lab/). Settings that the user saved in a plain
JupyterLab then do not hide the defaults of the distribution, and the
reverse.
Default arguments. DEFAULT_ARGS holds server options that config
files cannot ship (general options in jupyter_server_config.d have no
effect). Arguments of the user come after them and win:
DEFAULT_ARGS: list[str] = ["--LabApp.default_url=/lab/tree/welcome.ipynb"]
All jupyter lab options work: my-lab --port 9000 --no-browser.
Important: the config files apply to every JupyterLab that starts from
the environment where the package is installed, also a plain jupyter lab.
The environment is the application. Tell the user to install the
distribution in its own environment. Tools that do this by default:
uvx my-lab
uv tool install my-lab
pipx install my-lab
From a local wheel: uvx --from ./dist/my_lab-0.1.0-py3-none-any.whl my-lab.
| What | How | Skill |
|---|---|---|
| Name in the browser tab and in dialogs | "appName": "My Lab" in page_config.d/my-lab.json (the scaffold sets it) | jupyterlab-settings |
| Colors and fonts | Theme extension in labextensions/, set as the default theme | jupyterlab-theming |
| Logo, favicon, About dialog, splash screen, home page | Plugins in the core extension, which disables the core plugins it replaces | jupyterlab-extensions, references/replace-core.md |
| Fewer menus, toolbars, panels | Overrides and disabled plugins in jupyter-config/ | jupyterlab-settings |
| More features | --depends jupyterlab-git and other extension packages |
The scaffold already adds the command <name>:about ("About My Lab"). To
make it the Help → About entry, see replace-core.md: disable the core About
plugin, register help:about, and put the Help menu item back in the
schema.
pyproject.toml:
dependencies = [
"jupyterlab>=4.6,<5",
"jupyterlab-git>=0.51",
"ipywidgets",
]
jupyterlab brings ipykernel. Add
other kernels or libraries (pandas, matplotlib) when the application needs
them.version in pyproject.toml and in
<module>/__init__.py.jlab_dist.py check, build, test in a clean environment.jlab_inspect.py overrides there (it
flags plugin IDs and keys that no longer exist), and probe with
--fail-on-console-error.| Symptom | Cause |
|---|---|
| The wheel has no data files | The shared-data table is missing or the folders moved. jlab_dist.py check tells |
Config applies in the development environment but not after pip install | You tested with files in etc/jupyter of the development environment, not with the wheel. Test in a clean environment |
| The defaults do not apply for one user | The user has saved settings. With the launch command they are separate; with a plain jupyter lab in the same environment they are not |
| An extension of the wheel is not loaded | Its folder name differs from name in its package.json, or it is a symlink |
pip uninstall leaves folders | Only empty folders stay. Files that the package did not install (created by hand in the same folders) also stay |
noarch: python,
pip install .). The data files go to $PREFIX/etc/jupyter and
$PREFIX/share/jupyter.pip install the wheel in the image, set the launch command as
the entry point with --ip=0.0.0.0 --no-browser.jupyter lite build). The same
extensions and overrides can be reused, but the packaging differs. See
https://jupyterlite.readthedocs.io.A full example of a distribution, with a TypeScript extension, a desktop application and a JupyterLite site: https://github.com/jtpio/xtralab
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub jtpio/jupyterlab-skills --plugin jupyterlab-skills8 skills in this plugin
/jupyterlab-customizeStart here for any request to change how JupyterLab looks or behaves. Covers disabling or hiding an extension or a part of the UI, changing a default (theme, layout, editor, notebook, file browser), editing menus, toolbars, context menus and keyboard shortcuts, adding a button, panel, command or home page, restyling or rebranding the application, and packaging the result as an installable JupyterLab distribution. Chooses the right mechanism (page config, setting overrides, user settings, server config, CSS or theme, new extension, Python package) and hands over to the companion skills jupyterlab-inspect, jupyterlab-settings, jupyterlab-extensions, jupyterlab-theming, jupyterlab-distribution, jupyterlab-remix and jupyterlab-verify. Use it also when the user does not say "JupyterLab" but works in a Jupyter notebook environment./jupyterlab-extensionsAdd new behavior to JupyterLab with an extension, created on the fly and without a build step. Use it when configuration is not enough - to add a command, a toolbar or top-bar button, a menu with new actions, a sidebar or main-area panel, a status bar item, a launcher card, a custom home page, a file type, a keyboard shortcut for a new action, a settings schema, or to replace a core part such as the launcher, the splash screen, the logo or the About dialog. Gives a script that scaffolds, checks and installs a plain-JavaScript prebuilt extension into an environment or a distribution project, verified code patterns for the common extension points, and the TypeScript build path for extensions that need npm dependencies. Use it for requests such as "add this to the UI", "add a button that…", "create an extension", "replace the launcher"./jupyterlab-inspectFind out how a JupyterLab installation is set up before you change it. Use it to locate the config and data folders and the right place to write, to find the exact ID of a plugin, setting, command, menu, toolbar item or sidebar widget, to read the schema and default of a setting, to see which extensions are installed, and to explain why a customization does not apply (effective page config, effective overrides, user settings that hide a default). Use it before any JupyterLab customization, and when the user asks "what is the ID of…", "where does JupyterLab read…", "which extensions are installed", or "why does my setting not work"./jupyterlab-remixBuild a new application from JupyterLab packages - a "remix" with its own JavaScript bundle and its own server class, in place of a customized JupyterLab. Use it when configuration and prebuilt extensions are not enough - an application that compiles in only a chosen subset of the JupyterLab core plugins, an application with its own shell and layout (a single-document notebook application, a kiosk, a dashboard) in the style of Jupyter Notebook 7 or jupyterlab-app-cookiecutter, or a page that embeds one JupyterLab component with no plugin system, as the examples folder of the JupyterLab repository does. Gives a scaffold script with templates that were built and run, a planner that tells which core packages a selection needs and which plugins to disable, the build and packaging steps to a wheel, and the browser checks. Use it for requests such as "build my own application on JupyterLab components", "a minimal notebook app", "remix JupyterLab", "custom shell", "embed a notebook in a page"./jupyterlab-settingsChange JupyterLab with configuration files, no code. Use it to disable, enable or lock a plugin or a whole extension (status bar, extension manager, debugger, announcements, launcher, table of contents…), to change the default of any setting (theme, autosave, line numbers, file browser, terminal, notebook, completer), to move panels between the left, right, main and bottom areas, to edit the main menu, context menu, toolbars and keyboard shortcuts, to rename the application, and to set server options that affect the UI. Covers page config, default setting overrides, user settings and server config, their precedence, and a script that writes them with validation. Use it for requests such as "disable this extension", "hide this part of the UI", "make this the default", "remove this menu", "change this shortcut"./jupyterlab-themingChange the look of JupyterLab - colors, fonts, spacing, density, the style of tabs, toolbars, sidebars, notebook cells and the launcher, and which elements show. Use it to create a custom theme (light, dark, or a pair) without a build step, to set it as the default, to restyle or hide parts of the interface with CSS, to bundle fonts, and to choose between a theme, an extension stylesheet and custom.css. Gives a script that scaffolds a complete theme extension from a built-in theme, the command that lists the theme CSS variables, and the selectors of the main interface parts. Use it for requests such as "make it look like…", "change the colors", "use this font", "dark mode by default", "make the UI more compact", "brand it".