← ClaudeAtlas

clean-vmlisted

Safely clean the local loop VM by reporting and removing stale loop runs, inactive Next.js or Storybook servers, optional browser windows, and unused loop-created worktrees without disturbing active tmux-backed sessions.
Eldergenix/Proofloop · ★ 1 · AI & Automation · score 72
Install: claude install-skill Eldergenix/Proofloop
# Clean VM Use this skill when repeated loop, Claude, or Codex runs leave the machine in a bad state. Start with the bundled script. It does a dry run by default and only mutates the machine with `--apply`. ## Default Workflow 1. Run a dry run first: ```bash python3 .agents/skills/clean-vm/scripts/clean_vm.py ``` 2. Review the report. The script only targets: - loop manifests under `~/.loop/runs/<repoId>` - direct `loop __bridge-mcp <runDir> <claude|codex>` processes for stale runs - loop helper processes tied to stale run dirs - Next.js and Storybook servers running inside stale loop worktrees - loop-created worktrees from `git worktree list --porcelain` 3. Apply the cleanup once the plan looks safe: ```bash python3 .agents/skills/clean-vm/scripts/clean_vm.py --apply ``` 4. Only close browser windows when the user explicitly wants browser cleanup: ```bash python3 .agents/skills/clean-vm/scripts/clean_vm.py --apply --browsers ``` ## Safety Rules - Always inspect the dry run before using `--apply`. - Treat loop manifests in `~/.loop/runs` as the source of truth for paired runs. - Keep any run whose manifest state is `submitted`, `working`, `reviewing`, or `input-required` and whose `pid` or `tmuxSession` is still live. - Never mass-kill `claude`, `codex`, or `node`. Kill only per PID after the script proves the process belongs to stale loop state. - Never remove the main worktree, the worktree containing the current `pwd`, or a dirty worktree. - The script does not