clean-system
Skill7 starsChanged 4 months agoMITView on GitHub
Procedural guide for auditing and safely reclaiming disk space on the system. Covers package manager caches (uv, pip, npm, conda, pnpm), Docker caches/images, transient agent files (.ES), and temp/backup files. Never deletes without explicit user confirmation.
- Deletes or force-pushes
In this repository14 other files it gives its agents.
- artifactSkill
- chat-cleanerSkill
- doc-styleSkill
- dumb-downSkill
- experiment-workflowSkill
- first-principlesSkill
- gitlabSkill
- harness-engSkill
- pdfSkill
- product-designSkill
- req-engineeringSkill
- training-nnSkill
- visionSkill
- word-farsi-docxSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Check the sizes of common package directories:
- Distinctive: line 30
Check active/stopped containers, unused images, and builder caches:
- Distinctive: line 43
Always present audit findings to the user before deleting anything.
- Distinctive: line 49
Explicit Consent Prompt: Ask the user:
- Distinctive: line 56
Only run clean-up commands for categories the user has explicitly approved.
- Very specific: line 70
Use targeted rm commands for approved folders:
- Very specific: line 78
After cleaning, run df -h / and du -sh ~ to verify the total space reclaimed and report the final statistics (e.g., "Reduced disk usage …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Safe System Clean-up Skill
This skill provides a structured workflow for identifying, auditing, and safely reclaiming disk space across package manager caches, Docker resources, shell backups, and temporary files.
[!IMPORTANT] Safety First: Never execute deletion or purge commands without presenting the targeted files/directories and their sizes to the user and obtaining explicit, written permission.
1. Audit Phase (Detection)
To begin a clean-up, scan the system for space-consuming targets using non-destructive commands. Categorize findings into the following groups:
A. Package Manager Caches
Check the sizes of common package directories:
- uv cache:
du -sh ~/.cache/uv - pip cache:
du -sh ~/.cache/pip - Conda package cache:
du -sh ~/miniconda3/pkgs - npm cache:
du -sh ~/.npm/_cacache - pnpm store:
du -sh ~/.local/share/pnpm/store(and check for registered projects viapnpm store status)
B. Docker Storage
Check active/stopped containers, unused images, and builder caches:
docker system dfdocker ps -a(to identify any running or stopped containers and their compose project directories)
C. Transient Agent files & Backups
- Episodic State files:
.ES/folders orES.mdlogs in repository roots. - Shell history/alias backups:
~/.bash_history-*.tmpfiles,~/.bash_aliases.bak-*backups. - Configuration backups: Sibling
.bakfiles in~/.openclawor~/.codex.
2. Review and Consent Phase (User Approval)
Always present audit findings to the user before deleting anything.
- Summarize findings: Organize the targets in a table or list detailing:
- File/Directory path.
- Total size.
- Safety level for deletion (e.g., "Highly Safe", "Safe - requires package re-download on next build", "Review needed - active project").
- Explicit Consent Prompt: Ask the user:
"I have found the following deletion candidates. Please review and confirm which ones you would like me to delete."
3. Clean-up Phase (Execution)
Only run clean-up commands for categories the user has explicitly approved.
Package Cache Purging
- uv:
uv cache clean(or delete~/.cache/uvif CLI is absent). - pip:
pip cache purge - Conda:
conda clean --all -y - npm:
npm cache clean --force - pnpm:
pnpm store prune(safely removes unreferenced packages; do not delete the store folder directly as it may break other active projects' hardlinks).
Docker Pruning
- Prune unused build cache and stopped containers:
docker system prune - Deep prune (all unused images + volumes):
docker system prune -a --volumes -f
File System Deletion
Use targeted rm commands for approved folders:
rm -rf /path/to/.ESrm -f ~/.bash_history-*.tmp
4. Verification Phase
After cleaning, run df -h / and du -sh ~ to verify the total space reclaimed and report the final statistics (e.g., "Reduced disk usage from X GB to Y GB").
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

