Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By gztesv2.3.1In 1 marketplace
Safely analyzes and cleans up local git branches and worktrees by categorizing them as merged, squash-merged, superseded, or active work.
You run one by typing its /name in Claude Code.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A Claude Code slash command for safely cleaning up accumulated git worktrees and local branches.
Analyzes your local git repository and sorts branches and worktrees into:
-d), or squash-merged or superseded with a named PR or commit as evidence (-D)[gone] remotes and any candidate a skeptic managed to refuteThe command is gated: it requires explicit user confirmation before any deletion.
Analysis runs as a dynamic workflow — a JavaScript orchestration script that coordinates subagents:
git branch --merged already answers.[gone] remotes and groups of similarly-named branches. Related branches go to one agent so supersession is visible.Typical runs are small: a repo with a dozen branches spawns about three agents, because the triage in step 2 decides most of them without spawning anything. Eleven is the ceiling, not the norm — one survey, at most five investigators, at most five skeptics — and past five batches the batches grow rather than the agent count, so the number stops rising even as the repository gets messier. Tokens still scale with the number of ambiguous branches; it is the coordination cost that is capped, not the reading.
The workflow is strictly read-only. Both confirmation gates and every git branch -d/-D and git worktree remove run in the main session, because subagents have no way to ask the user anything.
Invoke with /git-cleanup when you have accumulated many local branches and worktrees that need cleanup.
Important: the command sets disable-model-invocation: true, so Claude cannot invoke it on its own — it runs only when you type it. That flag is what closes autonomous invocation; the description in the frontmatter is matchable text and would otherwise let a cleanup-shaped request trigger a plugin whose job is git branch -D.
git branch -d) for branches git itself reports as merged; force delete (git branch -D) only for squash-merged and superseded branches, where git compares shas and cannot see that a squash carried the work acrossSAFE_TO_DELETE is the one category that skips this. It does not rest on git branch -d catching a mistake at execution time: -d accepts a branch merged into HEAD or into its own upstream, neither of which is "merged into the default branch". Instead each entry names its tip commit in its evidence, for a human to check at gate 1, and ships a verifyWith precondition — git merge-base --is-ancestor 'refs/heads/<branch>' '<default>' — which the main session runs immediately before the delete and skips the delete on failure. The precondition names the branch rather than the reported sha, so it cannot pass on a stale or transposed commit while the branch itself was never merged. The category is still pinned to -d and never -D[gone] remote is treated as a question, not an answer: the branch is investigated, and it only becomes a delete candidate once a specific PR or commit is named and that claim survives refutationBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub gztes/security-for-platforms --plugin tob-git-cleanupPlugins from other owners that cover similar ground