kwongfuk/codex-skills/slurm-self-healing-watchdog

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Submit a Slurm sbatch job through a watchdog that waits for terminal state, diagnoses failures from sacct/squeue plus stdout/stderr, invokes Codex to apply a minimal repair when needed, and resubmits up to 5 times. Use when the user wants a trigger-like loop that can monitor stopped jobs, analyze why they failed, patch the repo or sbatch script, and retry automatically.

Install

npx vskill@latest install kwongfuk/codex-skills/slurm-self-healing-watchdog

SKILL.md

Slurm Self Healing Watchdog

Use this skill when a Slurm job should not stop after one failed sbatch.

What It Does

The bundled script:

  • submits an sbatch script
  • polls sacct and falls back to squeue
  • resolves stdout/stderr paths from #SBATCH -o/-e
  • classifies the failure mode from Slurm state plus log text
  • calls codex exec with a focused repair prompt when the job did not complete
  • resubmits the job after repair, up to --max-attempts 5
  • writes a JSON report for all attempts and repair summaries

When To Use

Use this skill when the user wants:

  • a post-submit trigger that watches whether a Slurm job stopped
  • automatic retry after timeout, OOM, node failure, launcher failure, or deterministic script bugs
  • Codex to inspect logs and make a minimal fix before resubmission
  • a reusable wrapper around sbatch rather than a one-off manual loop

Do not use it when:

  • the user only wants a plain one-shot submit
  • the failure requires human judgment beyond safe local edits
  • the repository must remain completely unchanged between retries

Workflow

  1. Run the watchdog from the target repository root:
bash
python /home/gguo/code/.codex/skills/slurm-self-healing-watchdog/scripts/slurm_self_heal.py \
slurm/train.sbatch \
--max-attempts 5
  1. On each failed attempt, inspect the JSON report and the saved Codex repair note under the state directory.
  1. If the job still fails after 5 attempts, stop and review the final classified reason.

Useful Flags

  • --poll-seconds 30
  • --state-dir logs/slurm/self-heal
  • --codex-bin /home/gguo/.nvm/versions/node/v20.20.0/bin/codex
  • --codex-model gpt-5.4
  • --dry-run to inspect derived paths without submitting

Repair Policy

  • The repair step should stay minimal and local to the repository.
  • Prefer fixing the sbatch script, launcher, config, or the file directly implicated by the traceback.
  • For TIMEOUT or OUT_OF_MEMORY, prefer resource, batch-size, checkpoint, or resume adjustments before broad code changes.
  • If the failure is obviously transient, Codex may make no code changes and let the watchdog resubmit unchanged.
  • If Codex cannot produce a safe repair, the watchdog stops instead of looping blindly.

Output

Each run writes:

  • one JSON report with attempt metadata
  • one text file per repair attempt containing Codex's final summary

Read those artifacts first when deciding whether to continue manual debugging.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/kwongfuk/codex-skills/slurm-self-healing-watchdog/badge)](https://verified-skill.com/skills/kwongfuk/codex-skills/slurm-self-healing-watchdog)

Something wrong with this skill or its page? Tell us.