Registry / davila7

davila7/claude-code-templates/worktree-cleaner

Inventory the git worktrees of the current repository, classify each one with evidence (merged, PR state, uncommitted or unpushed work, locked, stale, in use by a running session) and remove them one at a time or by group, always asking the user first and verifying every removal. Use when worktrees have piled up (for example one per Claude Code task or thread), when `git worktree list` is long, or when the user asks to clean up, prune or tidy worktrees.

Agent skill · version 0.0.0-main.1794316138.ga6e6f93 · from davila7/claude-code-templates

Install

npx yarkr-cli add skill:davila7/claude-code-templates/worktree-cleaner

Without Node.js, on macOS and Linux (curl or wget):

curl -fsSL https://yarkr.com/install.sh | sh -s -- add skill:davila7/claude-code-templates/worktree-cleaner
wget -qO- https://yarkr.com/install.sh | sh -s -- add skill:davila7/claude-code-templates/worktree-cleaner

On Windows, in PowerShell:

irm https://yarkr.com/install.ps1 | iex; yarkr add skill:davila7/claude-code-templates/worktree-cleaner

Works with Claude Code, Codex, opencode, Cursor, any harness over MCP.