/seawulf:using-seawulffrom seawulf
Manages Stony Brook University's HPC clusters (SeaWulf, NVwulf) via Slurm: connects through Duo, selects queues, submits CPU/GPU/array jobs, diagnoses failures, sets up conda/Python environments, and handles storage quotas and data transfer.
Ships in seawulf. 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.
SeaWulf is SBU's main cluster:
milan.seawulf.stonybrook.edu, for editing, installing and submitting;NVwulf is a separate GPU cluster (H200 / Blackwell). Many users are new to HPC: explain each choice in a plain sentence ("a shared queue, since you need 4 cores; it starts sooner than a whole node").
| Small CPU jobs | short-40core-shared / short-96core-shared: up to 4 h, part of a node. Set --mem: the default is only ~2.4 GB per core |
| Whole nodes | short-* 4 h · medium-* 12 h (6+ nodes) · long-* 2 days · extended-* 7 days. 40-core nodes 192 GB, 96-core nodes 256 GB |
| SeaWulf GPUs (A100 only; older types retired) | a100 (8 h) / a100-long (2 days): --gres=gpu:N, N ≤ 4. Per GPU ask ≤ 16 cores and ~60 GB --mem (default ~4 GB per core). 2 running jobs per user |
| NVwulf GPUs | debug-b40x4 (2 h, usually free) · b40x4 Blackwell 96 GB · h200x4 / h200x8 H200 141 GB (busy). Default 1 CPU per GPU: set -c and --mem. Over its 20 GB quota (home + scratch together), every job pends with QOSMaxJobsPerUserLimit: check lfs quota -h -u $USER /lustre |
| Login node | 3 CPUs and 15 GB per user (both clusters) |
| Storage | home 20 GB (backed up) · scratch 20 TB, purged after 45 days · project space up to 10 TB (PI requests) |
| Conda in a job | module load anaconda/3 then conda activate /path/to/env, inside the script. This works in batch jobs (verified). Don't swap it for a PATH hack: activation also sets library paths that packages like CUDA libraries rely on |
git, small installs and submitting are fine. Training, loading a model "to test it", big compiles or long loops go in a job.sbatch and other run-once actions never run twice. After an unclear failure, check squeue --me first.while squeue -h -j $ID | grep -q .; do sleep 30; done, not with repeated calls.scancel (only jobs started for this task), bulk rm, overwriting results.sw stop). RCI asks users to log out and not leave idle programs on login nodes. Submitted jobs keep running without it.Already on SeaWulf? If hostname is a SeaWulf login node (milan1/milan2/xeonmax), Claude is running on the cluster (Claude Code module): commands are local. Skip to step 2. The login-node limits apply to Claude itself too.
Otherwise, ask which way suits the user; none is best for everyone:
| Way | How Claude runs commands | Suits |
|---|---|---|
| One session from the laptop | The user logs in once in their own terminal; Claude runs scripts/sw start (one push), then sw run/put/get with no more pushes | Code and tools on the laptop; Windows needs WSL |
| SBU VPN | Duo was approved at VPN connect: plain ssh seawulf '<command>' | Users on the VPN anyway |
| Claude Code on SeaWulf | The user runs module load claude-code (in tmux) and claude auth login there, and installs this plugin there | Work that lives only on the cluster |
| Open OnDemand shell | The user pastes one-line commands into sn-ood.seawulf.stonybrook.edu and the output back | No setup possible |
For the laptop ways, run scripts/preflight.sh first. It checks the ssh entry, WSL and an open session without connecting, and says what the user must do next.
SW=<this skill's directory>/scripts/sw
"$SW" status
"$SW" start # sends ONE Duo push: tell the user first
"$SW" run 600 <<'EOF' # runs as its own login-shell bash on the login node; exit status is the script's
squeue --me
EOF
"$SW" put ./my-project /gpfs/scratch/$NETID/ # files or folders, up to 50 MB, no extra push
"$SW" get /gpfs/scratch/$NETID/run1/results ./ # and back
"$SW" stop # when done
The session runs one command at a time, and sw run stops a command on the cluster after SECS (exit 124), so nothing blocks the session for long. So keep sw run for quick work: long installs, training and anything waiting on the queue go in sbatch (or a blocking srun given a short SECS). Exit 3 means the session ended: ask before starting another. Setup details, keys, Windows and troubleshooting: references/connecting.md.
Once connected, run "$SW" run 300 < scripts/cluster-facts.sh. It prints the queues and limits, down or draining nodes, the user's Slurm accounts, quotas, project space, key modules and current jobs. Prefer it over remembered numbers: the cluster changes. If it contradicts this skill (a new or missing queue, a changed limit, a moved path), trust the cluster, tell the user, and offer to draft an issue for the skill at https://github.com/khaihernlow/seawulf-claude-code/issues (the "outdated fact" form) with the command output and date.
| Task | Read |
|---|---|
| Choosing a queue, batch or interactive jobs, GPUs, arrays, dependencies, monitoring, failed or waiting jobs | references/slurm.md, with job templates in templates/ |
| Modules, conda/pip, CUDA/PyTorch/vLLM, containers, Jupyter | references/software.md |
| Where files go, quotas, moving data | references/storage-and-data.md |
| H200/Blackwell GPUs on NVwulf, including its quota that silently blocks jobs | references/nvwulf.md |
| Something only RCI can fix (a block, access, storage, repeated failures): draft a ticket for the user to send | references/getting-help.md |
| Whether a fact is current, and its source | references/verified-facts.md |
A first job, done well:
- [ ] Code on the cluster via git (clone into /gpfs/scratch/$USER/<project>), or `sw put` for a folder with no remote
- [ ] Env outside scratch (home, or project space if big); caches in scratch
- [ ] Copy a template, fill it in: -shared queue + --mem for small jobs, or a100 + --gres=gpu:1
- [ ] sbatch --test-only, then sbatch --parsable; note the job id
- [ ] Wait inside one remote command; read the .out/.err file and sacct -j <id>
- [ ] If it failed: slurm.md section 9, fix, resubmit
- [ ] Copy results worth keeping out of scratch (`sw get` for small ones)
- [ ] `sw stop`
references/connecting.md (opens in a new tab)references/getting-help.md (opens in a new tab)references/nvwulf.md (opens in a new tab)references/slurm.md (opens in a new tab)references/software.md (opens in a new tab)references/storage-and-data.md (opens in a new tab)references/verified-facts.md (opens in a new tab)scripts/cluster-facts.sh (opens in a new tab)scripts/preflight.sh (opens in a new tab)scripts/sw (opens in a new tab)templates/array.sbatch (opens in a new tab)templates/cpu-shared.sbatch (opens in a new tab)templates/gpu-a100.sbatch (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub khaihernlow/seawulf-claude-code --plugin seawulf