/lab:lab-jupyterfrom lab
Start, reuse or reconnect to a Jupyter Lab or notebook on a lab HPC cluster (arc/chimera GPU, ircbc CPU), tunnelled to the local machine. Use when the user wants Jupyter on the cluster, an ssh tunnel or port forward to a compute node, or a GPU node in a local browser. Cluster-aware: arc/chimera = zhoulab_gpu_priority Slurm job + ssh -L tunnel; ircbc = Jupyter inside the lab's Singularity image (lab-containers). Confirm the sbatch with the user first.
Ships in lab. 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.
Serve Jupyter from a compute node and open it at http://localhost:<port> locally. <port> defaults to 9990 unless personal.md says otherwise, and lab-hpc's rules hold throughout.
Which cluster is the user's call: ask or infer, never pick silently. One lifecycle — reuse, submit, token, tunnel, cleanup — serves both clusters; the commands below are arc's.
| Parameter | arc (chimera) — partitions and cost in lab-hpc's references/arc-slurm.md | ircbc — read lab-hpc's references/ircbc-hpc.md and references/ircbc-slurm.md first |
|---|---|---|
| List jobs, get the node | squeue --me; %N is the node's ssh alias | squeue -u $USER (Slurm 18.08 has no --me); nodes are cpu01…cpu08 |
| Submit | partition zhoulab_gpu_priority; <jupyter> runs natively — take its absolute path from personal.md, else ssh <node> 'bash -lc "which jupyter"', since only a login shell sees user-installed tools. Still unknown? Ask; never guess-install | partition compute_cpu (no GPU); Jupyter runs inside liulab-runtime_<env>.sif — take the sbatch verbatim from lab-containers → references/using-images.md, § "Jupyter Lab in the container" |
| Job log = token source | sbatch/jupyter.<jobid>.log | $LIU_LAB_PACKAGES/logs/jupyter.<jobid>.log |
Reusing an idle job is not just courtesy — it is how you avoid the login node altogether. Find the node you already hold (lab-hpc's SOP). On arc a node you hold no job on refuses ssh quickly — probing never hangs; ircbc has no such gate, so confirm a node is yours before working on it.
The whole Slurm client works from a compute node on both clusters, so list jobs from there — squeue --me -h -o "%i %j %T %N %L", falling back to ssh arc '<same>' only when you hold no job anywhere.
For each RUNNING job that looks reusable (reserve, jupyter, ray, …), probe its node: ssh <node> 'ss -tln | grep -E "127\.0\.0\.1:<port>"'.
lab-containers just rebuilt the SIF, the running job still holds the old image, so ask whether to cancel and resubmit instead.Here the login node earns its one use: you hold no allocation, so nothing else can submit the first job. Resources are the user's call — ask for --cpus-per-task, --mem-per-cpu, --gpus and --time (personal.md may carry defaults).
zhoulab_gpu_priority is the lab's own partition — no cost, and usually a far shorter wait than the shared gpu queue — but it is PreemptMode=REQUEUE: warn that a requeue moves the job and kills the tunnel.
Show the exact command and get confirmation before submitting, offering sbatch --test-only beside it — a dry run that submits nothing and prints the projected start time, so check the wait rather than guess.
Jupyter binds to localhost on the compute node only — never 0.0.0.0; the tunnel is the only thing that should reach it.
ssh arc 'mkdir -p sbatch && sbatch --job-name=jupyter --partition=zhoulab_gpu_priority --time=<time> --cpus-per-task=<cpus> \
--mem-per-cpu=<mem> --gpus=<gpus> --output=sbatch/jupyter.%j.log --error=sbatch/jupyter.%j.log --wrap "<jupyter> lab --no-browser --port=<port>"'
ssh arc 'squeue -j <jobid> -h -o "%T %N"' # poll to RUNNING, then re-probe until the port answers
Grep the job log (paths above) for ?token=: grep -m1 "?token=" sbatch/jupyter.<jobid>.log, from the node you hold or via ssh arc '…'. A reused job, or a log with no token yet, is references/tunnel.md's business.
lsof -nP -iTCP:<port> -sTCP:LISTEN || true # must print nothing — if busy, references/tunnel.md
ssh -f -N -L <port>:localhost:<port> <node> # node aliases ProxyJump through the login node
curl -s http://localhost:<port>/api # → {"version": ...}
Then hand the user http://localhost:<port>/lab?token=<token>.
pkill -f "ssh -f -N -L <port>" — safe here, this flow created it. Kill nothing else.scancel <jobid> — ask first. A reservation may be deliberately long-lived, and a job you did not start is never yours to cancel.What SKILL.md sets; muted values are Claude Code's defaults
38 skills in this plugin
/broRestate the last message in plain human language, with no jargon./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary./code-reviewReview the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/spec asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X".Other plugins' skills for the same job
npx claudepluginhub liuhlab/liulab-skills --plugin lab