slurm-script

slurm-script is a skill for Claude Code from iowarp/clio-kit. It costs 49 tokens per session (1,379 once invoked), scanned A, original, BSD-3-Clause.

A guide to writing and troubleshooting Slurm batch scripts, which are files that ask a computing cluster to run work later. It covers resource requests, job arrays, dependencies, and pending-job messages.

In plain words
What is it for?
Use it to prepare an sbatch script, choose resource limits, submit repeated jobs as an array, connect jobs with dependencies, and diagnose why a job is pending.
Why use it?
It helps avoid rejected or indefinitely waiting jobs caused by incorrect CPU, memory, GPU, partition, or time requests. It also explains how to read the scheduler's actual reason.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the clio-hpc-skills plugin — 3 skills shipped together

Good fit Use it to prepare an sbatch script, choose resource limits, submit repeated jobs as an array, connect jobs with dependencies, and diagnose why a job is pending.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/iowarp/clio-kit/slurm-script
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add iowarp/clio-kit --skill slurm-script
Clone the repo
git clone --depth 1 https://github.com/iowarp/clio-kit

Made for: Claude Code.

Or install clio-hpc-skills, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for slurm-script

README.md
[![agentmods](https://agentmods.dev/badge/skills/iowarp/clio-kit/slurm-script/github.svg)](https://agentmods.dev/skills/iowarp/clio-kit/slurm-script)
Your own site
<a href="https://agentmods.dev/skills/iowarp/clio-kit/slurm-script"><img src="https://agentmods.dev/badge/skills/iowarp/clio-kit/slurm-script/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for slurm-script

Your own site · 80×15
<a href="https://agentmods.dev/skills/iowarp/clio-kit/slurm-script"><img src="https://agentmods.dev/badge/skills/iowarp/clio-kit/slurm-script.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,379 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00049 $0.01379
Opus 5.5 $0.00020 $0.00552
Sonnet 5.5 $0.00010 $0.00276
Haiku 4.5 $0.00005 $0.00138

Measured 9d ago against content hash 028c8cd2e5f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

slurm-script scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/clio-hpc-skills/skills/slurm-script/SKILL.md · 136 lines

How it starts

The opening of the file, as written. The whole thing — 136 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Slurm Scripts

This is about what goes in the request and how to read what comes back. For running a Spack package through JARVIS instead of a hand-written script, see cluster-run.

Size the request against a real machine

Look before guessing. clio-node-hardware:get_cpu_info gives core counts, get_memory_info gives RAM, get_gpu_info gives GPUs. Then clio-slurm:slurm_cluster gives the partitions and their limits.

Hardware tools describe the MCP host, not necessarily the allocated compute nodes. Use the target partition/node records as the scheduling authority. Invalid requests may be rejected at submission or remain pending; inspect the actual scheduler reason instead of assuming one outcome.

The shape of a batch script

#!/bin/bash
#SBATCH --job-name=run1
#SBATCH --partition=<from slurm_cluster>
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=16
#SBATCH --cpus-per-task=1
#SBATCH --mem=32G
#SBATCH --time=02:00:00
#SBATCH --output=run1-%j.out
#SBATCH --error=run1-%j.err

srun ./my_binary

Points that matter more than they look:

  • --time is a hard kill, not an estimate. The job is terminated at the limit, mid-write if necessary. But a shorter limit schedules sooner, because it fits in backfill gaps. Ask for what the run needs plus margin, not the partition maximum.
  • --ntasks vs --cpus-per-task. Tasks are MPI ranks; cpus-per-task is threads within a rank. An MPI+OpenMP code that sets both wrong runs at a fraction of its speed while looking healthy.
  • --mem is per node; --mem-per-cpu is per allocated CPU. Setting both is an error. Getting --mem wrong is the most common cause of a job killed partway through with no obvious message.
  • %j in output paths expands to the job ID. For arrays use %A_%a (array job ID and task index), for example run1-%A_%a.out.
  • srun inside the script, not a bare call. It inherits the allocation; running the binary directly gets you one rank on one node regardless of what was requested.

Read the full file on GitHub · 136 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 136 lines · 49 tokens per session scan A 028c8cd2e5f1

Subscribe to this mod's changes

slurm-script is a skill published in the GitHub repository iowarp/clio-kit (30 stars, last pushed 8d ago), licensed BSD-3-Clause. It adds 49 tokens to every session and 1,379 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-08.

Related

Other skills, from other repositories