disk-cleanup

disk-cleanup is a skill for Claude Code from mtarcure/claude-vibe-squad. It costs 92 tokens per session (1,917 once invoked), scanned A, original, MIT.

A Mac disk-cleanup procedure that first measures reclaimable space and then removes selected temporary or regenerable data in safety tiers. It uses a dry run by default, so the survey deletes nothing.

In plain words
What is it for?
It is for surveying and safely cleaning worktrees, temporary files, caches, container data, and other listed storage pools.
Why use it?
It reduces the risk of deleting useful files blindly while helping recover space before builds, releases, or large media jobs fail.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads ~/.codex paths; mentions Codex.

Good fit It is for surveying and safely cleaning worktrees, temporary files, caches, container data, and other listed storage pools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mtarcure/claude-vibe-squad/disk-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 mtarcure/claude-vibe-squad --skill disk-cleanup
Clone the repo
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad

Made for: Claude Code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/mtarcure/claude-vibe-squad/disk-cleanup"><img src="https://agentmods.dev/badge/skills/mtarcure/claude-vibe-squad/disk-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,917 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 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.00092 $0.01917
Opus 5.5 $0.00037 $0.00767
Sonnet 5.5 $0.00018 $0.00383
Haiku 4.5 $0.00009 $0.00192

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

Security

Grade A, and why

disk-cleanup 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 yesterday.

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.

.claude/skills/disk-cleanup/SKILL.md · 140 lines

How it starts

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

Disk cleanup (measure first, then reclaim in tiers)

This skill measures reclaimable pools, then reclaims the safe ones in tiers. One command does the survey and the apply; it is dry-run by default and deletes nothing until you pass an apply flag.

When to run

  • Session start, and before any build, release, or large-media job.
  • Whenever free space is under 40 GB (survey) — act before the 25 GB floor where board builds and media jobs start failing.
  • After a burst of board lanes, which leave worktrees, /tmp/vs sandboxes, and caches behind.

1. Measure first — never delete blind

bin/disk-hygiene.sh --plan      # full survey + sized plan, deletes NOTHING

--plan prints: APFS container free, staged-update (Preboot) allocation, board worktrees, the rescued-artifact archive, Chrome clones, the test-Postgres cluster, the top temp allocations, vault snapshots, docker usage, and the rescued regenerable-bulk plan. Read it before applying anything. For a raw look:

diskutil apfs list                         # container free vs ceiling
df -Pk /System/Volumes/Data | tail -n1     # data-volume Available (KiB)
du -sh /private/tmp/* 2>/dev/null | sort -h | tail        # tmp hogs
du -sh ~/vault-snapshots/* 2>/dev/null | sort -h          # snapshot pile
docker system df                                          # image/container space

2. Tiered reclaim

bin/disk-hygiene.sh --apply-safe        # Tier 1 only
bin/disk-hygiene.sh --apply-preserve    # Tier 1 + Tier 2

Tier 1 — automatic & safe (--apply-safe). Regenerable or settled only:

  • Settled board worktrees (preserve-first via prune-board-worktrees.sh) and their /tmp/vs sandboxes + codex-homes — only when the owning attempt is terminal, not live-referenced, and lsof-idle.
  • Chrome code_sign_clone.*, recognised /tmp lane caches/scratch older than 12 h, idle per-run test databases older than 6 h, and VACUUM FULL of a bloated idle configured base test database. Direct children of /private/tmp/chrono-scratch/ use a 48 h idle TTL; the container stays.
  • Tool versions (explicit Tier 1): Codex daemon releases keep the ~/.codex/packages/app-server-daemon/current target plus the newest other release by mtime. Claude versions keep the ~/.local/bin/claude target plus the newest other version. ps and lsof must prove every removed version idle, including mapped binaries. Missing/broken active links or failed censuses retain versions. These pools run only on explicit plan/apply paths.
  • Vault snapshots: keep the newest 3, delete older tarballs in ~/vault-snapshots.
  • Docker/colima: prune dangling (untagged) images + stopped containers that exited over 24 h ago, then colima fstrim. Never system prune -a, and never a container prune while any container is running (a running container means board/release work may be in flight).

Read the full file on GitHub · 140 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. yesterday First seen · 140 lines · 92 tokens per session scan A 1b04d3af009d

Subscribe to this mod's changes

disk-cleanup is a skill published in the GitHub repository mtarcure/claude-vibe-squad (211 stars, last pushed yesterday), licensed MIT. It adds 92 tokens to every session and 1,917 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-29.