lab-hpc
Skill1 starsChanged 14 days agoMITView on GitHub
Lab HPC clusters (arc/chimera GPU, ircbc CPU) and remote compute on them. Use whenever a task involves ssh to a lab server, Slurm jobs (sbatch, srun, squeue, salloc), compute or login nodes, running code remotely, or moving files to a cluster. Read it BEFORE the first ssh of a session: it decides where every command runs. Covers the zhoulab_gpu_priority partition, syncing code local -> GitHub -> remote, host aliases, choosing a cluster, per-user config, and the rule that work belongs on a compute node, never on the shared login node.
- Reads credentials
In this repository36 other files it gives its agents.
- AGENTS.mdAGENTS.md
- broSkill
- codebase-designSkill
- code-reviewSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- hq-modeSkill
- implementSkill
- implement-specSkill
- improve-codebase-architectureSkill
- ketchupSkill
- lab-containersSkill
- lab-edisonSkill
- lab-jupyterSkill
- lab-setupSkill
- prototypeSkill
- prSkill
- researchSkill
- retroSkill
- setup-matt-pocock-skillsSkill
- tddSkill
- teachSkill
- technical-writingSkill
- to-questionnaireSkill
- to-specSkill
- to-ticketsSkill
- triageSkill
- unslopSkill
- unslop-zhSkill
- wait-whatSkill
- wayfinderSkill
- writing-for-agentsSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 3 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Before designing a large-data pipeline or starting a long data job, read and apply cluster-run, including on a held node.
- Very specific: line 21
Run bash scripts/check-hpc-config.sh (--live also tests ssh).
- Very specific: line 25
Read ~/.claude/lab/personal.md — usernames, code dirs, the standing job, sbatch defaults.
- Distinctive: line 27
Ask which cluster unless context pins it down.
- Very specific: line 35
Run project code on a cluster through
pixi run,: not the system python3. - Distinctive: line 42
Only two reasons justify a login node:
- Very specific: line 52
Check personal.md, then probe aliases with ssh -o BatchMode=yes -o ConnectTimeout=10 <alias> true.
- Very specific: line 56
Put each probe's commands into one ssh call: every call is a connection through the login node.
- Distinctive: line 59
No node anywhere?: Only then use the login node, and only to fix that: show the exact sbatch/salloc, get confirmation, submit, poll to …
- Very specific: line 80
If ssh to ircbc hangs, stop and tell the user to check the VPN (atrust, managed by hand).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Lab HPC clusters & remote-compute workflow
Per-cluster detail is in references/: *-hpc.md for hosts, network and storage; *-slurm.md for partitions and submitting.
Before designing a large-data pipeline or starting a long data job, read and apply
cluster-run, including on a held node.
Step 0 — before the first ssh
- Run
bash scripts/check-hpc-config.sh(--livealso tests ssh). If the cluster the task needs isNOT CONFIGURED, refuse: name the missing aliases, point at the README's "Per-user config", never improvise with raw addresses or keys, and resolve hosts from~/.ssh/configonly.config dir: OLD LOCATION→ refuse too, and relay the printed fix for the user to run. - Read
~/.claude/lab/personal.md— usernames, code dirs, the standing job, sbatch defaults. It overrides this skill. Say so if it is absent. - Ask which cluster unless context pins it down. Then develop locally, push to GitHub,
and
git pullon the remote — code reaches a cluster through git, not scp.
Shell and environment
- The local shell on lab Macs is zsh. Quote every URL (
?and*are globs). An unquoted$varis not split into words, so use an array. End a probe that may find nothing with|| true, so an empty result doesn't hide real errors. - Run project code on a cluster through
pixi run, not the systempython3.
Work on a compute node, not the login node
Get onto a compute node and stay there. A login node is one shared machine per cluster, and a
fan-out of "small" agent commands takes it down. ssh arc '<cmd>' is the wrong reflex even for
a one-liner: the whole Slurm client (squeue, sbatch, scancel) runs on the compute node.
Only two reasons justify a login node:
- You hold no job, so no compute node is yours yet. Only a login node can submit that first one.
- The compute node lacks what you need: on ircbc, internet and
git. On arc, nothing: its compute nodes have internet and a full toolchain, so once you hold one, never leave.
SOP — take a foothold, then keep it
- Find and reuse the node you already hold. The lab parks a long-lived idle GPU job on arc for this.
Check
personal.md, then probe aliases withssh -o BatchMode=yes -o ConnectTimeout=10 <alias> true. Judge by exit status, not stderr. - Land and stay. On arc, wrap commands in a login shell —
ssh <node> 'bash -lc "…"'— orpixiand other user-installed tools are invisible. Put each probe's commands into one ssh call: every call is a connection through the login node. If ssh hangs after a network drop, clear the stale shared connection withssh -O exit <alias>, then retry once. - No node anywhere? Only then use the login node, and only to fix that: show the exact sbatch/salloc, get confirmation, submit, poll to RUNNING, ssh in, and leave. If a foothold is preempted, repeat this step.
Watching a job
Poll a job only with bash scripts/watch-job.sh <alias> <jobid> [file] in the background, never
a sleep loop; -h lists its exit codes. Every job-watching subagent's brief names it.
Hard rules
- Work on a compute node; the login node has exactly the two uses above.
- No sbatch/srun outside an approved run plan. Approved before the pilot, sized for the
full run, scripts shown: work folder, partitions, most CPU, memory and wall time per job,
most jobs at once, target measure and range. Inside it, submit and cancel its own jobs
unasked. A job or pilot estimate past a limit needs a revised plan. Cancelling a job the
plan did not start, and writes to shared data or the shared package store, need a yes.
Post it on the run's issue (or work folder README); quote it verbatim in subagent briefs.
It ends with the run. No plan: a yes per script. Probes like
squeueneed none. - Reachable never means permitted. ircbc lets you ssh to a node you hold no job on; working there steals from the scheduler. Hold an allocation.
- If ssh to
ircbchangs, stop and tell the user to check the VPN (atrust, managed by hand). arc is not behind it. Never retry in a loop.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

