Individual skill

cleanup

Reclaim disk space and prune branches left behind by AI coding agents - merged or abandoned git worktrees, merged branches, stale build artifacts (node_modules, .venv, target), old archives and backups, package caches, and old agent session logs. Use when the user runs /cleanup, says the disk is full, or asks to clean up worktrees, branches, or storage.

plugins/all-skills/skills/cleanup/SKILL.md

Read pinned source

Source commit 82ce2112b080810c6b72939201d6a53876116e12

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
Yes
Repository scan complete
No
Skill scan complete
No
Observed behavior
Network or broad shell
Last checked
Nov 4, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
3,728
Repository last updated
Nov 5, 2026
License
MIT

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# Cleanup

Free disk space and prune branches with one scan, one confirmation, and one apply. Every deletion goes through `scripts/agent_cleanup.py` in this skill's directory. Right before acting, it re-checks each git item, artifact folder, archive and the trash, and skips anything that changed since the scan.

## 1. Scope

Choose what to scan:

- **This repo** (default): run from inside it with no `--root`. The scan covers this repo, the agent worktree folders (Codex, Cursor, Conductor, Vibe Kanban), package caches, agent logs and the trash.
- **Whole machine**: the user says disk full, all projects, or everything. Add `--root <dir>` for each folder that holds their projects. Look for the usual ones (`~/code`, `~/dev`, `~/src`, `~/projects`, `~/repos`, `~/Developer`, `~/Documents/*`). If none of them exist, ask the user.

Narrow with `--only git,artifacts,archives,caches,agents,trash` when the user asks for one kind, e.g. "just branches" → `--only git`. Add `--remote` only when the user wants merged branches deleted on `origin` too.

Done when the scan command is chosen.