Skip to content
Back to skills

Slurm Job Array Starter

ASecurity

Use this skill to submit a tiny real Slurm job array, wait for terminal accounting, and summarize per-task outputs in compact JSON.

  • 38 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
ai-agentspythonbash

Works with

  • terminal

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add ma-compbio-lab/SkillFoundry --skill slurm-job-array-starter --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Slurm Job Array Starter?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Slurm Job Array Starter
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ma-compbio-lab-slurm-job-array-starter/badge)](https://www.skillsdirectory.com/skills/ma-compbio-lab-slurm-job-array-starter)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Slurm Job Array Starter

Use this skill to submit a tiny real Slurm job array, wait for terminal accounting, and summarize per-task outputs in compact JSON.

## What it does

- Renders and submits a minimal `sbatch --array` script on the live cluster.
- Polls queue state with `squeue` and waits for terminal task accounting with `sacct`.
- Reads each task's stdout and stderr logs and exports a per-task summary.

## When to use it

- You need a verified starter for the `job arrays` leaf.
- You want a minimal example of per-task output capture and accounting on the current Slurm cluster.
- You need deterministic JSON for tests before scaling to larger batched workloads.

## Example

```bash
python3 skills/hpc/slurm-job-array-starter/scripts/run_slurm_job_array.py \
  --partition cpu \
  --array-spec 0-1 \
  --sleep 1 \
  --out scratch/slurm-array/summary.json
```

## Verification

- Skill-local tests: `python3 -m unittest discover -s skills/hpc/slurm-job-array-starter/tests -p 'test_*.py'`
- Expected summary: `task_count == 2` and all task states are `COMPLETED` with `ExitCode 0:0`

Files in this skill

  • SKILL.md1.1 KB
  • assets/README.md112 B
  • examples/README.md178 B
  • metadata.yaml1.1 KB
  • refs.md391 B
  • scripts/run_slurm_job_array.py8.1 KB
  • tests/test_run_slurm_job_array.py2.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…