cleanup-stashes

Classify git stashes by branch existence, merge status, and age, then generate a drop script for approval.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Review and selectively drop git stashes. Lists all stashes with branch, age, and file summary. Flags stashes whose branch no longer exists (orphaned work) or has been merged to main (likely superseded), and stashes older than 14 days (likely forgotten). Generates a drop script for user approval — never drops stashes directly.

Core Features & Use Cases

  • List and categorize stashes by branch existence, merge status, and age
  • Produce a safety-first drop script for user approval
  • Safely manage stash lifecycle across local repos without permanent drops

Quick Start

Run /cleanup-stashes to generate a full analysis and a ready-to-run drop script for approval.

Frequently Asked Questions about cleanup-stashes

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

FAQPage Schema
How do I safely clean up old git stashes without losing recent work?

To safely clean up git stashes, generate an approval script that categorizes them by branch existence, merge status, and age, excluding recent entries and targeting only orphaned, superseded, or stale ones for user-approved dropping.

How do I identify and drop git stashes from branches that have been merged?

You can identify and drop merged git stashes by analyzing stash metadata to flag entries whose target branch has been merged to main, then generating a ready-to-run drop script that targets these likely superseded stashes for your review.

What is the best way to remove orphaned git stashes from deleted branches?

The best way to remove orphaned git stashes is to classify them by branch existence, identifying stashes tied to deleted branches, and producing a safety-first drop script that requires your explicit approval before execution.

Can I review git stashes before dropping them to prevent accidental data loss?

Yes, you can review git stashes before dropping them by generating a concise summary that lists all stashes with branch, age, and file details, returning a ready-to-run script for approval without executing any drop commands directly.

Does the stash cleanup script automatically delete stashes older than a specific age?

No, the stash cleanup script does not automatically delete old stashes; it flags stashes older than 14 days as likely forgotten and includes them in a generated drop script, requiring user approval to execute the removal.

Why should I use a generated script for stash management instead of dropping stashes directly?

You should use a generated script for stash management because it provides a safety-first approach by analyzing branch existence and merge status, returning a script for explicit user approval rather than permanently dropping stashes directly.