clean-branches

Identify and delete stale local and remote-tracking git branches.

1|Updated Jun 25, 2026
One-click install
npx skills add https://github.com/dyoshikawa/webseek --skill clean-branches-dyoshikawa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-branches
Source: https://github.com/dyoshikawa/webseek/tree/main/.rulesync/skills/clean-branches
Command: npx skills add https://github.com/dyoshikawa/webseek --skill clean-branches-dyoshikawa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill resolves the clutter of accumulated local and remote-tracking branches that no longer exist on the server, preventing confusion and repository bloat.

Core Features & Use Cases

  • Safe Pruning: Automatically synchronizes local remote-tracking branches with the server state using git fetch --prune.
  • Merged Branch Cleanup: Identifies and removes local branches that have already been merged into the primary development branch.
  • Use Case: After a large feature release, use this Skill to clean up dozens of stale feature branches and ensure your local environment reflects the current state of the remote repository.

Quick Start

Ask the assistant to identify and delete all local branches that have already been merged into the main branch.

Frequently Asked Questions about clean-branches

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely prune stale local and remote-tracking git branches?

To safely prune stale git branches, this Skill automates synchronizing local remote-tracking branches using git fetch --prune and identifies obsolete local branches for deletion. It requires standard git CLI access to execute branch listing, fetching, and deletion commands safely.

What's the best way to clean up merged local git branches after a feature release?

Cleaning up merged local git branches is automated by this Skill through identifying and removing branches already merged into the primary development branch. This prevents repository bloat and confusion after large feature releases.

Do I need any special tools or dependencies to automate git branch cleanup?

No special dependencies are required to automate git branch cleanup. This Skill only requires standard git CLI access to execute branch listing, fetching, and deletion commands safely within your repository maintenance workflow.

How does git fetch --prune work for removing obsolete remote-tracking branches?

Git fetch --prune works by automatically synchronizing local remote-tracking branches with the current server state, removing references to remote branches that no longer exist on the origin repository.

When should I not use automated git branch deletion in my repository?

You should avoid automated git branch deletion when working with unmerged local branches containing uncommitted work. This Skill targets branches already merged into the primary development branch and stale remote-tracking references.