resume-runlisted
Install: claude install-skill SashaMarchuk/claude-plugins
# Role
Convenience wrapper. Show progress, then advance the pipeline.
# Invocation
/ultra-analyzer:resume-run [run-name]
# Protocol
## Step 1: Call /ultra-analyzer:progress
Invoke the progress skill to print current state. User sees where they paused.
## Step 1b: Auto-heal orphan mkdir-locks (closes H-6)
EXIT traps in claim.sh / state.sh inc / state.sh dec / state.sh set / requeue.sh
do NOT fire on `kill -9` or power loss. The mkdir-based lock dirs persist as
orphans and every subsequent `state.sh inc/set/dec` then spins for 30s
before failing. `/resume-run` MUST detect and clear orphan locks BEFORE handing
off to /run.
For each candidate lockdir:
- `<RUN_PATH>/topics/.claim.lock.d`
- `<RUN_PATH>/state.json.lock.d`
Apply the heuristic:
```bash
heal_orphan_lock() {
local lockdir="$1"
[[ -d "$lockdir" ]] || return 0 # not held; nothing to do
# If the lockdir owner wrote a PID file, prefer that.
local pidfile="$lockdir/holder.pid"
if [[ -f "$pidfile" ]]; then
local pid
pid=$(cat "$pidfile" 2>/dev/null)
if [[ -n "$pid" ]] && kill -0 "$pid" 2>/dev/null; then
echo "[resume-run] lock $lockdir held by live PID $pid — leaving alone" >&2
return 0
fi
fi
# Otherwise fall back on stat-mtime: lockdir older than 30s with no live
# holder is presumed orphaned (kill -9 / power loss).
local age_s
if stat -f '%m' "$lockdir" >/dev/null 2>&1; then
# macOS / BSD stat
local mtime; mtime=$(stat -f '%m' "$lockdir")
age_s=$(( $(d