imtiazrayhan

Clean Branches — Git skill for Claude Code

Git community

Safely prune merged and stale Git branches: drop dead remote-tracking refs, list merged candidates for review, then delete with the safe -d variant.

How to install Clean Branches

Installs to ~/.claude/skills/imtiazrayhan-agentscamp-library-clean-branches/SKILL.md

Terminal
mkdir -p ~/.claude/skills/imtiazrayhan-agentscamp-library-clean-branches && curl -fsSL https://raw.githubusercontent.com/imtiazrayhan/agentscamp-library/HEAD/commands/clean-branches.md -o ~/.claude/skills/imtiazrayhan-agentscamp-library-clean-branches/SKILL.md

Restart Claude Code, or start a new session, for it to be picked up.

What Clean Branches does


description: "Safely prune merged and stale Git branches: drop dead remote-tracking refs, list merged candidates for review, then delete with the safe -d variant." allowed-tools: "Bash, Read"

This command takes no arguments. It prunes branches that are demonstrably safe to remove and hands everything else back for a human decision. The default posture is to delete nothing you cannot prove is merged.

Scope

Ignore `$ARGUMENTS` — this command takes no input. Operate on the current rep

Alternatives in Git

  • Clean Worktrees (Automatic) — Automatically remove all worktrees for branches merged into master 25.5k ★
  • Container Use — by dagger - Development environments for coding agents 3.6k ★
  • CCometixLine — A high-performance Claude Code statusline tool written in Rust with Git integration and real-time usage tracki 2.4k ★

Full documentation available on GitHub

View Source Repository