Hpc slurm workflow
Skill maxwellkonnaris/agents_skills/.agents/skills/hpc-slurm-workflow
agentic workflows and skills
npx -y skills add maxwellkonnaris/agents_skills --skill hpc-slurm-workflowAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use for Slurm, sbatch, squeue, sacct, logs, quotas, scratch/work storage, micromamba, and HPC job debugging.
SKILL.md
4.0 KB, 925 tokens by cl100k_base, as published. Nobody here has run it
HPC Slurm Workflow
Use this skill when the task involves HPC jobs, Slurm scripts, failed jobs, job arrays, memory/time/resource estimates, logs, scratch/work storage, or micromamba environments.
Code Deliverable Format
- Slurm job-submission, launcher, and worker scripts are allowed because they are execution artifacts required by the cluster workflow.
- For new analysis code that is not itself an HPC execution artifact, default
to R Markdown (
.Rmd) for R-first work or Jupyter (.ipynb) for Python-first or mixed-language work. - Create other standalone scripts only when the user explicitly asks for them.
- Preserve native source formats when explicitly modifying existing code.
Rules
- Start with read-only diagnostics.
- Check
squeue -u "$USER"for active jobs. - Use
sacctfor completed jobs. - Inspect stdout and stderr before changing code.
- Do not delete files unless explicitly asked.
- Do not use sudo.
- Estimate resources before submitting jobs.
- Use
set -euo pipefailin Bash scripts. - Activate micromamba or conda environments explicitly.
- Write Slurm logs under
slurm_logs/unless the project already uses a different log directory. - Write all generated HPC outputs under a single project directory in scratch unless the user specifies another location.
Containerized HPC Execution
Use this section when the task involves Docker, Apptainer, Singularity, containerized Slurm jobs, or moving a local/container workflow to HPC.
Rules:
- Prefer Apptainer/Singularity for HPC execution.
- Do not use Docker directly on HPC unless the cluster explicitly supports it.
- Do not use sudo.
- Do not copy raw data, processed data, model files, large results, credentials, secrets, tokens, or private keys into container images.
- Use bind mounts for project directories, scratch directories, data directories, result directories, logs, and MLflow run directories.
- Prefer explicit bind mounts over relying on implicit host paths.
- Print the container image path, bind mounts, working directory, config path, output directory, Git commit if available, and random seed if relevant before long jobs.
- Keep Slurm logs under the projects log convention. If none exists, use
slurm_logs/. - Test the container with a small smoke command before submitting a full Slurm job.
- Do not submit full Slurm jobs until a small local, interactive, or dry-run test has passed unless the user explicitly overrides.
Expected Apptainer pattern:
apptainer exec \
--bind /scratch/$USER/project:/work \
image.sif \
python /work/scripts/run.py --config /work/configs/small.yaml
Expected Example Slurm pattern:
#!/usr/bin/env bash
#SBATCH -A one_sc_default
#SBATCH --job-name=project_test
#SBATCH --cpus-per-task=1
#SBATCH --mem=4G
#SBATCH --time=00:10:00
#SBATCH --output=slurm_logs/%x_%j.out
#SBATCH --error=slurm_logs/%x_%j.err
set -euo pipefail
echo "Job ID: ${SLURM_JOB_ID:-NA}"
echo "Host: $(hostname)"
echo "Working directory: $(pwd)"
echo "Image: /path/to/image.sif"
echo "Started: $(date)"
apptainer exec \
--bind /scratch/$USER/project:/work \
/path/to/image.sif \
python /work/scripts/run.py --config /work/configs/small.yaml
echo "Finished: $(date)"
When debugging a containerized Slurm job, inspect in this order:
- Slurm stdout and stderr.
sacctresource usage.- Whether the image path exists.
- Whether bind-mounted host paths exist.
- Whether paths inside the container match the script.
- Whether the expected conda/micromamba/container environment is actually active.
- Whether the failure is a path issue, dependency issue, permission issue, resource issue, or scientific-code issue.
Expected output
When debugging, provide:
- Likely failure mode.
- Commands to confirm it.
- Minimal fix.
- Exact command to rerun.
- Ask follow up question to ensure direction and goal is correct.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most automation workflows skills give in 925 tokens
Counted across 745 of the 1,008 authors here whose files we hold, read 2026-08-07
- Write conventional commit messagesin 36 of 745, across 35 files
- Delete branches after mergein 30 of 745, across 21 files
- Make atomic commitsin 25 of 745, across 15 files
- Write minimal code to pass testsin 22 of 745, across 10 files
- Re-snapshot after navigation or DOM changesin 21 of 745, across 13 files
- Use try-catch for error handlingin 20 of 745, across 8 files
- Run tests before committingin 20 of 745, across 12 files
- Write tests before implementationin 20 of 745, across 8 files
- Configure branch protection rulesin 19 of 745, across 5 files
- Explain the why in commit messagesin 19 of 745, across 9 files
- Refactor code while tests remain greenin 19 of 745, across 6 files
- Interact with elements using refsin 19 of 745, across 11 files
Said here and by no other author read
- start with read-only diagnostics
- check active jobs with squeue
- check completed jobs with sacct
- inspect stdout and stderr before changing code
- estimate resources before submitting jobs
- use set -euo pipefail in Bash scripts
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.