vm-cleanup

vm-cleanup is a skill for Claude Code from MSApps-Mobile/claude-plugins. It costs 95 tokens per session (1,398 once invoked), scanned C, original, MIT.

A set of cleanup instructions for freeing space in the temporary virtual machine or sandbox where coding work runs.

In plain words
What is it for?
Use it to remove temporary files, caches, Python bytecode, package-manager data, and other disposable files when disk space is low.
Why use it?
Long sessions, package installs, and builds can fill the limited disk. Cleanup prevents or recovers from errors such as “no space left on device.”

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Part of the vm-disk-cleanup plugin — 1 skill shipped together

Good fit Use it to remove temporary files, caches, Python bytecode, package-manager data, and other disposable files when disk space is low.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/msapps-mobile/claude-plugins/vm-cleanup
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 MSApps-Mobile/claude-plugins --skill vm-cleanup
Clone the repo
git clone --depth 1 https://github.com/MSApps-Mobile/claude-plugins

Made for: Claude Code.

Or install vm-disk-cleanup, the plugin that ships this one along with the rest of its 1 skill.

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 vm-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/msapps-mobile/claude-plugins/vm-cleanup/github.svg)](https://agentmods.dev/skills/msapps-mobile/claude-plugins/vm-cleanup)
Your own site
<a href="https://agentmods.dev/skills/msapps-mobile/claude-plugins/vm-cleanup"><img src="https://agentmods.dev/badge/skills/msapps-mobile/claude-plugins/vm-cleanup/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 vm-cleanup

Your own site · 80×15
<a href="https://agentmods.dev/skills/msapps-mobile/claude-plugins/vm-cleanup"><img src="https://agentmods.dev/badge/skills/msapps-mobile/claude-plugins/vm-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,398 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.00095 $0.01398
Opus 5.5 $0.00038 $0.00559
Sonnet 5.5 $0.00019 $0.00280
Haiku 4.5 $0.00010 $0.00140

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

Security

Grade C, and why

vm-cleanup scanned grade C with 1 finding 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.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

find /sessions -name __pycache__ -type d -exec rm -rf {} + 2>/dev/null
plugins/vm-disk-cleanup/skills/vm-cleanup/SKILL.md · 146 lines

How it starts

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

VM / Session Disk Cleanup

Recover from or prevent disk-full situations in Claude's working environment.

Context

Both Cowork session VMs and Claude Code sandboxes have limited disk space. Long sessions with package installs, builds, and cached data can fill the disk completely. When full, ALL Bash commands fail with ENOSPC errors because the shell can't create temp files — a deadlock where you can't even diagnose the problem.

Cleanup Strategy

Run cleanups in phases — smallest operations first so they succeed even when disk is critically low.

Phase 1: Emergency (needs almost zero free space)

Run these first when disk is completely full or nearly full:

# Remove Python bytecode (tiny files, frees inodes)
find /sessions -name __pycache__ -type d -exec rm -rf {} + 2>/dev/null
find /sessions -name "*.pyc" -delete 2>/dev/null
find . -name __pycache__ -type d -exec rm -rf {} + 2>/dev/null
# Clear temp files
rm -rf /tmp/*.tmp /tmp/*.log /tmp/tmp* /tmp/pip-* /tmp/npm-* 2>/dev/null
# Clear apt/package manager cache
rm -rf /var/cache/apt/archives/*.deb 2>/dev/null
apt-get clean 2>/dev/null

Phase 2: Medium cleanup (clear package caches)

# Clear pip cache
pip cache purge 2>/dev/null
rm -rf ~/.cache/pip 2>/dev/null
# Clear npm cache
npm cache clean --force 2>/dev/null
rm -rf ~/.npm/_cacache 2>/dev/null

Phase 3: Heavy cleanup (removes reinstallable items)

# Remove node_modules (recreate with npm install)
find /sessions -name "node_modules" -type d -exec rm -rf {} + 2>/dev/null
find . -name "node_modules" -type d -exec rm -rf {} + 2>/dev/null
# Remove build artifacts (recreate with build command)
find /sessions \( -name ".next" -o -name "dist" -o -name "build" \) -type d -exec rm -rf {} + 2>/dev/null
find . \( -name ".next" -o -name "dist" -o -name "build" \) -type d -exec rm -rf {} + 2>/dev/null
# Remove global npm packages
rm -rf ~/.npm-global/lib/node_modules/* 2>/dev/null

Read the full file on GitHub · 146 lines

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 · 146 lines · 95 tokens per session scan C 43f2e29baaf0

Subscribe to this mod's changes

vm-cleanup is a skill published in the GitHub repository MSApps-Mobile/claude-plugins (9 stars, last pushed today), licensed MIT. It adds 95 tokens to every session and 1,398 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-13.

Related

Other skills, from other repositories

live-preview

Mid-build visual verification loop. Takes screenshots of components during construction, not just after. Catches visual regressions and invisible features before they compound. Requires Playwright or similar screenshot tool.

SethGammon/Citadel · 40 tokens

wiki

Markdown-first knowledge base where the LLM acts as librarian. Ingests raw sources, compiles and interlinks topic files, self-maintains an index. No vector DB or embeddings required -- uses LLM-native navigation over structured markdown up to 400K words.

SethGammon/Citadel · 56 tokens

media-gemini-3-image-prompt

A prompt builder for Gemini 3 Pro Image, also known as Nano Banana Pro, Google's image-generation model. It expands a short request into five parts covering the subject, action, setting, composition, lighting, style, and text constraints.

modu-ai/moai-cowork · 329 tokens

data-realestate

A lookup tool for reported South Korean property transactions using Ministry of Land data. It covers sales and rental deals for apartments, officetels, multi-family homes, houses, and commercial or office properties.

modu-ai/moai-cowork · 230 tokens

design-sync-upload

An uploader for design-system files such as DESIGN.md, tokens, logos, fonts, and images into Claude Design. It can either use an authenticated connection or prepare a folder and guide for manual upload.

modu-ai/moai-cowork · 85 tokens

meta-feedback

A feedback reporter that collects bug reports and feature requests, then formats them as GitHub Issues. GitHub Issues are shared records used by development teams to track work and problems.

modu-ai/moai-cowork · 61 tokens