/dstack-git:git-cleanupfrom DStack Git
Enumerates local git branches and worktrees, categorizes them by merge evidence, and deletes only what the user confirms command-by-command. All writes are local-only.
Ships in DStack Git. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill inventories every local branch and worktree, sorts them by merge evidence, and deletes only what the human confirms command by command. All writes stay local: confirmed branch and clean-worktree deletions only. Rollback is git reflog and remote refs. Remote state is never mutated, and force-push operations are out of scope.
The run is complete when every branch is categorized or surfaced as unanalyzed, every recommended deletion carries its evidence, each exact quoted command has final confirmation, and each command is reported as deleted or failed.
Run git branch -vv and git worktree list to list every local branch and worktree. Record the current branch, the default upstream branch, and every branch the repository own configuration marks protected. Those stay excluded from deletion from the start.
For each branch, determine merge status against its upstream and against the current branch: run git branch --merged and git branch --no-merged, then git log <branch> --not <upstream> --oneline to surface unmerged commits. Categorize each branch as merged, unmerged-with-evidence, or unanalyzed when the upstream is missing or the comparison is ambiguous.
For each worktree, run git -C <path> status --porcelain and classify it clean or dirty. Dirty worktrees are refused for deletion.
Attach the evidence to every recommended deletion: the merge commit SHA, the empty git log output proving no unique commits, or the worktree clean status. Branches categorized unanalyzed get surfaced with their reason and are never recommended.
Present the full categorized list first. For each recommended deletion show the exact quoted command the user must confirm (for example git branch -d <name> or git worktree remove <path>). Nothing executes at this stage.
Wait for explicit human confirmation of each exact quoted command. Confirmation is never batched, abbreviated, or inferred. Then execute only the confirmed commands, one at a time in the confirmed order. After each command record success (deleted) or failure with the exact git error message.
git reflog and git branch <name> <sha> for branches, or re-adding a worktree with git worktree add. State that recovery path when reporting any deletion.A categorized report of every local branch (merged, unmerged-with-evidence, unanalyzed, or protected) and every worktree (clean, dirty, or protected), each recommended deletion with its evidence and exact quoted command, the set of confirmed commands, and a per-command result of deleted or failed with the git error message. Branches or worktrees never confirmed stay listed as not deleted.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub gosuda/dstack-skills --plugin dstack-git15 skills in this plugin
/atomic-issues-prsUse when the user says "atomic PRs" or requests one issue or PR per logical change. Don't use for single-change pushes or uncommitted change-sets./commit-push-currentUse when a human explicitly asks to commit and push to the checked-out branch with no branch creation and no pull request. Not for the default branch: use commit-push-main; not for a pull request: use commit-push-pr./commit-push-mainUse when a human explicitly asks to commit and push directly to the default branch, with no feature branch and no pull request. Not for another checked-out branch: use commit-push-current.Other plugins' skills for the same job