一键导入
submit-slurm-job
Submit GPU compute jobs to the Slurm cluster. Handles sbatch script generation with correct partition, GPU type, python path, and node selection.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Submit GPU compute jobs to the Slurm cluster. Handles sbatch script generation with correct partition, GPU type, python path, and node selection.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when downloading a video or lecture from koushare.com (蔻享学术) — or a similar site whose pages are walled by a Tencent EdgeOne bot/CAPTCHA challenge while the video streams from Tencent VOD. Triggers/symptoms: curl on the page returns only a ~1KB EO_Bot_Ssid/__tst_status JS challenge, yt-dlp says "Unsupported URL", the page demands a "Security Verification" checkbox, or the stream URL contains voddrm.token / SimpleAES / a *.myqcloud.com .m3u8.
Use when restoring, reading, searching, summarizing, or resuming Claude Code logs/history from a session hash, UUID prefix, project path, or handoff/hands-off request. Also use when mining ~/.claude/projects JSONL transcripts for handoff notes, summaries, next steps, or lost conversation context.
Extract numeric (x, y) data points from a plot/figure image — including a figure inside a PDF — into a CSV, the CLI alternative to WebPlotDigitizer/automeris. Use whenever the user wants to "get the numbers off this plot", digitize/trace a curve, read data points from a chart or graph image, pull a dispersion/gap/curve out of a paper figure to compare against their own data, or recover tabular values from a figure when the underlying data isn't available. Triggers on phrases like "digitize this plot", "extract data from this figure/chart/graph", "read the points off", "get the curve from this PDF figure", "WebPlotDigitizer but from the command line".
Use when the user wants a live, auto-refreshing figure of cluster-job state pinned to their screen. Triggers on phrases like "babysit my X plot", "watch X live", "live view of <script>", "keep refreshing <figure>", "babysit scripts/foo.py", "open babysit". Also triggers on stop phrases: "stop babysit", "stop watching", "close the live view". This skill runs a project-owned plotter on the cluster on a recurring schedule, fetches the rendered PNG back to the local machine, and opens it. The plot updates in place as new data arrives on the cluster. Do NOT trigger for one-off plot generation ("run scripts/foo.py once"), status-only queries ("is job 12345 running?"), job submission, or analysis of a finished run — those are normal work.
Use when the user asks to download an academic paper or get the PDF — given a URL, DOI, paper title, or citation. Uses the bundled helper script as the default path for DOI/URL/PDF downloads, with open-web and arXiv lookup as fallbacks for title-only requests. Triggers on phrases like "download paper", "get me the PDF", "fetch this paper", "get this DOI".
Use when the user asks to mine their own Claude Code session history for recurring behavioral feedback — corrections, format/voice edicts, error catches, domain-knowledge injections. The output is normally proposed CLAUDE.md additions (the patterns are discipline rules, not workflows). Triggers on phrases like "distill my feedback", "find recurring corrections in my sessions", "what should I add to CLAUDE.md?", "/distill-feedback".
| name | submit-slurm-job |
| description | Submit GPU compute jobs to the Slurm cluster. Handles sbatch script generation with correct partition, GPU type, python path, and node selection. |
| user_invocable | true |
Generate and submit sbatch scripts for GPU compute jobs on the cluster. Handles all cluster-specific details: partition, GPU types, node selection, python path.
Before using this skill, set the following in your project's CLAUDE.md or environment:
| Variable | Example | Description |
|---|---|---|
PYTHON_PATH | /path/to/miniconda3/envs/myenv/bin/python3 | Full path to Python interpreter |
PROJECT_DIR | /home/user_xxx/private/homefile | Must be under ~/private/homefile; Slurm submission is only allowed from this path |
PARTITION | home | Slurm partition name (the only compute partition) |
Cluster rule: scripts and submissions must live under ~/private/homefile. Data should live under ~/private/datafile. Run sbatch/srun only after cd ~/private/homefile/....
Ask the user (with AskUserQuestion) what they want to run. Key parameters:
| Parameter | Default | Description |
|---|---|---|
job_name | (required) | Short job name for SBATCH |
gpu_type | (required) | GPU model, must be explicit (e.g., A100_40G, V100, A800) |
n_gpu | 1 | Number of GPUs |
time | 24:00:00 | Wall time limit |
mem | 32G | Memory |
cpus | 4 | CPUs per task |
script | (required) | Python script path (must live under ~/private/homefile) |
args | (required) | Script arguments |
output_dir | {PROJECT_DIR} | Directory for log files (keep under ~/private/homefile) |
--gres: use gpu:MODEL:N (e.g., gpu:A100_40G:1, gpu:A800:2). gpu:1 will be rejected.slurm_gpustat (cluster-provided wheel) or scontrol show nodes -o to see available GPU models.--nodelist=node.Important: ensure the script is written under ~/private/homefile/... and run sbatch from that directory (cluster enforcement).
Generate the sbatch script following this template:
#!/bin/bash
#SBATCH --partition={PARTITION} # home
#SBATCH --cpus-per-task={cpus}
#SBATCH --mem={mem}
#SBATCH --gres=gpu:{gpu_type}:{n_gpu}
#SBATCH --nodes=1
#SBATCH --time={time}
#SBATCH --job-name={job_name}
#SBATCH -o {output_dir}/{job_name}_%j.out
echo The current job ID is $SLURM_JOB_ID
echo Running on $SLURM_JOB_NODELIST
echo CUDA devices: $CUDA_VISIBLE_DEVICES
echo ==== Job started at `date` ====
nvidia-smi
echo
{PYTHON_PATH} \
{script} \
{args}
echo
echo ==== Job finished at `date` ====
Key rules:
home (the only compute partition).~/private/homefile/....{PYTHON_PATH} (do NOT conda activate).-o for combined stdout+stderr.--gres.--nodelist unless the user explicitly requests a specific node.Write the script to {output_dir}/{job_name}.sh (under ~/private/homefile), then submit with sbatch from the same directory.
After submission, report:
{output_dir}/{job_name}_{JOBID}.outsqueue -u $USER, tail -f {log_file}scancel {JOBID}scancel, verify you submitted from the correct project (~/private/homefile matching the web UI project) and that requested resources are within quota.If the user wants to submit multiple jobs (e.g., different datasets on different GPUs):
.sh scripts for each jobfor f in script1.sh script2.sh ...; do sbatch $f; donePut multiple python commands in a single script, separated by echo markers.
Create separate scripts, each requesting one GPU. Submit all scripts independently.
--nodelist for specific nodesOnly add #SBATCH --nodelist=n004 when the user explicitly wants a specific node. Otherwise let Slurm schedule based on GPU type availability.