worktree-cleanup

Installation
SKILL.md

Worktree cleanup

Reclaim local disk without deleting active work or uncommitted changes. Discovery is automatic. Deletion requires an explicit candidate list and a safety check for each path.

Subagents may communicate with each other, but no agent may communicate with a person. Repeat that sentence verbatim in every child prompt. Internal read-only audits are allowed. No agent may post, send, reply, or comment through an external service.

1. Snapshot

Record free space with df -h /. Run scripts/worktree-audit.sh [-b <ref>] [repo-path] and derive every candidate path from its git worktree list --porcelain inventory. Never hand-type or glob a broad worktree parent. The helper is read-only and uses local Git state. It does not fetch or inspect remote reviews or conversation transcripts. -h prints its usage.

The first output line, # base: <ref>, names the ref behind the BASE_MERGED column. Pass -b <ref> when the user names the branch work merges into. Without -b, the helper uses the first of origin/HEAD, origin/main, and origin/master that exists in local refs, and prints none with every row unknown when all are missing. An explicit -b ref that does not exist locally exits 1. An unknown option exits 2.

For each worktree, collect:

Installs
23
Repository
petalas/skills
GitHub Stars
1
First Seen
Aug 27, 2026