cleanup-manager

Identify and delete stale branches with protected-branch safety checks.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/fractary/claude-plugins --skill cleanup-manager
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cleanup-manager
Source: https://github.com/fractary/claude-plugins/tree/main/plugins/repo/skills/cleanup-manager
Command: npx skills add https://github.com/fractary/claude-plugins --skill cleanup-manager

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, git, bash, and includes scripts (resource) components.

What problem does it solve?

This Skill identifies stale branches (merged or inactive) and safely deletes them, with dry-run mode and protected-branch checks.

Core Features & Use Cases

  • List stale branches with safety checks
  • Delete both locally and remotely with a force option
  • Dry-run mode for risk-free planning

Quick Start

List stale branches, then delete safe candidates with optional --force.

Frequently Asked Questions about cleanup-manager

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

FAQPage Schema
How do I safely delete stale Git branches without losing work?▼

Stale branch cleanup identifies merged or inactive branches and deletes them with safety checks for protected branches and dry-run mode. Use dry-run first to preview deletions, then confirm with explicit approval before removing branches locally or remotely.

Can I delete Git branches both locally and remotely at the same time?▼

Yes, cleanup-manager deletes stale branches across both local and remote locations in a single operation. Configure protection rules for branches you want to keep, then apply deletions uniformly across your repository with optional force mode.

What's the safest way to remove inactive branches from a Git repository?▼

Use dry-run mode to list inactive branches without deletion, review the candidates, then execute with explicit confirmation. Protected-branch filters prevent accidental removal of critical branches, and structured reports show all deletion actions for audit trail.

How do I prevent important branches from being deleted during cleanup?▼

Configure protected-branch rules in your setup to exclude branches you want to preserve. The Skill enforces these constraints before deletion, ensuring that main, develop, or release branches remain untouched regardless of their merge or activity status.

Can cleanup-manager handle both merged and inactive branches?▼

Yes, cleanup-manager identifies both merged branches—already integrated into main—and inactive branches based on age. Apply merge and inactivity rules independently to target the exact stale-branch types your workflow needs to remove.

Does branch cleanup work with different Git platforms?▼

Cleanup-manager uses platform-specific handler delegation to support different Git systems. Core logic applies merged and inactivity filters universally, with platform handlers managing the actual deletion operations across your environment.