clean-disk
How to reclaim disk on this machine safely: measure first with cheap probes, delete only what this file names, never touch the node's state, the databases…
Skill by Magaav
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/magaav-clean-disk
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/clean-disk
What's inside
- Skill name
clean-disk- Description
- How to reclaim disk on this machine safely: measure first with cheap probes, delete only what this file names, never touch the node's state, the databases, live worktrees, unmerged drafts or the installed build, and report what was removed and what was skipped and why. Use it for `/clean disk`, when the disk is above ~85%, when a build fails with no space, or when temp/scratch/evidence has grown without bound.
- License
- MIT
- Instructions
- 178 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- files: referenced but missing: scripts/clean-disk-report.sh
Files (1)
- SKILL.md
SKILL.md (first lines)
# Reclaiming disk on this machine
Disk here is a single volume: `C:` ~477 GB, and it has been at **92% used (42 GB free)** with 169
session worktrees. Measuring is the expensive part, not deleting: a `du -sm` across
`.wasm-agent/wa-worktree-*` took **14.5 minutes**. Never start with a full-tree `du`.
## 0. The rules that make this safe
1. **Dry run first, always.** Produce the plan (path, size, why it is safe) and delete nothing until
the plan has been shown. `/clean disk` runs the dry run; a second invocation with `--apply` deletes.
2. **Delete only what this file names.** A path that is merely "surprisingly big" is not a target.
3. **Never `rm -rf` a git worktree.** `git worktree remove` (and `session_worktree release` for
managed ones) is the only supported path — a plain delete loses uncommitted drafts and leaves the
repo's worktree metadata pointing at nothing.
4. **Never touch state**: `~/.wasm-agent/memory.db*`, `graph.db`, `installed.txt`,
`deploy-result.json`, `serve.pid`, `sentinel/requests|claimed|done|failed` (that is evidence),
`sentinel/stop`, `~/.wasm-agent/archive/` (deliberate archives), the repo working trees, and any
worktree whose branch is **not** an ancestor of `origin/main`.
5. **A skipped thing is reported as skipped**, with the reason. "Nothing to do" and "I did not look"
must not read the same.
## 1. Measure cheaply (do this, not `du -sh *`)
```bash
df -h /c # the only number that decides urgency
du -sm ~/.wasm-agent/session-scratch ~/.wasm-agent/benchmarks \
~/.wasm-agent/operations ~/.wasm-agent/sentinel \
"$LOCALAPPDATA/Temp" rust/target | sort -rn # targeted, ~1 min
```
Per-worktree sizes are the exception, and they are slow. Ask for them only when the plan needs them,
one directory at a time, and cap the number of samples.
**The measurement is the script, not a retyped command line:** `scripts/clean-disk-report.sh` is the
DRY RUN above as one block - free space, then `path | size | verdict` for every target this file
names, including Docker's `RECLAIMABLE`, both `.vhdx` files with the guest's own `df -h /` beside
them, and the worktree count. It deletes nothing and encodes the traps in section 4 (a denied
directory prints `UNREADABLE (access denied)`, never `0 MB`; the guest command sets
`MSYS_NO_PATHCONV=1`), so the numbers a plan is built from cannot drift from this procedure:
```bash
bash scripts/clean-disk-report.sh
```
## 2. What is safe here, by measured size
| Target | Measured | Rule |
| --- | --- | --- |
| `~/.wasm-agent/session-scratch/*` | 29 GB | delete **per session**, oldest first, keeping the newest N (default 5) and any session that is still open; these are screenshots, probes and evidence copies |
| `~/.wasm-agent/benchmarks/*` | 7.5 GB | **not deletable as directories.** Measured 2026-10-21: each `edit-workflow-*` run dir contains **3 REGISTERED git worktrees** (24 in total, detached HEAD `bad2cdc3`) - `rm -rf` one and the repo's worktree metadata points at nothing. Remove them only with `git worktree remove` (a repository change, so outside this skill), or leave them. `whisper-wasm` (2.5 GB) is a reusable corpus/model cache, not a finished run |
| `rust/target/{debug,incremental,*/deps}` | 4.8 GB | `cargo clean` is **opt-in** — say the rebuild cost out loud; prefer `target/debug` before `release` |
| `$LOCALAPPDATA/Temp/wa-*`, `wa-ui-test-*`, `ui-*`, `fa-*` | 2.8 GB | test harness output, safe anytime; check no `test-ui.ps1` is running first (the harness refuses a second instance). Measured 2026-10-21: those four patterns are only ~160 MB of a 4.3 GB Temp - the bulk is other tools' directories, which are **not** this skill's to delete |
| `~/.wasm-agent/operations/*` | 2.7 GB | per-call stdout/stderr; keep the newest N days (default 3) so a recent failure is still diagnosable |
| `~/.wasm-agent/sentinel/deploy.out`, `deploy.log`, `sentinel.log` | 2.6 GB | rotate, keep the last ~50 MB each; **never** delete `requests/`, `done/`, `failed/`, `protocol-effect.json` |
| images/screenshots in the above | inside their areas | they are the bulk of session-scratch and Temp; deleting the containing area covers them |
## 3. Worktrees: list, then release, never delete
The 169 worktrees dominate the disk, and they are the one thing this skill must not improvise:
```bash
git worktree list # all of them
git branch --no-merged origin/main # what may not be released
git -C <worktree> status --porcelain # dirty = keep
```
Release only worktrees that are **clean, inactive, and merged** (`session_worktree release`), and
leave the rest. Report the candidates with sizes so the operator can decide; a worktree holding an
unlanded draft is evidence, not clutter.
## 4. Docker and virtual disks (tier 3 — a service stops, never silently)
Measured on this machine, 2026-10-21:
| item | measured | action | risk |
| --- | --- | --- | --- |
| Docker images | **10.34 GB** reclaimable (22 images, 1 active) | `docker image prune -a` | safe — pulled or rebuilt on demand |
| Docker build cache | **5.52 GB** | `docker builder prune` | safe |
| `AppData/Local/Docker/wsl/disk/docker_data.vhdx` | **30.7 GB** | compaction only (below) | needs Docker Desktop stopped |
| `…/CanonicalGroupLimited.Ubuntu_*/LocalState/ext4.vhdx` | **39.0 GB** | compaction only (below) | **holds real work — back up first** |
### The VHDX rule (the one that bites)
Deleting files *inside* a distro or a Docker image frees blocks in the guest, **not** space on `C:`.
The `.vhdx` keeps its allocated size until it is compacted. "Prune 30 GB and expect 30 GB back" is
false; recent Docker Desktop compacts its own store, a WSL distro does not.
### Docker, in order
1. `docker system df` — read `RECLAIMABLE` before deleting anything.
2. `docker image prune -a`, then `docker builder prune`. Safe: images and cache are rebuilt.
**Never** `docker system prune --volumes` unasked — a volume may hold data, not cache.
3. For `docker_data.vhdx`, quit Docker Desktop first, then compact. **Never compact while the engine
runs**: the file is open and the result is a corrupt virtual disk.
### Tier 1-2: caches that re-download (no service stops, no elevation)
| item | measured | action | note |
| --- | --- | --- | --- |
| **Recycle Bin** | **9.5 GB** | `Clear-RecycleBin -Force` | the probe that failed with `du`: read it with PowerShell (`Get-ChildItem -LiteralPath "C:\$Recycle.Bin"`). **Ask first** - nothing in it is restorable afterwards |
| `~/.cargo/registry` | 731 MB | `cargo cache -a` or delete `registry/` | re-downloads on the next build |
| Explorer thumbnail/icon cache | 327 MB | delete `…/Explorer/thumbcache_*.db` | Windows rebuilds it; needs the Explorer window closed, not the service |
| Chrome `User Data/Default/Cache` | 58 MB | delete the `Cache` dir | never touch the profile directory itself |
| npm cache | 34 MB | `npm cache clean --force` | |
| pip cache | 1 MB | nothing to win | |
| `C:\Windows\SoftwareDistribution\Download` | **0.0 MB, 0 entries** | nothing to win | genuinely empty here |
| `C:\Windows\Temp`, `WinSxS` | **unreadable (access denied)**, 8.9 GB when read | needs elevation | see the traps below |
### The WSL distro: report-only unless the operator says otherwise
This distro holds real work (`/local/colmeio` and its evidence), so the default is **measure and
report, do not compact**:
```bash
wsl.exe -l -v # what exists and what is running
wsl.exe -d Ubuntu -- df -h / # guest usage: the only number that says what frees
wsl.exe -d Ubuntu -- du -xh --max-depth=1 / 2>/dev/null | sort -h | tail -15
```
**Measured on this machine (2026-10-21): the distro's `ext4.vhdx` is 39.0 GB on disk and the guest uses
13 GB** (`df -h /` → 14 G used of 1007 G; `du -xh --max-depth=1 /` → 13 G total). The gap is thereforeFrom Magaav/wasm-agent, MIT.
More from Magaav/wasm-agent
- 0.592score
code-graph
Magaav
Retrieve a ranked code symbol and its exact implementation, answer explicit dependency questions, or audit a patch's possible missed callers.
SkillAFreshness: A★ 1Claude Code +9 - 0.588score
parallel-evolution
Magaav
How to change code on a branch while other people or agents may be changing the same repository, so your change stays current with the integration branch and…
SkillAFreshness: A★ 1Claude Code +9 - 0.588score
git-orchestrator
Magaav
The merge lane's runbook and the one home of the integration protocol: who may move main, the lifecycle (produce -> verify -> accept -> land -> deploy ->…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
whatsapp-reply
Magaav
Scoped WhatsApp journal reads/decisions and linked-device transcription safety.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
client-controls
Magaav
How to act on the user's own machine (screenshot, mouse, keyboard, a shell) and how to browse a web page in Chrome.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
codemode-output
Magaav
Present native code-mode reads or edit receipts without double JSON escaping; recover partial output and cached read_many pages, or reread after a…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
history-search
Magaav
Retrieve original past requests, decisions, corrections or execution evidence efficiently.
SkillAFreshness: A★ 1Claude Code +9 - 0.585score
agent-benchmark
Magaav
Qualify isolated four-arm coding pilots, verify hidden acceptance and lossless cleanup, then compare only explicitly approved trials.
SkillAFreshness: A★ 1Claude Code +9 - 0.584score
delivery-recovery
Magaav
Reconcile concurrent delivery-record updates or an admission event whose enqueue failed, returned queued zero, or was interrupted.
SkillAFreshness: A★ 1Claude Code +9 - 0.584score
gate-lifecycle
Magaav
Inspect a queued, stuck, cancelled or nested test gate; recover only after proving process/lease ownership and drain.
SkillAFreshness: A★ 1Claude Code +9 - 0.583score
vm-windows
Magaav
Use when bootstrapping, starting, repairing, accessing by SSH, or testing wasm-agent in a disposable Windows Hyper-V VM on the operator's PC.
SkillAFreshness: A★ 1Claude Code +9 - 0.583score
self-update
Magaav
How to rebuild and replace the node you are running on - and, when the change is in the supervisor itself, how to deploy a new wa-sentinel - without breaking…
SkillAFreshness: A★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 21, 2026 (7 days ago)
- Last release
- Oct 20, 2026 (9 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Magaav/wasm-agent
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Magaav
- 0.592score
code-graph
Magaav
Retrieve a ranked code symbol and its exact implementation, answer explicit dependency questions, or audit a patch's possible missed callers.
SkillAFreshness: A★ 1Claude Code +9 - 0.588score
git-orchestrator
Magaav
The merge lane's runbook and the one home of the integration protocol: who may move main, the lifecycle (produce -> verify -> accept -> land -> deploy ->…
SkillAFreshness: A★ 1Claude Code +9 - 0.588score
parallel-evolution
Magaav
How to change code on a branch while other people or agents may be changing the same repository, so your change stays current with the integration branch and…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
whatsapp-reply
Magaav
Scoped WhatsApp journal reads/decisions and linked-device transcription safety.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
codemode-output
Magaav
Present native code-mode reads or edit receipts without double JSON escaping; recover partial output and cached read_many pages, or reread after a…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
client-controls
Magaav
How to act on the user's own machine (screenshot, mouse, keyboard, a shell) and how to browse a web page in Chrome.
SkillAFreshness: A★ 1Claude Code +9
Cite this page
clean-disk skill. Agent Mart. https://agentmart.dev/skills/magaav-clean-disk (last updated 2026-10-24)