# bix-claude-skills: Claude Code Disk Cleanup

> Scan ~/.claude/, see what is safe to delete, and reclaim disk space with a before/after report.

bix-claude-skills: Claude Code Disk Cleanup is a free AI agent skill on Agensi by Biswajit Sahoo, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Biswajit Sahoo](https://www.agensi.io/creators/biswajit-sahoo)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Uses: 3
- Version: 1.0
- Last updated: 2026-10-13
- Security: scan passed (2026-10-13); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/bix-claude-skills-claude-code-disk-cleanup
- Tags: llm-ops, productivity, automation, bash, disk-cleanup, claude-code, cli-tool, housekeeping

## About this skill

**What it does**
- Scans `~/.claude/` and prints a size table sorted largest first, with each directory marked Yes, No (keep) or Unknown for deletion.
- Shows a Reclaimable total and a `~/.claude/` total in the table footer.
- Lets you pick which safe directories to clean, or use `-all` for one confirmation.
- Deletes only what you approve, then prints a before/after table with Total Memory Saved.

**Problems it solves**
- `~/.claude/` grows with transcripts, debug logs, file history, caches and snapshots, and it is hard to tell what is safe to remove.
- Deleting by hand risks wiping skills, agents, settings or memory.
- Removing a running session's files can break that session.

**How it works**
1. Scan: `scan.sh` measures every directory, classifies it, detects running sessions by checking each PID, and renders the table.
2. Select: the agent asks you which safe directories to delete (checklist), or asks one yes/no question with `-all`.
3. Delete: `delete.sh` removes the contents of the chosen directories. A hard blocklist and the classifier refuse anything user-owned.
4. Report: the script's own before/after table is shown as is.

All sizes, classification and deletion are done by bundled shell scripts, not by the model, so the numbers are deterministic.

**Why install it**
- Free and open source (Apache-2.0).
- Nothing is deleted without your confirmation.
- Protects skills, agents, commands, rules, memory, plugins, settings, credentials and IDE state.
- No jq or Python needed. Works on macOS, Linux, WSL and Git Bash.

**Requirements**
- Claude Code and bash.
- A `~/.claude/` directory.

## Known limitations

- Claude Code only. It reads and deletes the `~/.claude/` layout.
- Deletion is permanent. There is no trash, undo or dry-run mode.
- The classifier is a fixed list. Directories it does not know are labeled Unknown and are never deleted.
- Safe directories are emptied entirely, including `plans/`, `todos/`, `tasks/`, `backups/` and `file-history/`. Review the table first if you want anything in them.
- Running-session detection checks the PID in `sessions/*.json`. It protects transcripts and session folders in `projects/`. If you select `sessions/`, its metadata files are removed along with the rest of that folder.
- Deletion only touches directories inside `~/.claude/`. The scan also reports the size of a Claude Desktop `vm_bundles` folder, but `delete.sh` does not remove it.
- Sizes use `du`, so figures can differ slightly between macOS, Linux and Git Bash. Output is rounded to one decimal.
- Requires bash. On Windows use Git Bash, MSYS2, Cygwin or WSL.
- It will not run on its own. Manual invocation only (`/cleanup`).

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the bix-claude-skills: Claude Code Disk Cleanup skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### Which operating systems and AI agents is this skill compatible with?

The cleanup skill is designed specifically for the Claude Code CLI environment, targeting the standard `~/.claude/` directory on Unix-like systems (macOS and Linux). It is not currently compatible with Windows CMD/PowerShell unless using a layer like WSL.

### Is there a risk of losing my login credentials or active project data?

No, this skill features a strict hard-block list that protects `settings.json`, `credentials.json`, and agent memory. It also checks for active process IDs to ensure it never deletes data from a session you are currently running.

### What specific types of files does this skill remove to save space?

This skill targets stale debug traces, telemetry logs, and project caches that often bloat over time. By removing these non-essential files, you can reclaim gigabytes of space and improve the performance of your local file system.

### What is included in the purchase of the cleanup skill?

You will receive the core cleanup bash scripts, the integration logic for Claude Code, and a README guide for setup. The purchase includes lifetime access to the current version and any security patches released for this specific skill.

### Can I choose which directories to delete, or does it wipe everything automatically?

While there is an `-all` flag for quick bulk cleaning, the skill defaults to a "Scan and Review" mode. This generates a markdown report of disk usage, allowing you to see exactly which directories are safe to delete before you confirm the action.

### How do I install it?

Download the zip from Agensi and add the folder to your Claude Code skills directory. You can also install the whole set as a plugin from https://github.com/IamBiswajitSahoo/ClaudeSkills. Then type `/cleanup`.

### What does it need?

Claude Code, bash, and standard tools such as `du`, `grep`, `sed` and `awk`. No jq, Python or network access.

### Will it delete anything without asking?

No. `/cleanup` shows a checklist of safe directories and deletes only the ones you choose. `/cleanup -all` asks one yes/no confirmation first. The model cannot invoke the skill on its own.

### What will it never delete?

Skills, agents, commands, rules, memory, plugins, IDE state, scripts, output styles, settings, credentials, keybindings, `CLAUDE.md`, `MEMORY.md`, `.claude.json`, `.mcp.json` and `.worktreeinclude`. These are blocked in the script even if passed by name.

### What happens to the sessions I have open right now?

The scan finds running sessions by PID. In `projects/`, their transcripts and working folders are kept, and so are `memory/`, `CLAUDE.md` and `settings*.json`. Only stale session transcripts and folders are removed.

### Does it use many tokens?

No. The scripts do the sizing, classification, deletion and report rendering. The model only shows the output and asks the confirmation question.

### Can I preview what would be deleted?

Yes. The scan table is shown before any question, with sizes and Safe to delete labels. You can answer the checklist with no selection to stop. There is no separate dry-run mode.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
