π¦ ClawHub
Workspace Cleaner
by @brandonwise
Automates safe cleanup of OpenClaw workspaces by previewing and moving temp files, logs, duplicates, and cruft to the system trash with customizable filtering.
π‘ Examples
Regular Maintenance
# Weekly cleanup of obvious cruft
python3 {{SKILL_DIR}}/scripts/cleanup.py --min-age 7 --execute
Find Space Hogs
# What's taking up space?
python3 {{SKILL_DIR}}/scripts/cleanup.py --min-size 50 --json | jq '.items | sort_by(.size_mb) | reverse'
Pre-Commit Cleanup
# Clean before committing
python3 {{SKILL_DIR}}/scripts/cleanup.py --execute && git status
βοΈ Configuration
Edit {{SKILL_DIR}}/config/patterns.json to customize:
{
"temp_extensions": [".tmp", ".bak", ".log", ".skill"],
"temp_patterns": ["*~", "#*#"],
"image_extensions": [".png", ".jpg", ".jpeg", ".gif"],
"protected_dirs": ["memory", "skills", "projects", ".git"],
"protected_files": ["MEMORY.md", "SOUL.md", "USER.md", "AGENTS.md"],
"known_venvs": [".venv-skill-scanner"]
}
TERMINAL
clawhub install workspace-cleaner