Agent skill

Launch With Slurm

by mlc-ai in mlc-ai/pith-train

Reference for launching jobs inside a SLURM allocation via srun (single-node or multi-node).

Apache-2.0Auto-check passedAI & LLM Engineering

Install Launch With Slurm

skills CLI
$ npx skills add mlc-ai/pith-train --skill launch-with-slurm -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mlc-ai/pith-train launch-with-slurm --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mlc-ai/pith-train.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/launch-with-slurm .claude/skills/launch-with-slurm && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
launch-with-slurm
GitHub stars
355
Token cost
~1.4k tokens
SKILL.md length
644 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
Apache-2.0

At a glance

Reference for launching jobs inside a SLURM allocation via srun (single-node or multi-node).

  • Works in 2 steps: Find the Job ID → Build the srun Command
  • Work needs to run on allocated compute — from direct user requests (run on the cluster
  • SKILL.md covers Step 1: Find the Job ID, Step 2: Build the srun Command and References
  • Calls ssh and bash

What it does

Launch With Slurm is an agent skill from mlc-ai/pith-train. Reference for launching jobs inside a SLURM allocation via srun (single-node or multi-node). Use whenever work needs to run on allocated compute — from direct user requests ("run on the cluster", "use my running job", "on my allocation", "launch on slurm", "train across N nodes", "dispatch the job") OR from within another skill's workflow (e.g., validate-correctness running validation on the allocation, add-new-model reaching pp=2/ep=2). Covers finding the target job ($SLURMJOBID or squeue, including array-job ID…

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering. The repository describes itself as: Compact and Agent-Native MoE Training System. The licence is Apache-2.0.

When your agent uses it

  • Work needs to run on allocated compute — from direct user requests (run on the cluster
  • Use my running job
  • On my allocation
  • Launch on slurm

Example prompts

  • “run on the cluster”
  • “use my running job”
  • “on my allocation”
  • “/launch-with-slurm”

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Find the Job ID
  2. Build the srun Command

What it can do on your machine

Read from SKILL.md and the folder at commit 87208d9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • ssh
    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • slurm.schedmd.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Launch With Slurm loads about 1.4k tokens when it runs. Until then it costs about 191 tokens; SKILL.md has 644 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~191
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mlc-ai/pith-train at commit 87208d9, republished under its Apache-2.0 licence (© mlc-ai). 644 words, ~1,402 tokens.

Download SKILL.mdSave it as .claude/skills/launch-with-slurm/SKILL.md (or your agent's skills folder).
name
launch-with-slurm
description
Reference for launching jobs inside a SLURM allocation via srun (single-node or multi-node). Use whenever work needs to run on allocated compute — from direct user requests ("run on the cluster", "use my running job", "on my allocation", "launch on slurm", "train across N nodes", "dispatch the job") OR from within another skill's workflow (e.g., validate-correctness running validation on the allocation, add-new-model reaching pp=2/ep=2). Covers finding the target job ($SLURM_JOB_ID or squeue, including array-job ID resolution), reading the allocation with scontrol, the srun flags that matter (--jobid, -W 0, -N, -o, --open-mode, --nodelist, --overlap), and gotchas like GPU sharing with live steps and distributed-aware output redirection.

Launch with SLURM

srun --jobid=<jobid> attaches a step to a running allocation regardless of where it is invoked — login node, ssh'd compute node, or inside the job itself. The scheduler draws nodes from the allocation pool and may pick a node other than the invoking one. Default to it over raw torchrun/bash: srun propagates env vars, handles distributed-aware I/O, and manages signals across ranks correctly — even on a single node with multiple GPUs. The examples/*/launch.sh scripts read SLURM_NNODES/SLURM_NODEID, which srun sets inside a step, so they work unchanged.

Step 1: Find the Job ID

Two sources, one answer — the numeric JobId of the job (e.g. 2193449):

  • $SLURM_JOB_ID is set — you are inside the job, or in an ssh session on an allocated node that inherits the job environment. Use it as-is; it is already the numeric JobId.
  • Otherwise — list the user's jobs and pick a RUNNING one: by name if the user named it, ask if several are ambiguous or none is RUNNING, skip PENDING (no compute yet):
bash
squeue -u $USER -o "%.10i %.9T %.6D %.24N %.24j %.10L"

Array jobs: resolve to the numeric JobId. squeue reports elements as <master>_<task> (e.g. 2193448_1), but --jobid wants the element's own numeric JobId — given 2193448_1, it strips the _1, resolves to the array master, and fails with "Job is pending execution" when the master has pending elements:

bash
scontrol show job 2193448_1 | grep -oP '^JobId=\K[0-9]+'    # → 2193449

Then read the allocation — don't guess, ask SLURM:

bash
scontrol show job $JOBID

Key fields to extract:

FieldExampleWhat it tells you
AllocTREScpu=208,mem=1860368M,node=1,billing=208,gres/gpu=8Node count, GPUs per node, CPUs, memory
NodeListorchard-flame-5 or orchard-flame-[3-6]Which hosts; on most clusters ssh <name> gives direct access

For a quick remaining-time check, use squeue directly — it returns D-HH:MM:SS without needing to parse timestamps:

bash
squeue -h -j $JOBID -o %L

Before launching anything long-running, compare this against the estimated runtime. If the budget is too tight, surface this to the user instead of launching and getting killed mid-run.

Show full SKILL.md (345 more words)Show less

Step 2: Build the srun Command

  • --jobid=<jobid> — anchor the step to the allocation. Required when $SLURM_JOB_ID is unset or holds a different job; redundant but harmless when it already holds the target.
  • -N <n> — number of nodes to dispatch to. In most training runs this matches PP, but the full parallelism plan and GPUs-per-node determine total nodes (e.g., PP=1 with EP=16 on 8-GPU nodes still needs 2). -N1 borrows one node of a multi-node allocation for probes or single-node tests.
  • -W 0 — wait indefinitely for stragglers after the first task exits. The default behavior terminates remaining tasks shortly after the first one ends, which kills workers that are still cleanly shutting down. Always use -W 0 for training and evaluation runs.
  • -o <file> — stdout redirection. Use this instead of piping through tee. On multi-node, teeing srun output collapses concurrent writes from all ranks. -o is distributed-aware — srun collects output from every rank into the single specified file, preserving the one-command-one-log abstraction. By convention, PithTrain runs log under logging/<descriptive-name>.log.
  • --open-mode=append vs --open-mode=truncate — for resumed training, append preserves history across restarts. Use truncate for fresh runs where overwriting is intended.
  • --nodelist=<hosts> — restrict dispatch to specific nodes. Useful for debugging at a smaller scale (e.g., 4 nodes allocated, but debug with 2 specific ones).
  • --overlap — share the allocation's CPUs, memory, and GPUs with the job's other steps. Without it, a step reserves the whole allocation, so any later step silently pends until it finishes — pass --overlap whenever launching alongside a running step.
  • --gres=gpu:<k> — request a subset of the job's GPUs for the step. By default a step sees every GPU the job holds on the node, so torchrun --nproc-per-node=gpu just works. Sharing means contention: probe nvidia-smi utilization before launching heavy work onto a job whose GPUs are already busy; if it's saturated, surface this to the user instead of piling on.

srun execs the command directly, not through a shell — invoke scripts as bash <script> or ensure the +x bit.

References

© mlc-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/launch-with-slurm of mlc-ai/pith-train.

Open the folder on GitHubat commit 87208d9

Compare with similar skills

Launch With Slurm next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Launch With Slurm compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Launch With Slurm this skillmlc-ai/pith-train355—~1.4kAutomated safety check: PassApache-2.0
Agent BuildershareAI-lab/learn-claude-code78k4 repos~1.2kAutomated safety check: PassMIT
Add Uint Supportpytorch/pytorch104k2 repos~2.3kAutomated safety check: PassCustom licence
LLM Benchmarking with lm-evaluation-harnessOrchestra-Research/AI-Research-SKILLs13k8 repos~3kAutomated safety check: PassMIT
Segment Anything Model GuideOrchestra-Research/AI-Research-SKILLs13k8 repos~3.3kAutomated safety check: PassMIT
1passwordtrpc-group/trpc-agent-go1.9k14 repos~656Automated safety check: PassApache-2.0

Similar skills

  • Agent Builder

    shareAI-lab/learn-claude-code

    Design and build AI agents for any domain. An agent skill from shareAI-lab/learn-claude-code.

    78k GitHub starsUsed in 4 repos~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Add Uint Support

    pytorch/pytorch

    Add unsigned integer (uint) type support to PyTorch operators by updating ATDISPATCH macros.

    104k GitHub starsUsed in 2 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • LLM Benchmarking with lm-evaluation-harness

    Orchestra-Research/AI-Research-SKILLs

    Runs lm-evaluation-harness to benchmark language models on academic suites such as MMLU, GSM8K and HumanEval, compare models and track training checkpoints.

    13k GitHub starsUsed in 8 repos~3k tokens
    AI & LLM EngineeringAuto-check passed
  • Segment Anything Model Guide

    Orchestra-Research/AI-Research-SKILLs

    Guide to using Meta's Segment Anything Model for zero-shot image segmentation with point, box or mask prompts, or automatic mask generation.

    13k GitHub starsUsed in 8 repos~3.3k tokens
    AI & LLM EngineeringAuto-check passed
  • 1password

    trpc-group/trpc-agent-go

    Set up and use 1Password CLI (op). An agent skill from trpc-group/trpc-agent-go.

    1.9k GitHub starsUsed in 14 repos~656 tokens
    AI & LLM EngineeringAuto-check passed
  • Planning With Files

    jarrodwatts/claude-code-config

    Transforms workflow to use Manus-style persistent markdown files for planning, progress tracking, and knowledge storage.

    1.1k GitHub starsUsed in 5 repos~967 tokens
    AI & LLM EngineeringAuto-check passed

More from mlc-ai/pith-train

All 10 skills in this repo
  • Analyze Nsys Profile

    mlc-ai/pith-train

    Query a captured PithTrain Nsight Systems profile to measure compute/communication overlap, locate exposed comm by DualPipeV stage, and inspect per-rank stream behavior.

    355 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Capture Nsys Profile

    mlc-ai/pith-train

    Capture a Nsight Systems (.nsys-rep) profile of a short PithTrain run for performance analysis.

    355 GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • Validate Correctness

    mlc-ai/pith-train

    Validates that code changes do not break training correctness by comparing loss deltas against a base-vs-base run-to-run envelope.

    355 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Validate Performance

    mlc-ai/pith-train

    Measures the throughput difference between two branches with force-balanced routing.

    355 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Setup Benchmark Inputs

    mlc-ai/pith-train

    Set up the minimal set of artifacts (tokenized DCLM corpus shard + released HuggingFace checkpoint converted to DCP) required to benchmark, profile, or regression-test a MoE model in PithTrain.

    355 GitHub stars~399 tokensUpdated yesterday
    Auto-check passed
  • Add New Model

    mlc-ai/pith-train

    Adds support for a new MoE language model to PithTrain. An agent skill from mlc-ai/pith-train.

    355 GitHub stars~4.6k tokensUpdated yesterday
    Auto-check passed

Questions about Launch With Slurm

What does Launch With Slurm do?

Reference for launching jobs inside a SLURM allocation via srun (single-node or multi-node). Launch With Slurm is an agent skill from mlc-ai/pith-train. Reference for launching jobs inside a SLURM allocation via srun (single-node or multi-node).

When should I use Launch With Slurm?

Launch With Slurm fits situations like: work needs to run on allocated compute — from direct user requests (run on the cluster; use my running job; on my allocation; launch on slurm.

How do I install Launch With Slurm in Claude Code?

Run `npx skills add mlc-ai/pith-train --skill launch-with-slurm -a claude-code`. Or copy the skill folder (.agents/skills/launch-with-slurm in mlc-ai/pith-train) into .claude/skills/launch-with-slurm in your project. Claude Code loads it when a task matches its description.

How do I install Launch With Slurm in Codex?

Run `npx skills add mlc-ai/pith-train --skill launch-with-slurm -a codex`. Or copy the skill folder (.agents/skills/launch-with-slurm in mlc-ai/pith-train) into .agents/skills/launch-with-slurm in your project. Codex loads it when a task matches its description.

Can I use Launch With Slurm in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mlc-ai/pith-train --skill launch-with-slurm -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/launch-with-slurm, .gemini/skills/launch-with-slurm, .github/skills/launch-with-slurm and .opencode/skills/launch-with-slurm in your project.

What does Launch With Slurm need to run?

Going by SKILL.md and its folder, Launch With Slurm needs the command-line tools its instructions call (ssh and bash).

Does Launch With Slurm access the network?

SKILL.md names 1 domain. As links in the text: slurm.schedmd.com. This is read from the text; nothing was executed.

Is Launch With Slurm safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Launch With Slurm use?

Launch With Slurm is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Launch With Slurm use?

About 1.4k tokens (SKILL.md is roughly 5.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Launch With Slurm?

Skills that share tags, products or a category with Launch With Slurm: Agent Builder (shareAI-lab/learn-claude-code, 78k stars), Add Uint Support (pytorch/pytorch, 104k stars), LLM Benchmarking with lm-evaluation-harness (Orchestra-Research/AI-Research-SKILLs, 13k stars) and Segment Anything Model Guide (Orchestra-Research/AI-Research-SKILLs, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Launch With Slurm?

mlc-ai (a GitHub organization) maintains it in mlc-ai/pith-train, which has 355 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 9, 2026.

Source: mlc-ai/pith-train on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.