← ClaudeAtlas

cleanuplisted

Remove the current session's own redundant Git worktrees and branches (merged, abandoned or never used) across a repository and its submodules while keeping work still in progress. Use when asked to clean up, tidy or prune this session's worktrees or branches; never removes other sessions' work.
sebastiansulinski/claude-plugins · ★ 0 · Code & Development · score 62
Install: claude install-skill sebastiansulinski/claude-plugins
# Clean up this session's worktrees and branches Tidy up this session's own work only: the worktrees and branches this session created through the create workflow, in the current repository and in every initialised submodule beneath it. The session decides which are redundant, because it knows which plans are finished, merged, abandoned or superseded and which are still in progress. The bundled engine supplies the facts and the safety net; it never decides what "still being worked on" means, and it can never touch anything this session did not create. Resolve the bundled [worktree runtime](../../scripts/worktree.sh) relative to this skill file, assigning its absolute path to `worktree_runtime`. Run from the repository the user is working in — the root repository when the setup uses submodules, so the recursion covers them. Read applicable repository instructions. ## Two guarantees 1. Scope is this session. The engine acts only on worktrees and branches carrying this session's provenance markers, written at creation from the session identity Codex exposes to shell commands (`CODEX_SESSION_ID`, falling back to `CODEX_THREAD_ID`; both are set on Codex 0.154.0). Other sessions' worktrees, hand-made ones and the main checkout are never candidates; the others are reported once as a count (`notConsidered`; the main checkout is never counted). Without a session identity the engine refuses to run. 2. Redundant means the session says so and Git agrees it is safe. The se