cleanup-branches

Generate a single-approval bash script to delete Git branches.

26|2|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/sburl/CrossCheck --skill cleanup-branches
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cleanup-branches
Source: https://github.com/sburl/CrossCheck/tree/main/codex/skills/cleanup-branches
Command: npx skills add https://github.com/sburl/CrossCheck --skill cleanup-branches

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill analyzes local Git branches and generates a SINGLE bash script for you to approve and run, eliminating the need for individual permission approvals on each git branch -D command.

Core Features & Use Cases

  • Batch analyze local branches to identify candidates for deletion (merged, stale, and pattern-based).
  • Generate a single, copyable cleanup script with inline comments and safety checks.
  • Provide a concise summary of findings and a preview of the script for review before execution.

Quick Start

Run /cleanup-branches in any Git repository to generate and review the single approval script before execution.

Frequently Asked Questions about cleanup-branches

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

FAQPage Schema
How do I batch delete multiple local git branches at once?

Batch deleting local git branches is simplified by generating a single, safe bash script for you to review and approve, eliminating the need to confirm individual git branch deletion commands.

What is the best way to clean up stale and merged git branches safely?

Cleaning up stale and merged git branches safely involves analyzing local repositories to categorize branch candidates, then generating a preview script with safety checks and inline comments before execution.

Can I generate a bash script to delete git branches matching a specific pattern?

Yes, you can generate a bash script to delete git branches matching specific patterns, as the analysis identifies candidates based on merged, stale, and pattern-based categories before creating the script.

Does this git branch cleanup approach require manual approval for every deletion?

No, this git branch cleanup approach requires only a single approval. It generates one copyable bash script with safety checks, bypassing the need for individual permission approvals on each deletion command.

How do I preview which local git branches will be deleted before running the script?

To preview which local git branches will be deleted, the tool provides a concise summary of findings and a preview of the generated script for review before you execute the actual cleanup.