ai-cleanup

Migrate to the default branch and prune merged or stale Git branches.

54|3|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/arcasilesgroup/ai-engineering --skill ai-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-cleanup
Source: https://github.com/arcasilesgroup/ai-engineering/tree/main/.claude/skills/ai-cleanup
Command: npx skills add https://github.com/arcasilesgroup/ai-engineering --skill ai-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the process of cleaning up a Git repository by safely migrating to the default branch, removing obsolete branches, and providing a comprehensive report on the repository's health.

Core Features & Use Cases

  • Safe Default Branch Migration: Ensures you are on the latest default branch (main or master) without force-pulling.
  • Aggressive Branch Cleanup: Deletes merged, squash-merged, and stale remote-tracking branches.
  • Detailed Reporting: Provides a clear, per-branch summary of actions taken and reasons for keeping branches.
  • Use Case: After a sprint or a series of feature merges, run this Skill to declutter your repository, making it easier to manage and navigate.

Quick Start

Run the ai-cleanup skill to perform a full repository hygiene operation.

Frequently Asked Questions about ai-cleanup

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

FAQPage Schema
How do I clean up merged and stale Git branches in my repository?

To clean up Git branches, you can automate the deletion of merged, squash-merged, and stale remote-tracking branches while safely migrating to your default branch. This process also generates a detailed status report classifying branches by merge status.

What is the best way to declutter a local Git repository after a sprint?

Decluttering a Git repository after a sprint involves migrating to the main or master default branch without force-pulling, pruning obsolete feature branches, and reviewing a comprehensive health report to ensure repository hygiene.

How does safe default branch migration work without force-pulling?

Safe default branch migration switches your working state to the latest main or master branch without executing a force-pull. It handles existing stashes and ensures your local environment aligns with the remote before pruning branches.

Can I delete squash-merged branches without losing uncommitted work?

Yes, deleting squash-merged branches is safe because the cleanup process handles stashes and classifies branches based on remote tracking information before removal. It ensures uncommitted work is preserved during the migration and pruning workflow.

Why does Git branch cleanup keep some branches instead of deleting them?

Git branch cleanup keeps specific branches by evaluating their merge status and remote tracking information. The generated status report explicitly details the reasons for retaining each branch, ensuring safe repository hygiene management.