cleanup-to-main

Community

Prune stale git branches safely

Authorharyelramalho
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill removes local git branches that have already been deleted from the remote, helping you keep repositories clean without risking active work.

Core Features & Use Cases

  • Safe branch cleanup: Checks for uncommitted changes and branch sync before deleting anything.
  • Remote-aware pruning: Fetches and prunes remote references, then identifies local branches whose upstream is gone.
  • Protected workflow: Preserves local-only branches and always keeps main, master, and develop intact.
  • Detailed reporting: Summarizes deleted, skipped, and kept branches so you can review the cleanup outcome.
  • Use Case: After merging a batch of pull requests, run this Skill to safely remove stale feature branches from your machine.

Quick Start

Use the cleanup-to-main skill to safely remove local branches that were deleted from the remote after confirming your working tree is clean.

Dependency Matrix

Required Modules

None required

Components

scripts

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: cleanup-to-main
Download link: https://github.com/haryelramalho/skills/archive/main.zip#cleanup-to-main

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 537,000+ vetted skills library on demand.