Cleanup Worktree banner
lazynet lazynet

Cleanup Worktree

Git community

Description

--- description: Remove a merged worktree and its branch after verifying it was merged into main argument-hint: <short-name> (the directory name under .worktrees/, without the type prefix) --- You are cleaning up the worktree `.worktrees/$ARGUMENTS` and its associated branch. This command must never remove unmerged work — verify first, remove second. ## Validation (do this first, in order) 1. Confirm `.worktrees/$ARGUMENTS` exists. If not, stop and tell the user nothing to clean. 2. Identify

Installation

Installs to ~/.claude/commands/lazynet-lazy-harness-cleanup-worktree.md

Terminal
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/lazynet/lazy-harness/HEAD/.claude/commands/cleanup-worktree.md -o ~/.claude/commands/lazynet-lazy-harness-cleanup-worktree.md

Restart Claude Code, or start a new session, for it to be picked up.

Full documentation available on GitHub

View Source Repository