clean-vm

clean-vm is a skill for Codex from Eldergenix/Proofloop. It costs 45 tokens per session (905 once invoked), scanned A, a copy of clean-vm, MIT.

A cleanup tool for removing leftover processes, workspaces, and browser windows from local coding-agent runs. It first reports what it would remove.

In plain words
What is it for?
Use it to inspect and clean stale runs, inactive Next.js or Storybook servers, unused worktrees, and optionally browser windows.
Why use it?
Repeated development runs can leave inactive servers and temporary workspaces using resources or causing confusion.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents); mentions Codex.

Good fit Use it to inspect and clean stale runs, inactive Next.js or Storybook servers, unused worktrees, and optionally browser windows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/eldergenix/proofloop/clean-vm
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Eldergenix/Proofloop --skill clean-vm
Clone the repo
git clone --depth 1 https://github.com/Eldergenix/Proofloop

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for clean-vm

README.md
[![agentmods](https://agentmods.dev/badge/skills/eldergenix/proofloop/clean-vm/github.svg)](https://agentmods.dev/skills/eldergenix/proofloop/clean-vm)
Your own site
<a href="https://agentmods.dev/skills/eldergenix/proofloop/clean-vm"><img src="https://agentmods.dev/badge/skills/eldergenix/proofloop/clean-vm/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for clean-vm

Your own site · 80×15
<a href="https://agentmods.dev/skills/eldergenix/proofloop/clean-vm"><img src="https://agentmods.dev/badge/skills/eldergenix/proofloop/clean-vm.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 905 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.00905
Opus 5.5 $0.00018 $0.00362
Sonnet 5.5 $0.00009 $0.00181
Haiku 4.5 $0.00005 $0.00090

Measured 1mo ago against content hash 6b0bb4161aa6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

clean-vm scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/clean_vm.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to clean-vm — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/clean-vm/SKILL.md · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:
python3 .agents/skills/clean-vm/scripts/clean_vm.py
  1. 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
  1. Apply the cleanup once the plan looks safe:
python3 .agents/skills/clean-vm/scripts/clean_vm.py --apply
  1. Only close browser windows when the user explicitly wants browser cleanup:
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 auto-force worktree removal. If a plain git worktree remove fails, it reports the failure and leaves escalation to a manual follow-up.
  • Treat any live tmux session as in use even if the manifest looks stale.
  • Browser cleanup is opt-in and macOS-only.

What the Script Checks

  • repo identity via git rev-parse --git-common-dir, using the same repo id scheme as loop
  • run manifests under ~/.loop/runs
  • tmux liveness with exact session targets like tmux has-session -t =<name> plus a live-pane check from tmux list-panes
  • helper processes whose command line references a stale run dir
  • direct loop bridge MCP server processes whose run dir is stale or orphaned
  • dev servers matching next dev, next-server, storybook, or start-storybook
  • worktrees from git worktree list --porcelain

Read the full file on GitHub · 90 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 90 lines · 45 tokens per session scan A 6b0bb4161aa6

Subscribe to this mod's changes

clean-vm is a skill published in the GitHub repository Eldergenix/Proofloop (40 stars, last pushed 5mo ago), licensed MIT. It adds 45 tokens to every session and 905 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to clean-vm, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

skill-builder

Automatically detect source types and build AI skills using Skill Seekers. Use when the user wants to create skills from documentation, repos, PDFs, videos, or other knowledge sources.

yusufkaraaslan/Skill_Seekers · 38 tokens

rudder-data-graphs

Produces Data Graph YAML from RETL sources for Audiences. Use when designing Data Graphs, mapping RETL to entities/events, or assessing customer fit for Audiences.

rudderlabs/rudder-agent-skills · 40 tokens

rudder-typer-workflow

Generates type-safe SDKs (Swift/Kotlin) from tracking plans with compile-time validation. Use when generating type-safe event tracking code from tracking plans using RudderTyper.

rudderlabs/rudder-agent-skills · 43 tokens

rudder-instrumentation-planning

Designs event taxonomies and instrumentation strategies from business requirements. Use when designing event taxonomy from scratch or restructuring existing instrumentation strategy.

rudderlabs/rudder-agent-skills · 32 tokens

rudder-instrumentation-debugging

Diagnoses and fixes validation errors, schema issues, and instrumentation problems. Use when debugging validation errors, schema issues, or instrumentation problems.

rudderlabs/rudder-agent-skills · 34 tokens

rudder-ai-events-verify

Verifies RudderStack AI events locally: captures what an instrumented app or MCP server sends, validates it against the AI events v0.3 schema, and checks joins, counts, identity and content. Use when testing AI events, or when AI or MCP events look wrong or missing.

rudderlabs/rudder-agent-skills · 66 tokens