Skip to content
quadbioPublic

About

Claude Code plugin for working with coding agents on ETH Zurich's Euler HPC cluster: session-start cluster context and a Slurm job skill.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

euler-hpc

A Claude Code plugin for running coding agents efficiently on Euler, ETH Zurich's HPC cluster. It holds everything specific to the cluster, so other plugins can stay cluster-agnostic: at session start it tells the agent which node it is on, what its allocation holds, your own setup and the rules for every session; its skills cover Slurm jobs and software, and moving data, summarising the docs and pointing to their pages; and it links each job to the Claude session that submitted it.

Part What it does
hooks/ On Euler only, at session start: node and allocation, your settings, always-on rules (nodes, inline vs Slurm, modules, storage, snapshots, cancelling).
skills/jobs/ Slurm batch jobs, GPU jobs, arrays, interactive allocations, monitoring and failures; software and containers. An sbatch template. Loaded on demand.
skills/data/ Moving data in and out: rsync, Polybox, Globus from the shell. Loaded on demand.
bin/euler-jobs euler-jobs: your Claude sessions on Euler, each with its tmux window, status, background commands, PRs and jobs; what needs you on top, and what the allocation they share uses now. For you and your agents.
bin/euler-step euler-step <job> <command>: runs a command in an allocation you hold, with all of its CPUs, memory and GPUs. For agents iterating on a node.
bin/euler-resume euler-resume: after your Euler job ends, reopens the Claude sessions that were still open, each with claude --resume in a window of the tmux session it ran in; you pick which. For you, in a new job.

Not affiliated with ETH Zurich; the Euler docs are the reference.

Use

Run Claude on Euler. One setup that works well: open an euler-tunnel onto a compute node, start tmux there, and run one Claude session per tmux window. Each session then starts inside an allocation, runs work inline while it fits, and goes through Slurm when it doesn't. Ask in plain words: "run this on a GPU", "run this for every sample", "hold a node for an hour", "why did my job fail?".

euler-jobs shows what your sessions are doing and waiting for: failed jobs no session watches, closed sessions with queued jobs and sessions waiting for you first, then each session's status, background commands, PRs (open, merged, closed) and jobs, the calling session's on top. Run it as ! euler-jobs in a Claude session, or in any shell on the node your sessions run on (see Install); agents run euler-jobs --mine for their own jobs, and euler-jobs --summary for a Markdown table of them by partition since the session started. A job's session is the CLAUDE_CODE_SESSION_ID in the environment Slurm stores with each batch job, so jobs submitted by scripts count too; jobs without it (interactive allocations, --export=NONE) are matched by the directory they were submitted from. Sessions come from Claude Code's own records, PR states from gh.

Settings, saved with /plugin configure euler-hpc@quadbio (the in-session /plugin install asks for them; a shell install doesn't). They hold what is specific to you on Euler, so your CLAUDE.md needn't.

Setting Default Meaning
gpu_model rtx_4090 GPU model for GPU jobs; one your shareholder group can use. Blank: the agent asks.
gpu_fallback rtx_3090 Model to try when the default queues too long. Blank: the agent asks.
group Your group's storage name, as in /cluster/project/<group>.
work_root Where your repositories and work live.
notes Other facts about your setup, separated by semicolons, e.g. where shared datasets live.
transfer How your data reaches Euler: the machines it lives on, whether Euler can reach them, Globus collections and their path roots.

Slurm charges your default share. If you belong to several, set SBATCH_ACCOUNT, SALLOC_ACCOUNT and SLURM_ACCOUNT in your shell profile.

Install

Once, on Euler (all nodes share your home), from the quadbio marketplace; then save the settings above.

euler-jobs, euler-step and euler-resume are on the PATH of Claude sessions. For your own shell: uv tool install git+https://github.com/quadbio/euler-hpc, updated with uv tool upgrade euler-hpc; that copy then comes first in Claude sessions too.

Develop

claude plugin validate .
claude --plugin-dir .            # try the hook and skill from this checkout
pre-commit run --all-files
sh tests/test_session_start.sh   # on Euler
sh tests/test_euler_jobs.sh
sh tests/test_euler_step.sh
sh tests/test_euler_resume.sh

Release

Bump version in .claude-plugin/plugin.json and merge: the marketplace follows main, and users update when the version changes.

License

MIT

About

Claude Code plugin for working with coding agents on ETH Zurich's Euler HPC cluster: session-start cluster context and a Slurm job skill.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages