vm-disk-cleanup — плагин для Claude Code: что делает и как установить
Очищает дисковое пространство в виртуальных машинах и песочницах Claude при ошибках ENOSPC.
/plugin marketplace add anthropics/claude-plugins-community
/plugin install vm-disk-cleanup@claude-communityЧто делает vm-disk-cleanup
Во время долгих сессий песочницы Claude Code забиваются кэшами пакетных менеджеров, временными файлами и артефактами сборки. Когда свободное место кончается совсем, Bash перестаёт выполнять команды из-за ошибок ENOSPC. Плагин разрывает этот тупик поэтапной очисткой.
Процедура разбита на три фазы. Сначала удаляются байт-код Python, временные файлы и кэш apt, которым почти не нужно свободного места для работы. На втором этапе счищаются кэши pip и npm. На третьем шаге плагин удаляет node_modules, глобальные пакеты и артефакты сборки.
Инструмент срабатывает автоматически при обнаружении ошибок ENOSPC в выводе терминала. Для работы плагину требуется только среда с доступом к Bash.
Какие задачи решает
- устранить ошибки ENOSPC при переполнении диска
- очистить кэши pip и npm в песочнице
- удалить временные файлы и байт-код Python
- стереть папки node_modules и артефакты сборки
Примеры запросов агенту
- Очисти диск виртуалки
- Закончилось свободное место на диске, освободи память
- Проведи очистку текущей сессии
Как установить vm-disk-cleanup
Через маркетплейс плагинов
/plugin marketplace add anthropics/claude-plugins-community/plugin install vm-disk-cleanup@claude-communityПо шагам, с командами для каждой платформы: Плагины Claude Code: маркетплейсы, установка и как собрать свой
Вопросы о vm-disk-cleanup
Как установить vm-disk-cleanup в Claude Code?
Выполните по очереди две команды в CLI: /plugin marketplace add anthropics/claude-plugins-community, а затем /plugin install vm-disk-cleanup@claude-community.
Что делает vm-disk-cleanup?
Плагин поэтапно освобождает диск: сначала стирает байт-код Python и временные файлы, затем кэши npm и pip, а в конце удаляет артефакты сборок и node_modules.
Что нужно плагину для работы?
Дополнительная настройка не требуется, нужна только среда с доступом к Bash.
Исходный текст
vm-disk-cleanup · MIT
# VM Disk Cleanup Prevent and recover from disk-full errors in Claude's working environment — both **Cowork** session VMs and **Claude Code** sandboxes. ## The Problem Long Claude sessions accumulate disk-eating artifacts: npm/pip caches, `node_modules`, Python bytecode, build outputs, and temp files. When the disk fills completely, even basic Bash commands fail with `ENOSPC` errors — creating a deadlock where you can't diagnose or fix the problem. ## What It Does A 3-phase cleanup that starts with the lightest operations (so they work even when disk is nearly full) and escalates: | Phase | What it clears | Disk needed | |-------|---------------|-------------| | **1 — Emergency** | Python bytecode, temp files, apt cache | Almost zero | | **2 — Medium** | pip cache, npm cache | Minimal | | **3 — Heavy** | node_modules, build artifacts, global packages | Some free space | ## Installation ### Step 1: Add the MSApps marketplace (one-time) **Claude Code (CLI):** ``` /plugin marketplace add MSApps-Mobile/claude-plugins ``` **Cowork (Desktop App):** Go to **Settings → Plugins → Marketplaces → Add**, and enter `MSApps-Mobile/claude-plugins`. You only need to do this once — it gives you access to all MSApps plugins. ### Step 2: Install the plugin **Claude Code:** ``` /plugin install vm-disk-cleanup@msapps-plugins ``` **Cowork:** Go to **Settings → Plugins**, search for **vm-disk-cleanup**, and click **Install**. ## Usage Just say any of these naturally: - "clean VM" / "clean disk" - "disk full" / "no space left" - "free disk space" - "session cleanup" The skill also activates automatically when it detects ENOSPC errors in Bash output. ### Pro tip: Pair with a scheduled task In **Cowork**, you can set up a scheduled task that runs cleanup every 2 hours to prevent disk-full situations before they happen. Ask Claude: *"Create a scheduled task to clean the VM disk every 2 hours"*. ## Setup No configuration needed. Works out of the box on both platforms. ## Requirements - **Cowork**: Any session (Linux VM with Bash) - **Claude Code**: Any environment with Bash access ## License MIT — Free to use and modify.
© MSApps-Mobile · MIT · MSApps-Mobile/claude-plugins