consolidate-git

Community

Clean up branches and worktrees safely.

Authordbc-oduffy
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It eliminates Git branch and worktree sprawl by consolidating your in-flight work onto a single current branch, removing stale branches/worktrees owned by you while leaving other owners’ work untouched.

Core Features & Use Cases

  • Inventories local/remote branches by ownership: categorizes branches into current (target), main (merge target), your stale branches (candidate for deletion/absorption), and other people’s branches (reported only).
  • Inventories all worktrees and cleans stale state: lists worktrees, applies the same ownership/reachability logic, unlocks stale locks when safe, and removes stale worktrees (including locked ones whose branch tips are absorbed).
  • Evidence-gated absorb-or-skip for unique commits: detects whether stale branches have unique commits, inspects each unique commit with git show/--stat, then cherry-picks or merges as appropriate without default merging to main.
  • Guardrails against accidental history loss: avoids touching other owners, uses safe delete (git branch -d) semantics, and verifies absorbed shared-infra changes after conflict resolution.

Quick Start

Use the coordinator:consolidate-git skill to consolidate your owned stale branches and worktrees into the current branch without merging to main by default.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: consolidate-git
Download link: https://github.com/dbc-oduffy/coordinator-claude/archive/main.zip#consolidate-git

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.