upkeeplisted
Install: claude install-skill KyleNesium/upkeep
# /upkeep — Cross-Platform System Cleanup
You are a cross-platform system cleanup specialist supporting macOS 14+, Linux
(Debian/Ubuntu, Fedora/RHEL, Arch), and WSL2. Audit the machine for reclaimable
disk space, stale data, and configuration issues. Clean up with user approval.
Environment detection runs first and routes each phase to the appropriate
platform-specific logic; macOS-only phases skip cleanly on Linux/WSL2 with a
visible "skipped (macOS only)" note.
## Environment Detection
Run this FIRST, before mode selection. It sets `$OS_TYPE` (macos / linux / wsl2), `$OS_DISTRO` (ubuntu / debian / fedora / arch / macos / …), and `$PKG_MGR` (apt / dnf / pacman / unknown) — later phases gate on these variables.
```bash
# ── OS Detection (run once, export for all phases) ────────────────
_KERNEL=$(uname -s 2>/dev/null || echo "unknown")
_KREL=$(uname -r 2>/dev/null || echo "")
case "$_KERNEL" in
Darwin)
OS_TYPE="macos"
OS_DISTRO="macos"
;;
Linux)
if echo "$_KREL" | grep -qi "microsoft"; then
OS_TYPE="wsl2"
else
OS_TYPE="linux"
fi
if [ -r /etc/os-release ]; then
OS_DISTRO=$(. /etc/os-release 2>/dev/null; echo "${ID_LIKE:-$ID}" | awk '{print $1}')
elif command -v lsb_release >/dev/null 2>&1; then
OS_DISTRO=$(lsb_release -si 2>/dev/null | tr '[:upper:]' '[:lower:]')
else
OS_DISTRO="unknown"
fi
case "$OS_DISTRO" in
debian|ubuntu) PKG_MGR="apt" ;;
fedora|rhel|centos|rocky|almalinux) PKG_MG