Free disk space safely, in one project folder or across the whole computer. Analyses everything first, proves each item is junk, then MOVES (never deletes) it into Desktop/Broom/Trash; anything uncertain goes to Desktop/Broom/Maybe trash; skill packs go to Desktop/Skills. Every move is logged and can be undone. Use when the user says "broom", "clean up", "free space", "disk is full", "folder is too big", "remove junk", and at the end of any task that downloaded, unpacked, rendered, built or g...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of broom?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/s4msky-broom)
---
name: broom
description: Free disk space safely, in one project folder or across the whole computer. Analyses everything first, proves each item is junk, then MOVES (never deletes) it into Desktop/Broom/Trash; anything uncertain goes to Desktop/Broom/Maybe trash; skill packs go to Desktop/Skills. Every move is logged and can be undone. Use when the user says "broom", "clean up", "free space", "disk is full", "folder is too big", "remove junk", and at the end of any task that downloaded, unpacked, rendered, built or generated files.
metadata:
creator: s4msky
version: 3.0
---
# Broom
Broom frees disk space without losing anything that matters. It never deletes. It moves:
- **junk it can prove is junk** goes to `Broom/Trash`;
- **things it is not sure about** go to `Broom/Maybe trash`, for the user to review;
- **skill packs** go to `Skills`.
The user empties the folders. Every move is written to a manifest and can be undone with one command.
Broom has two modes:
- **Project mode** (default): one folder. That is the current project, or any folder the user names ("broom Downloads").
- **Computer mode** ("broom the computer", "whole PC", "disk is full"): the user's profile and drives, with stricter rules. See its section below.
## Destinations
`<Desktop>` is `%USERPROFILE%\Desktop` on Windows, or the OneDrive Desktop if that is where the Desktop lives. On macOS/Linux it is `~/Desktop`.
| What | Where |
|---|---|
| Proven junk | `<Desktop>/Broom/Trash/<Scope>-<YYYY-MM-DD>/<original path>` |
| Unsure items | `<Desktop>/Broom/Maybe trash/<Scope>-<YYYY-MM-DD>/<original path>` |
| Skill packs | `<Desktop>/Skills/<Source>/` |
| Log | `MANIFEST.txt` in each dated folder |
**Original path.** Inside a dated folder, the item keeps its full original path, with the drive letter as the first folder, in both modes. For example, `C:\Users\me\Downloads\setup.exe` is stored as `<dated folder>/C/Users/me/Downloads/setup.exe`; on macOS/Linux, `/home/me/x` is stored as `<dated folder>/home/me/x`. Restoring always knows where an item came from. Use `broom_move.py` (below), which does this and writes the manifest for you.
**Scope.** `Scope` is the project folder name, or `Computer` in computer mode. Run twice on the same day and Broom appends to the same folder and manifest.
**Manifest.** Each line is tab-separated: `<original absolute path> <TAB> <size> <TAB> <category> <TAB> <evidence or doubt>`. The file ends with totals and the before/after sizes.
**Skills.** Every skill folder on the machine lives in `<Desktop>/Skills/`, and the tools reach it through links:
- `~/.claude/skills` points to `Skills/Claude`.
- `~/.codex/skills` points to `Skills/Codex`.
- `~/.agents/skills` points to `Skills/Agents`.
- A skill pack inside a project (`.claude/skills`, or `skills/` with `SKILL.md` folders) goes to `Skills/<Project>-project/`. Leave a link at the old path: `New-Item -ItemType Junction -Path <old> -Target <new>` on Windows, `ln -s <new> <old>` on macOS/Linux.
- Skip any path that is already a link.
- To remove a junction, use `cmd /c rmdir <path>`. Never use `Remove-Item -Recurse` on it: in Windows PowerShell 5.1 that can delete the target's contents.
**Different drive.** Moving across drives copies the data. If the item sits on another drive than the Desktop, check free space on the Desktop drive first. If space is short, use `<that drive>:/Broom/Trash/...` instead, and say so in the report.
## Three verdicts
Every candidate gets exactly one verdict, written down with its reason:
- **TRASH:** proven junk. You can name the evidence: regenerable with command X, exact duplicate of Y, archive 100 % unpacked, output of a finished task, cache.
- **MAYBE:** probably junk, but not proven. It goes to `Maybe trash`, and the doubt is written in the manifest. Examples:
- an old build the user might share;
- a tool not used for weeks;
- an installer in Downloads;
- a big file whose purpose is unclear;
- an iteration folder of a job that may still resume.
- **KEEP:** needed, or on the never-move list. It is not moved.
The rule is: **if it is not proven junk, it is never TRASH.** Doubt means MAYBE, unless the item is on the never-move list, where doubt means KEEP.
## Project mode
### 1. Understand the project before touching anything
Read the README and the handoff or notes docs, plus `CLAUDE.md`/`AGENTS.md`. Read the build and package files (`package.json`, `pyproject.toml`, `*.csproj`, `Cargo.toml`, `project.godot`, `*.uproject`, `ProjectSettings/`, `Makefile`, publish scripts) and `.gitignore`. In a repo, also run `git status` and `git log -1`.
Then answer four questions:
- What is the source, and what does the app load at runtime? This covers models, weights, audio and data.
- What can be regenerated, and with which command?
- What is running or paused? Look for processes, workflows, background agents and resumable jobs, and the folders they need.
- Which files are the user's originals?
### 2. Measure
```
python <broom>/scripts/broom_scan.py <project_root> [--top 40]
```
This is read-only. It reports:
- the largest folders and files;
- size by extension;
- each archive, with how many of its members already exist unpacked;
- duplicates;
- known cache and build folders.
For each big folder, look inside two levels deep, grouped by extension.
### 2b. Check what refers to each candidate (mandatory)
Before any verdict, read **every** handoff, resume, notes, changelog and TODO doc in the project, not only the newest one. Older handoffs keep their own rules: build methods, backups to compare against, unfinished work. Then run the reference check on the whole candidate list:
```
python <broom>/scripts/broom_refs.py <project_root> <plan.tsv>
```
It prints every doc, script or config line that mentions a candidate, flags lines that sound like unfinished work (resume, rollback, compare, build method, template, baseline, TODO, "not done" and similar), and lists files *inside* a candidate folder that docs link to.
Act on what it finds:
- **Mentioned as part of a method or unfinished work:** KEEP. Examples:
- "build = template exe in `Build/`";
- "originals are in `.g42-backup`, compare with them";
- "work folder for the faces task".
- **Docs link to a file inside a folder:** that file stays. Move only the unlinked rest, or keep the folder whole.
- **Mentioned only as history** ("screenshots of G30"): this is not proof either way. Decide on the other evidence, and lean to MAYBE.
- **Used by a paused or running job** (workflow scripts, agent prompts, resume notes): KEEP.
- **Lock folders and lock files** (`*.lock`, `*.pid`): KEEP while any related process might run. A lock left by a killed run is MAYBE, with that reason.
A rebuild counts as possible only if it works **in this environment**. If the build needs an export template, SDK or tool that exists only inside the folder you want to move (for example, a release template exe kept in `Build/`), that folder is KEEP.
### 3. Classify
| Category | TRASH when | otherwise |
|---|---|---|
| Archives (`.zip .7z .rar .tar.* .unitypackage`) | 100 % of members exist unpacked with the same name and size (the scanner shows `n/n FULLY UNPACKED`) | Partial match, or converted files (wav to ogg): MAYBE if the unpacked content is in use, KEEP if it is the only copy of the user's original |
| Build output (`Build/ dist/ out/ bin/ obj/ target/ .next/ build/`, exported `.exe .pck .apk`, packaged zips) | A build or publish command recreates it from the current source, or a newer build exists | MAYBE (the user may share it) |
| Caches (`__pycache__ .pytest_cache .mypy_cache .ruff_cache .cache .parcel-cache .turbo .gradle`, test-profile shader caches `*.cache shader_cache/ vulkan/`, `*.blend1`) | Always | n/a |
| Heavy engine caches (Unity `Library/`, Unreal `DerivedDataCache/ Intermediate/ Saved/`, Godot `.godot/`) | Never automatically | MAYBE only if the project is inactive; else KEEP. Rebuilding means a long reimport. |
| Dependencies (`node_modules .venv venv env .tox vendor`) | The project is inactive and a lockfile or requirements file recreates them | Active project: KEEP. Tool folder no longer used: MAYBE. |
| Test, QA and render output (screenshots, frames, logs, videos, probe runs) | From finished tasks, judged by date plus docs | Latest iteration of a paused job: KEEP; unclear: MAYBE |
| Iteration leftovers (`build1..N run1..N v1.. out* probe* *_old *.bak *~`) | Older than the newest one, and the job is finished | Job paused: KEEP |
| Backups (`*-backup/ .gNN-backup/ copy of *`) | Git history or a newer copy holds the same content (checked with `git log` or a diff of samples) | MAYBE |
| Duplicates (same name and size) | The copy that nothing references (search for its path or name) | MAYBE |
| Reference material (cloned repos, samples, tutorials) | Notes exist and no pending task uses it | Keep only the files a pending task still ports; the rest is MAYBE |
| OS junk and dumps (`*.stackdump *.dmp core.* Thumbs.db .DS_Store`) | Always (except `desktop.ini` on the Desktop itself) | n/a |
| Stray copies at the root | The real copy exists and is current (diff) | MAYBE |
| Anything you cannot explain after investigating | never | MAYBE |
### Never move (KEEP, even when in doubt)
- Source code and project files:
- scenes, project and solution files;
- `.git/`, lockfiles, CI config;
- `.env` and secrets.
- What the runtime loads:
- assets under the source tree;
- model weights the app reads (`.gguf .onnx .safetensors`);
- data files, and the configs that point to them.
- The user's originals that are not fully duplicated: bought or sent asset packs, raw recordings, design files, licenses and readmes of assets.
- Docs and records:
- README, handoff, resume, design and lore notes;
- credits, LICENSE files, tests.
- Lock and state files that scripts use, and tool or agent config (`.claude/ .vscode/`, launch configs).
- Anything a running or paused job needs to resume.
Before moving anything that docs or code might reference, search the project for its path or name. If there is a hit, the item is KEEP, or it moves with a link left at the old path.
### When you do not understand something
Investigate first:
- read the files inside it (readmes, script headers);
- search the code and docs for its name;
- run `git log -- <path>`;
- compare its dates with the project's timeline.
If the item is still unclear, it is MAYBE, never TRASH. In a fully unfamiliar project with no docs and no build files, TRASH only the universal junk: OS junk, dumps, `__pycache__`-type caches, and fully unpacked archives. Everything else large is MAYBE.
## Computer mode
Use computer mode only when the user asks for it. The procedure is the same, with stricter limits.
### 1. Survey (read-only)
```
python <broom>/scripts/broom_scan.py --computer [--top 40]
```
It reports:
- free and used space per drive;
- the largest folders in the user profile and in each non-system drive's root;
- files of 1 GB or more anywhere in the user profile;
- known cache locations with their sizes;
- installers and archives in Downloads, with their age;
- duplicate large files.
### 2. Where computer mode may act
- **User data folders:** Downloads, Desktop, Documents, Videos, Pictures, Music, and project folders on other drives.
- **Known regenerable cache locations:**
- `%TEMP%`;
- `%LOCALAPPDATA%\CrashDumps`;
- `%LOCALAPPDATA%\npm-cache`, `%LOCALAPPDATA%\pip\Cache`, `%LOCALAPPDATA%\Yarn\Cache`, `%LOCALAPPDATA%\pnpm\store`;
- `%USERPROFILE%\.nuget\packages`, `%USERPROFILE%\.gradle\caches`, `%USERPROFILE%\.cache` (huggingface, torch, uv), `%LOCALAPPDATA%\uv\cache`;
- browser and Electron app `Cache`, `Code Cache` and `GPUCache` folders;
- Godot, Unity and Blender editor caches.
- For each project folder found, use project-mode rules. If the project is not understood, only universal junk is TRASH; the rest is MAYBE.
### 3. Never touch in computer mode
These are not moved at all, not even into Maybe trash:
- `C:\Windows`, `Program Files*`, `ProgramData`, `$Recycle.Bin`, `System Volume Information`, `pagefile.sys`, `hiberfil.sys`, `swapfile.sys`;
- `/System /Library /usr /bin /etc` on macOS/Linux;
- installed apps;
- `AppData` and `~/Library` contents other than the cache folders listed above. Saves, settings, profiles, mail, chat histories and password stores are user data;
- browser profiles except their cache subfolders;
- the `.claude`, `.codex` and `.agents` folders except their skills, which move to Desktop/Skills as links;
- sync folders while syncing: OneDrive, Dropbox, Google Drive. Moving out of them deletes the files in the cloud;
- other users' profiles;
- anything locked or in use (skip it and list it);
- the Desktop/Broom and Desktop/Skills folders themselves.
For Windows' own space (Windows Update leftovers, old Windows installs, the Recycle Bin), do not move anything. Tell the user to run **Disk Cleanup**, then **Clean up system files**, or Settings > System > Storage > Temporary files.
### 4. Computer-mode verdicts
- **TRASH:**
- the cache locations above;
- `%TEMP%` items older than 1 day that are not locked;
- crash dumps;
- fully unpacked archives in Downloads, when the unpacked folder sits next to them or is found elsewhere;
- exact duplicates (same name, size and hash) in Downloads or Desktop, keeping the oldest or the referenced copy.
- **MAYBE:**
- installers (`.exe .msi .dmg .pkg`) in Downloads older than 14 days;
- big videos and ISOs older than 90 days that nothing references;
- old builds;
- unused tool environments;
- anything large whose purpose is unclear.
- **KEEP:** everything else.
## Move safely
1. Stop or finish your own background jobs. Never kill the user's processes: game, editor, browser, DCC app. Skip items they hold open.
2. Check free space on the target drive.
3. Move with `broom_move.py`. It keeps the full original path, appends each item to the manifest the moment it moves, skips locked items and reports them, and refuses paths on the never-touch list:
```
python <broom>/scripts/broom_move.py <trash|maybe> <Scope> <plan.tsv>
```
`plan.tsv` has one line per item: `<absolute path> <TAB> <category> <TAB> <evidence or doubt>`. Write the plan file in a temporary folder.
4. Never use `Remove-Item`, `rm`, `del` or `git clean`, and never empty any trash or recycle bin.
5. Read the move output. Items it lists as locked or refused were not moved; list them in the report.
6. Re-measure.
## Undo
```
python <broom>/scripts/broom_restore.py "<Desktop>/Broom/Trash/<Scope>-<date>" [path ...]
python <broom>/scripts/broom_restore.py "<Desktop>/Broom/Maybe trash/<Scope>-<date>" [path ...]
```
Without paths, everything in that manifest goes back to its original absolute path. With paths, only the matching items go back (paths may be absolute originals or substrings). It never overwrites an existing file. After a cleanup of a project that can be run, run its quick check (build, type-check or smoke test). If a moved item broke it, restore that item.
## Report
Keep the report short and in the user's language:
- the size before and after, and the space freed;
- **Trash:** what moved, by category with sizes;
- **Maybe trash:** a table of path, size, what it looks like, and why you were unsure, so the user can review it and empty or restore;
- **Kept** on purpose, with the reasons;
- where the folders and manifests are;
- that nothing was deleted, and the one restore command.
## Habit: clean up after every task
At the end of any task, without being asked, run a small project-mode pass on what that task produced:
- scratch files;
- render, test and probe output no longer needed;
- archives you unpacked whose content is now in use;
- unused downloads;
- tool caches your runs created.
Append to today's folders. Mention it in one line in the report.