/odin-git:git-cleanupfrom ODIN Git
Cleans up local git branches and worktrees by categorizing them as merged, unmerged, or unanalyzed, then presenting exact deletion commands for user confirmation.
Ships in ODIN 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.
| Field | Bound contract |
|---|---|
| Trigger | The user explicitly invokes branch/worktree cleanup for a repository with accumulated local branches or worktrees. |
| Authority | Reversible local: writes only VCS-tracked local branches and clean worktrees; rollback is git reflog and remote refs. No remote mutation. Show the exact set before any deletion. |
| Side effect | Delete confirmed local git branches and clean worktrees only; dirty worktrees and protected branches are refused. |
| Done | Every local branch is categorized or surfaced as unanalyzed, every recommended deletion has evidence, exact quoted commands receive final confirmation, and each command is reported as deleted or failed. |
A local git repository path (defaults to the current working directory). No remote credentials, no force-push targets, no protected-branch list beyond the repository's own configuration. The user supplies final confirmation for each deletion command; nothing is deleted without it.
git branch -vv and git worktree list to enumerate every local branch and worktree. Record the current branch and the default upstream branch as protected; never propose their deletion. Done when: every local branch and worktree is enumerated and the current branch plus default upstream are marked protected.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. Done when: each branch carries one of merged, unmerged-with-evidence, or unanalyzed with its evidence.git -C <path> status --porcelain to classify it as clean or dirty. Mark dirty worktrees as refused for deletion. Done when: every worktree is classified clean or dirty.git log output proving no unique commits, or the worktree's clean status. Branches categorized unanalyzed are surfaced with their reason and never recommended for deletion. Done when: each recommended deletion has its evidence attached and no unanalyzed branch is recommended.git branch -d <name> or git worktree remove <path>). Do not execute any command yet. Done when: the categorized list and every recommended deletion's exact quoted command are shown, with nothing executed.deleted) or failed, capturing the exact git error message. Done when: each confirmed command ran and is recorded deleted or failed with its git error message.Dirty worktree: refuse deletion, report the uncommitted changes, and stop. The user must commit, stash, or discard changes before retrying.Protected branch: refuse deletion, name the branch, and stop. Protected branches are the current branch, the default upstream, and any branch the repository marks protected.Unanalyzed branch: surface the branch with its reason (missing upstream, ambiguous merge comparison) and never delete it. Deletion requires the user to resolve the ambiguity and re-invoke.Command failure: record the exact git error, leave all other confirmed commands pending, and report the failure. Do not retry automatically or widen scope.Missing confirmation: stop before execution. No deletion occurs. Partial results are the categorized analysis only; no branch or worktree is removed without per-command confirmation.git reflog and git branch <name> <sha> for branches, or re-adding a worktree with git worktree add; state this 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 remain listed as not deleted.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
40 skills in this plugin
/agent-transcriptUse when a redacted, trimmed agent transcript must be appended to a GitHub PR or issue body, with human approval and preview. Not for automated or model-initiated insertion./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./can-i-helpUse when the user asks "where to help", "contribution opportunities", or "find a good first issue". Returns data-backed first steps. Not for PR review queues: use gh-review-requests.npx claudepluginhub outlinedriven/odin-claude-plugin --plugin odin-gitOther plugins' skills for the same job