srunx CLAUDE.md

srunx CLAUDE.md is an instructions file for coding agents from ksterx/srunx. It costs 10,245 tokens per session, scanned A, original, Apache-2.0.

Project instructions for srunx, a command-line tool for submitting and monitoring computing jobs on remote or shared machines. Its commands resemble SLURM, a widely used workload manager for computer clusters.

In plain words
What is it for?
Use them when developing or operating srunx, including submitting jobs, viewing queues and history, summarizing GPUs, and watching or reading logs.
Why use it?
They explain the repository's development commands and help users familiar with SLURM understand srunx's corresponding commands and differences.

Instructions file

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.

agentmods
npx agentmods add instructions/ksterx/srunx/claude-md
Clone the repo
git clone --depth 1 https://github.com/ksterx/srunx

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 srunx CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ksterx/srunx/claude-md.svg)](https://agentmods.dev/instructions/ksterx/srunx/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/ksterx/srunx/claude-md"><img src="https://agentmods.dev/badge/instructions/ksterx/srunx/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 10,245 This file is loaded in full into every session.
When invoked 10,245 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.10245 $0.10245
Opus 5 $0.05123 $0.05123
Sonnet 5 $0.02049 $0.02049
Haiku 4.5 $0.01025 $0.01025

Measured 5d ago against content hash 838dd36ebb8c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

srunx CLAUDE.md 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 5d 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.

CLAUDE.md · 721 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Development Commands

Package Management

  • uv sync - Install dependencies
  • uv add <package> - Add new dependency
  • uv run <command> - Run commands in virtual environment

CLI Usage

Job Management (SLURM-aligned commands)

Command names mirror SLURM's CLI where it makes sense (sbatch / squeue / scancel / sinfo) so a SLURM user can map their muscle memory directly. srunx-specific commands that don't map to a SLURM binary:

  • history — srunx's own submission history (SQLite-backed). Named history rather than sacct because it shares no backend with real sacct; only jobs submitted via srunx are listed.

  • gpus — GPU aggregate summary across partitions.

  • tail / watch — log tailing and cluster watching.

  • uv run srunx sbatch <script> - Submit a sbatch script (positional, like real sbatch)

  • uv run srunx sbatch --wrap "cmd ..." - Wrap a command into a SLURM job (mutually exclusive with the positional script)

  • uv run srunx sbatch --profile <name> ... - Submit over SSH to a configured profile

  • uv run srunx squeue - List active jobs (all users by default — matches native squeue). Default columns: Job ID, User, Name, Status, CPUs, GPUs, Elapsed, NodeList

  • uv run srunx squeue -j <job_id> - Filter to a specific job (replaces the old srunx status for active jobs)

  • uv run srunx squeue -u <user> - Filter to a single user

  • uv run srunx squeue --show-partition --show-limit --show-nodes - Opt-in columns (each flag adds one)

  • uv run srunx squeue -a - Shortcut for all opt-in columns at once

  • uv run srunx squeue -i <seconds> - Live refresh: re-query and redraw in place every N seconds (like native squeue -i). Ctrl+C exits

  • uv run srunx squeue --format json - JSON always includes every field regardless of show flags

  • uv run srunx scancel <job_id> - Cancel a job

  • uv run srunx sinfo - Partition / state / nodelist listing (same columns as native SLURM sinfo)

  • uv run srunx sinfo --profile <name> - Query a remote cluster via SSH adapter (#139)

  • uv run srunx sinfo --partition gpu --format json - Partition rows as JSON

  • uv run srunx gpus - GPU aggregate summary (what the old srunx sinfo showed)

  • uv run srunx gpus --profile <name> --partition gpu - GPU summary scoped to one partition on a remote cluster

  • uv run srunx history - DB-backed submission history (srunx's own SQLite). Only jobs submitted via srunx are listed

  • uv run srunx history -j <job_id> - Filter history to a specific job (replaces srunx status for finished jobs)

  • uv run srunx history --profile <name> - Scope history to a single cluster's jobs (scheduler_key filter)

  • uv run srunx sacct - Real SLURM sacct wrapper (cluster accounting DB — includes manual sbatch jobs, needs slurmdbd). Default columns: Job ID, User, Name, Partition, State, ExitCode, Elapsed

  • uv run srunx sacct -a -S now-1day - All users over the last day (like native sacct -a -S now-1day)

  • uv run srunx sacct -j <job_id> / -u <user> / -s FAILED,TIMEOUT / -p <partition> - Standard sacct filters

  • uv run srunx sacct --show-steps - Include .batch / .extern sub-step rows

  • uv run srunx tail <job_id> - Show the last 10 lines of the job log (matches native tail; use -n N for a different cap, --all to dump the whole file)

  • uv run srunx tail <job_id> --follow - Stream job logs. Works over SSH via periodic tail_log_incremental polls; tune with --interval <seconds> (default 2s). Ctrl+C exits

Read the full file on GitHub · 721 lines

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. 5d ago First seen · 721 lines · 10,245 tokens per session scan A 838dd36ebb8c

Subscribe to this mod's changes

srunx CLAUDE.md is an instructions file published in the GitHub repository ksterx/srunx (16 stars, last pushed 8d ago), licensed Apache-2.0. It adds 10,245 tokens to every session, about $0.0512 per session on Opus 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-08-30.