/hpc — launch work on the HPC cluster
You run the hpc launcher yourself to put the user's work on the cluster. That is
the point of the tool — do not hand commands to the user to run, unless asked.
1. Find the launcher
Look for its path in the user's global ~/.claude/CLAUDE.md, under an
## hpc-launcher location heading.
If it isn't there, discover it: run command -v hpc with the Bash tool
(Git Bash) and take the directory of that path. If that fails, ask the user
where the hpc-launcher folder is.
Record it so later calls skip discovery — append to ~/.claude/CLAUDE.md:
## hpc-launcher location
The `hpc` launcher (for the /hpc skill) is at: `<path>`
Keep <path> ~-relative when it's under home — that file is public, so a
machine-specific absolute won't travel (and needlessly shows the username).
2. Read the launcher's own docs
<path>/README.md — what it does, setup, every command. Always.
<path>/clusters/<HPC_CLUSTER>.md — facts for the cluster this repo targets
(HPC_CLUSTER in .hpc.env; hpc clusters lists them). Read it when running or
configuring a job — partitions, filesystem, gotchas (e.g. Roihu's split login
hosts + 24 h SSH cert).
<path>/AGENTS.md, DESIGN.md, TODO.md — only when you need rationale,
limitations, or current status.
Read the live files. Do not rely on remembered defaults (partitions, modules,
torch module/wheel, walltimes) — they live in the cluster's clusters/<name>.env
profile and hpc-env.example, not in your memory.
3. Run it yourself
hpc is bash; use the Bash tool (Git Bash / MSYS), not PowerShell.
- Execute the commands directly —
hpc run, hpc test, hpc status, hpc logs,
hpc collect, hpc upload, hpc wait, hpc init, etc. Don't delegate them to
the user. (For unattended/scripted use, hpc wait blocks until a job is done and
exits its rc, and hpc status --json / hpc logs --once are non-interactive —
see the README.)
- Auth: the user's ssh-agent holds the cluster key. If an
hpc call fails on SSH
auth, ask the user to load it once (ssh-add their key), then keep running the
commands yourself.
- A project needs a
.hpc.env (run hpc init) before hpc run / hpc test.
hpc cancel refuses to kill a RUNNING job unless you pass --force. If you were
only cancelling because the job was stuck in the queue, the refusal means it has now
started — so the reason to cancel is gone; let it run. Only --force if you'd kill
it regardless of queue state (bugged code, wrong config, superseded run).
4. Carry out the user's request, following the docs you just read.
1---2name: hpc3description: Launch and manage jobs on the HPC cluster (INVOKE ONLY when the user explicitly runs /hpc or asks to use this skill).4---56# /hpc — launch work on the HPC cluster78You run the `hpc` launcher yourself to put the user's work on the cluster. That is9the point of the tool — do not hand commands to the user to run, unless asked.1011## 1. Find the launcher12131. Look for its path in the user's global `~/.claude/CLAUDE.md`, under an14 `## hpc-launcher location` heading.152. If it isn't there, discover it: run `command -v hpc` with the **Bash tool**16 (Git Bash) and take the directory of that path. If that fails, ask the user17 where the `hpc-launcher` folder is.183. Record it so later calls skip discovery — append to `~/.claude/CLAUDE.md`:1920 ```21 ## hpc-launcher location22 The `hpc` launcher (for the /hpc skill) is at: `<path>`23 ```2425 Keep `<path>` `~`-relative when it's under home — that file is public, so a26 machine-specific absolute won't travel (and needlessly shows the username).2728## 2. Read the launcher's own docs2930- `<path>/README.md` — what it does, setup, every command. **Always.**31- `<path>/clusters/<HPC_CLUSTER>.md` — facts for the cluster this repo targets32 (`HPC_CLUSTER` in `.hpc.env`; `hpc clusters` lists them). Read it when running or33 configuring a job — partitions, filesystem, gotchas (e.g. Roihu's split login34 hosts + 24 h SSH cert).35- `<path>/AGENTS.md`, `DESIGN.md`, `TODO.md` — only when you need rationale,36 limitations, or current status.3738Read the live files. Do not rely on remembered defaults (partitions, modules,39torch module/wheel, walltimes) — they live in the cluster's `clusters/<name>.env`40profile and `hpc-env.example`, not in your memory.4142## 3. Run it yourself4344- `hpc` is bash; use the **Bash tool** (Git Bash / MSYS), not PowerShell.45- Execute the commands directly — `hpc run`, `hpc test`, `hpc status`, `hpc logs`,46 `hpc collect`, `hpc upload`, `hpc wait`, `hpc init`, etc. Don't delegate them to47 the user. (For unattended/scripted use, `hpc wait` blocks until a job is done and48 exits its rc, and `hpc status --json` / `hpc logs --once` are non-interactive —49 see the README.)50- Auth: the user's ssh-agent holds the cluster key. If an `hpc` call fails on SSH51 auth, ask the user to load it once (`ssh-add` their key), then keep running the52 commands yourself.53- A project needs a `.hpc.env` (run `hpc init`) before `hpc run` / `hpc test`.54- `hpc cancel` refuses to kill a RUNNING job unless you pass `--force`. If you were55 only cancelling because the job was stuck in the queue, the refusal means it has now56 started — so the reason to cancel is gone; let it run. Only `--force` if you'd kill57 it regardless of queue state (bugged code, wrong config, superseded run).5859## 4. Carry out the user's request, following the docs you just read.