Branch Hygiene

Classify Git branches into active, stale, merged, abandoned, blocked, or duplicate categories.

1|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/jimmymalhan/codereview-pilot --skill branch-hygiene
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Branch Hygiene
Source: https://github.com/jimmymalhan/codereview-pilot/tree/main/.claude/skills/branch-hygiene
Command: npx skills add https://github.com/jimmymalhan/codereview-pilot --skill branch-hygiene

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the classification and management of Git branches, identifying stale, merged, or duplicate branches to maintain a clean and organized repository.

Core Features & Use Cases

  • Branch Classification: Automatically categorizes branches as active, stale, merged, abandoned, blocked, or duplicate.
  • Automated Deletion: Deletes branches that have been merged into the main branch.
  • Cleanup Recommendations: Provides evidence-based recommendations for deleting stale branches.
  • Use Case: After a pull request is merged, this skill can automatically clean up the feature branch and report on other branches that are no longer active or needed.

Quick Start

Run the branch hygiene skill to classify all branches and recommend deletions for stale ones.

Frequently Asked Questions about Branch Hygiene

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

FAQPage Schema
How do I automate git branch cleanup and delete merged branches?

Automating git branch cleanup involves classifying branches into categories like merged or stale, then automatically deleting merged branches to maintain repository hygiene. This skill uses Git commands and GitHub CLI data to execute that repository cleanup.

What is the best way to identify and manage stale Git branches?

Identifying stale Git branches requires categorizing them by activity status, such as active, stale, or abandoned. This skill classifies branches using pull request data and provides evidence-based recommendations for managing and deleting stale ones.

Do I need GitHub CLI to classify and manage Git branches?

Yes, you need GitHub CLI to classify and manage Git branches with this skill. It requires Git commands and GitHub CLI to retrieve the branch and pull request data necessary for categorizing branches and generating cleanup recommendations.

How does branch classification handle duplicate or blocked branches?

Branch classification handles duplicate and blocked branches by sorting them into distinct categories alongside active, stale, merged, and abandoned ones. It evaluates Git and pull request data to identify these specific states for repository organization.

Can I get recommendations before deleting abandoned Git branches?

Yes, you can get recommendations before deleting abandoned Git branches. This skill provides evidence-based recommendations for deleting stale or abandoned branches, ensuring you have supporting data before removing them from your repository.