# Disk cleanup

> Disk cleanup is an open-source agent skill for developer tools. Measures Mac disk usage and reclaims regenerable space in safe tiers. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/mtarcure/claude-vibe-squad/tree/main/.claude/skills/disk-cleanup
- **Repository:** https://github.com/mtarcure/claude-vibe-squad
- **GitHub stars:** 227
- **License:** MIT
- **Skill name:** disk-cleanup
- **Collection:** https://github.com/mtarcure/claude-vibe-squad
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill helps an agent find where disk space went on a Mac and free it without touching sensitive or in-progress data. A single script runs a survey of reclaimable pools such as stale worktrees, temp directories, old tool versions, vault snapshots and Docker leftovers, and prints a sized plan. It is dry-run by default, so nothing is deleted until an apply flag is passed.

Cleanup is split into tiers. The first tier removes only settled or regenerable material, such as idle sandboxes, old caches and surplus tool releases, after process and file-handle checks confirm nothing is using them. The second tier removes regenerable subtrees from rescued worker artifacts while keeping the rescue documents. A third tier is reserved for the operator and is never automated. Deletion is preserve-first, and a failed idle or ownership check keeps the whole tree.

The skill expects a macOS machine with the repository's bin and scripts folders present, plus a private host configuration file for protected patterns and PostgreSQL test settings. Its guards skip keys, keychains, staged OS updates and the tmux socket directory.

## When your agent uses it

> Use when the Mac is low on disk or before a build/release/large-media job, to find where space went and reclaim it safely in tiers. Triggers on "disk is full", "free up space", "out of disk", low-free-space warnings, or at session start before heavy work. Measures first, then deletes only regenerable/settled pools; never touches keys, staged OS updates, or in-flight work.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/mtarcure/claude-vibe-squad/tree/HEAD/.claude/skills/disk-cleanup)
- [License: MIT](https://github.com/mtarcure/claude-vibe-squad/tree/HEAD/.claude/skills/disk-cleanup)

## Features

- **Measure before deleting:** A plan mode reports container free space, staged updates, temp hogs, snapshots and Docker usage without removing anything.
- **Tiered reclaim:** Cleanup runs in separate tiers, with automatic safe removals first and preserve-then-delete steps second.
- **Idle and reference checks:** Removals are gated on process and open-file checks so in-use worktrees, versions and binaries are kept.
- **Protected file guards:** Keys, keychains, staged OS updates and sensitive configuration are skipped by name or location.
- **Docker and snapshot pruning:** Dangling images, long-stopped containers and older vault snapshots are pruned while recent items are kept.
- **Periodic disk checks:** A read-only check runs inside the doctor script and a nightly job, with a tmux gauge for low free space.

## Good for

- Free up space on a nearly full Mac before a build or release
- Find which folders and caches are taking the most disk space
- Remove old board worktrees and temp sandboxes safely
- Clear out old Docker images and stopped containers
- Delete surplus Codex or Claude tool versions while keeping the active one

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/disk-cleanup` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/disk-cleanup &&
cp -R "$tmp/.claude/skills/disk-cleanup" ~/.claude/skills/disk-cleanup &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/disk-cleanup` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/disk-cleanup` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/disk-cleanup &&
cp -R "$tmp/.claude/skills/disk-cleanup" ~/.agents/skills/disk-cleanup &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/disk-cleanup` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/disk-cleanup` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/disk-cleanup &&
cp -R "$tmp/.claude/skills/disk-cleanup" ~/.cursor/skills/disk-cleanup &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/disk-cleanup` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/mtarcure/claude-vibe-squad.git --path .claude/skills/disk-cleanup
```

Or copy the folder to `~/.gemini/skills/disk-cleanup` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/disk-cleanup`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/disk-cleanup &&
cp -R "$tmp/.claude/skills/disk-cleanup" ~/.copilot/skills/disk-cleanup &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/disk-cleanup` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git
```

Then copy `claude-vibe-squad/.claude/skills/disk-cleanup` into your agent's skills folder as `disk-cleanup`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Disk cleanup trigger?

It triggers when the Mac is low on disk or before a build, release or large-media job, on phrases such as "disk is full" or "free up space", and at session start before heavy work.

### Does Disk cleanup delete anything by default?

No. The survey mode deletes nothing, and deletion only happens when an apply flag is passed.

### What does Disk cleanup never touch?

It never deletes wallet keys, keychain databases, staged OS updates, in-flight attempts or the tmux socket directory, and the rescue documents are retained.

### What does Disk cleanup need to run?

It needs the repository's bin and scripts folders, a private host configuration file for protected patterns and PostgreSQL settings, and a macOS environment with tools such as diskutil, lsof and docker.

### How do I install Disk cleanup in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/disk-cleanup to use it in all your projects, or to .claude/skills/disk-cleanup in one project.

### Does Disk cleanup run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Disk cleanup?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Disk cleanup?

The closest alternatives to Disk cleanup are Dead code cleanup edho ferdian, Config hygiene edho ferdian, Maintenance, GitHub codespaces efficiency and Performance.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Dead code cleanup edho ferdian](https://ai-powered.com/skills/dead-code-cleanup-edho-ferdian): Dead code cleanup edho ferdian is an open-source agent skill for developer tools.
- [Config hygiene edho ferdian](https://ai-powered.com/skills/config-hygiene-edho-ferdian): Config hygiene edho ferdian is an open-source agent skill for developer tools.
- [Maintenance](https://ai-powered.com/skills/maintenance-chachamaru127-2): Maintenance is an open-source agent skill for developer tools.
- [GitHub codespaces efficiency](https://ai-powered.com/skills/github-codespaces-efficiency): GitHub codespaces efficiency is an open-source agent skill for developer tools.
- [Performance](https://ai-powered.com/skills/performance-daveebbelaar): Performance is an open-source agent skill for developer tools.
- [Jetson memory audit](https://ai-powered.com/skills/jetson-memory-audit): Jetson memory audit is an open-source agent skill for knowledge and memory.
- [Config gc](https://ai-powered.com/skills/config-gc): Config gc is an open-source agent skill for developer tools.
- [Code reachability audit](https://ai-powered.com/skills/code-reachability-audit): Code reachability audit is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/disk-cleanup
