원클릭으로
harvest
Discover completed SLURM experiments, collect results, and update experiment documentation.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Discover completed SLURM experiments, collect results, and update experiment documentation.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | harvest |
| description | Discover completed SLURM experiments, collect results, and update experiment documentation. |
| argument-hint | [--auto] [experiment-name] |
| allowed-tools | Bash(sacct *), Bash(scontrol *), Bash(squeue *), Bash(ls *), Bash(tail *), Bash(jq *), Bash(hostname *), Bash(date *), Bash(cat *), Bash(find *), Read, Edit, Write, Glob, Grep |
Discover completed SLURM experiments, collect their results, and update experiment documentation (docs/experiments.md index + docs/experiments/<detail>.md files).
$ARGUMENTS[0] = --auto: skip confirmation, harvest silently (useful with /loop)$ARGUMENTS[0] = experiment name: harvest only that specific experimentBefore collecting results, understand what this project tracks:
Read the project's CLAUDE.md (repo root). Look for:
Learn the reporting style: Read 1-2 existing completed detail files in docs/experiments/ (those with real Results content, not "Pending"). This shows:
If no completed detail files exist and CLAUDE.md doesn't specify metrics, collect whatever quantitative results are found in output files and logs.
Use both methods in parallel and deduplicate:
ls logs/*.done.json 2>/dev/null
Read each .done.json file. Expected schema:
{
"experiment_name": "...",
"job_id": "...",
"job_type": "...",
"status": "completed|failed",
"finished_at": "ISO 8601",
"checkpoint": "... (optional)",
"wandb_run_id": "... (optional)"
}
Read docs/experiments/ detail files. Find those with **Status**: Submitted or **Status**: Running. Extract the Job ID from the **Job ID**: line.
For each, check SLURM:
sacct -j <JOB_ID> --format=JobID%15,State%15,ExitCode%8,Elapsed%12,End%20 --noheader --parsable2 2>/dev/null
A job is harvestable if its state is COMPLETED, FAILED, TIMEOUT, CANCELLED, or OUT_OF_MEMORY.
Skip any experiment whose detail file already has real results in the ## Results section (i.e., not just "Pending" or "To be filled").
If a specific experiment name was provided as an argument, only harvest that one.
Print what was found:
Found N harvestable experiment(s):
- experiment-name-1 (job 12345) — COMPLETED
- experiment-name-2 (job 12346) — FAILED
If --auto was NOT passed, ask the user for confirmation before proceeding. If nothing found, report "No pending experiments to harvest" and exit.
The collection strategy depends on the job outcome.
Read the experiment's detail file — the Goal and Setup sections describe what was run and what to look for.
Find result files — use the project's CLAUDE.md to know where results are stored. Common patterns:
results/, output/, or a turbo storage pathRead SLURM log tail (last 50 lines of logs/<name>_<jobid>.out) for:
Extract metrics — use the project's CLAUDE.md and the reporting style from Step 0 to know which metrics to extract and how to format them.
If the .done.json marker has a checkpoint field, note it for the results.
.out and .err, last 50 lines each) for error messages.sacct -j <JOB_ID> --format=State,ExitCode,MaxRSS,Elapsed --noheader --parsable2 for resource usage.For each harvested experiment:
docs/experiments/<date>_<name>.md)**Status**: Submitted or **Status**: Running to the actual status (Completed, Failed, Timed out, Cancelled, Out of memory)## Results section content:
## Observations with a brief interpretation (1-2 sentences based on the results and the Goal section)docs/experiments.md)Find the bullet for this experiment and update with the key result. Example:
- **sft-llama7b-baseline** (7B full-FT): First SFT run on Llama. [detail](...)- **sft-llama7b-baseline** (7B full-FT): 72.3% val acc — strong baseline. [detail](...)Keep the [detail](...) link. Keep entry under 100 words.
If the project's CLAUDE.md specifies a results summary command (e.g. a script that aggregates results), run it.
Print a summary:
Harvested N experiment(s):
experiment-name (job 12345) — COMPLETED
Key result: XX.X% accuracy (or whatever the primary metric is)
Updated: docs/experiments/YYYY-MM-DD_name.md
Updated: docs/experiments.md
Remaining pending: M experiment(s)
sacct may not work for jobs on a remote cluster. Fall back to marker files. If neither works, note that results must be harvested from the remote cluster.Check hostname to determine access level:
.done.json Marker ConventionJob scripts are encouraged to write a completion marker so /harvest can auto-discover finished experiments:
Location: logs/<experiment_name>_<job_id>.done.json
Schema:
{
"experiment_name": "string (matches EXPERIMENT_NAME env var)",
"job_id": "string (SLURM job ID)",
"job_type": "string (project-defined job type)",
"status": "completed | failed",
"finished_at": "ISO 8601 timestamp",
"checkpoint": "string (path to final checkpoint, optional)",
"wandb_run_id": "string (optional)"
}
This is a convention, not a requirement. If markers are not present, the skill falls back to sacct scanning of experiments found in docs/experiments/ detail files.
Set up cross-cluster SSH (Great Lakes <-> Lighthouse) and establish the connection. Handles first-time setup automatically.
Experimental. Plan and assist migration of a repository to another lab's compute resources by discovering the current server, user, Slurm/storage environment, and repo assumptions, then presenting findings for correction before editing.
Submit a SLURM experiment with proper naming, documentation, and cross-cluster support. Reads project context to discover submission infrastructure.
Onboard a lab member onto the shared Claude Code and/or Codex configuration. Detects clusters, collects Slurm account details, runs setup, and helps customize personal config.
Onboard a new lab member onto the shared Claude Code configuration. Detects clusters, collects Slurm account details, runs setup, and helps customize personal config.
Create or modify an sbatch job script with correct partitions, accounts, GPU requests, and best-practice defaults for the current cluster.