cleanup-all

Automates git cleanup across hopsack, executing phases for worktrees, branches, and stashes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Run all git cleanup operations in sequence: worktrees, branches, and stashes. Use before or after repo assessment, at the end of a sprint, or whenever local git state has accumulated clutter. Chains /cleanup-worktrees, /cleanup-branches, and /cleanup-stashes with a combined summary at the end.

Core Features & Use Cases

Full Git Cleanup; Chains all three cleanup skills in sequence. Each skill does its own analysis, generates its own approval script, and reports its own results. This skill orchestrates the sequence and prints a combined summary at the end. Phase 1: Worktrees - reviews git worktrees. Removes those whose PR is merged and branch is deleted on remote. Flags stale worktrees (no commits in 7+ days) for review. Requires confirmation. Phase 2: Branches - Analyzes local branches. Categorizes as: merged to main (safe), stale (no remote, >14 days), or pattern-based (temp-, wip-, test-*). Generates a single bash script for approval - never runs git branch -D directly. Phase 3: Stashes - Reviews all stashes. Flags orphaned (branch gone), superseded (branch merged), and stale (>14 days). Generates a drop script in descending index order for approval. Recent stashes are always kept.

Quick Start

Run /cleanup-all to execute the full cleanup sequence, or /cleanup-all --dry-run to analyze across all three phases without generating scripts.

Frequently Asked Questions about cleanup-all

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

FAQPage Schema
How do I automate git cleanup for branches, stashes, and worktrees in one sequence?

You can orchestrate a full git cleanup by running a single command that sequences worktree, branch, and stash removal phases. Each phase analyzes local repository clutter and generates an approval script to ensure safe operations before deleting anything.

What is the safest way to remove stale local git branches after a sprint?

The safest way to remove stale git branches is to use a cleanup workflow that categorizes them as merged, stale, or pattern-based, then generates a bash script for your review. This prevents accidental data loss by requiring manual approval before executing branch deletions.

Can I run a dry-run git cleanup to analyze stale worktrees and stashes without deleting them?

Yes, you can run a dry-run git cleanup to analyze repository clutter across all three phases without generating deletion scripts. This allows you to review stale worktrees, unmerged branches, and orphaned stashes safely before approving any actual removals.

How does a git stash cleanup workflow identify which stashes to drop?

A git stash cleanup workflow identifies stashes to drop by flagging them as orphaned if the branch is gone, superseded if the branch was merged, or stale if older than 14 days. It generates a drop script in descending index order while always keeping recent stashes.

What is the best way to clear accumulated git worktrees before a repo assessment?

The best way to clear accumulated git worktrees before a repo assessment is to use an orchestrated cleanup sequence. It reviews worktrees, removes those with merged PRs and deleted remote branches, and flags stale worktrees with no commits in 7+ days for your review.

Does the git cleanup workflow automatically delete branches matching wip-* and temp-* patterns?

No, the git cleanup workflow does not automatically delete branches matching wip-* or temp-* patterns. It categorizes these pattern-based branches and generates a single bash script for your explicit approval, ensuring you maintain control over all branch deletions.