takazudo/claude-resources · Archived

git-prune-branches-local

>- Clean up local git branches that have been merged into main/master. Use when: (1) User says 'prune local branches' or 'clean local branches', (2) User wants to delete only local merged branches without touching remote.

First seen Jun 25, 2026

Installation

$ npx skills add takazudo/claude-resources --skill git-prune-branches-local

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from takazudo/claude-resources · top by installs.

npx skills add takazudo/claude-resources

Browse all from takazudo/claude-resources

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 11
License MIT
Default branch main
Open issues 0
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,142 B
  • docs SUMMARY.md 250 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Git Prune Branches (Local)

Check and prune local branches that have been merged:

  1. Get the list of all local branches using git branch
  2. For each branch, check if it has been merged into the main branch using git branch --merged
  3. Exclude protected branches (main, master, develop, etc.)
  4. Create a list of branches that are safe to delete
  5. Present the deletion list to the user clearly
  6. Ask for confirmation: "The following local branches will be deleted. Proceed? (yes/no)"
  7. If user confirms with "yes" or similar affirmative response, delete the branches using git branch -d <branch-name> for each branch
  8. Report the results

Important: Never delete:

  • The currently checked out branch
  • Protected branches: main, master, develop, development, staging, production
  • Branches that are not fully merged (unless explicitly requested)