Agent skill · shipshitdev

git-cleanup

Fetches trunk, then proves candidate file content reached trunk before planning or removing merged branches and worktrees. Defaults to a read-only cleanup plan.

What it needs

About 6k tokens when loaded.

What this skill does

Git Cleanup Prove each candidate's work reached trunk, print a scoped plan, and remove only unchanged candidates covered by the user's cleanup request. Use the packaged scripts/cleanup.py for classification and deletion. Keep verification and execution on the same repository and machine. Contract Inputs: Repository root with an origin remote and authenticated GitHub access Optional trunk, otherwise the repository's default branch Mode: verify, dry-run (default), or prune; verify is a read-only alias that emits the same complete plan as dry-run Scope: all (default), branches, local-branches, remote-branches, or worktrees For pruning: the previously printed JSON plan and authorization for its scope Outputs: Repository identity, remote URL, current HEAD, trunk object ID, and selected scope Exact candidate refs, object IDs, worktree paths, and merge evidence Planned actions and skipped candidates with reasons Removed and skipped actions after revalidation Creates/Modifies: verify and dry-run fetch origin trunk, fast-forward the local trunk ref when it is a strict ancestor of origin, then print JSON to stdout prune deletes only the resources listed in the authorized plan A caller may explicitly save the plan under the repository's .tmp/ directory Fetch never uses --prune. Broad git worktree prune and git remote prune still do not run in any mode External Side Effects: Reads repository and paginated PR metadata from GitHub and live branch IDs from origin Deletes remote branches only when remote branches are in the authorized scope Does not merge, deploy, discard unmerged work, or rewrite surviving branches Confirmation Required: Show the exact plan before deletion. An explicit request to remove proven-merged resources authorizes those resources; preserve that authorization across turns. Ask for approval of the printed plan only when deletion or its scope has not already been authorized. --confirmed records existing authorization; it does not grant permission by itself. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills shipshitdev/git-cleanup--e39329

View the source on GitHub

Browse the @skills marketplace