← ClaudeAtlas

session-cleanuplisted

End-of-session audit and safe cleanup of a git repo and the machine. Finds leftovers (untracked junk, unpushed commits, stale or dirty worktrees, merged and unmerged branches, stashes, lane harness state, dev servers and background processes, temp and build artifacts, open tracker items, deploy drift), removes only what is provably stale and recoverable, and asks before anything that could lose work. Use whenever the user says "cleanup", "clean up", "does anything need to be cleaned up", "session cleanup", "tidy up", "end of session", "wrap up", "are we done here", or before writing a final session report, even if they do not name this skill. Works with or without the /lanes harness. Not for refactoring, lint fixes or dead-code removal.
thebpandey/session-cleanup · ★ 0 · Code & Development · score 72
Install: claude install-skill thebpandey/session-cleanup
# Session cleanup Audit first, delete second, and only after inspecting the target. The goal is that the owner can walk away from the session knowing nothing is running, nothing is lost, and nothing stale is left behind. A missed leftover is cheap; a deleted unpushed commit is not. When in doubt, a finding goes to **ASK**, never to **AUTO-CLEAN**. Works in any git repo. The lanes harness, beads and Vercel parts switch on only when they are present; skip them silently otherwise. ## Phase 1: Audit (read-only) Run the bundled audit from the repo (any worktree of it). Use the script for your OS; the skill folder may be under `~/.claude/skills/`, `~/.codex/skills/` or `~/.agents/skills/`: ```bash # Linux and macOS bash <skill-dir>/scripts/audit.sh # add --no-fetch offline ``` ```powershell # Windows (PowerShell 5.1 or 7) powershell -NoProfile -ExecutionPolicy Bypass -File <skill-dir>\scripts\audit.ps1 # add -NoFetch offline ``` Both print one section per area (CONTEXT, WORKING_TREE, SYNC, WORKTREES, BRANCHES, STASHES, LANES, PROCESSES, ARTIFACTS, TRACKER, DEPLOY, SESSION_LOG). Its only write is a plain `git fetch` (never `--prune`). It never reads `.env` files or prints process environments. **Machine scope** (Linux and macOS): when the owner asks about the machine or disk space, or at session end when time allows, also run `bash <skill-dir>/scripts/audit.sh --machine [--roots <dir>[:<dir>]]` (default root `~/dev`). Its MACHINE section ranks items largest