Stats
Actions
Tags
From agent-flywheel
Clean up orphaned git worktrees from crashed or stopped sessions.
How this command is triggered — by the user, by Claude, or both
Slash command
/agent-flywheel:flywheel-cleanupThe summary Claude sees in its command listing — used to decide when to auto-load this command
**First action:** Run `git worktree list --porcelain` via Bash and diff the result against `.pi-flywheel/checkpoint.json` to identify orphaned worktrees before prompting the user. Clean up orphaned git worktrees. 1. Run `git worktree list --porcelain` via Bash to list all active worktrees. 2. Compare against tracked worktrees in `.pi-flywheel/checkpoint.json` (if any). 3. Identify orphaned worktrees: exist on disk but not tracked in checkpoint, or checkpoint is gone. 4. For each orphan: - Check for uncommitted changes: `git -C <path> status --short` - If dirty, warn the user and ask...
First action: Run git worktree list --porcelain via Bash and diff the result against .pi-flywheel/checkpoint.json to identify orphaned worktrees before prompting the user.
Clean up orphaned git worktrees.
git worktree list --porcelain via Bash to list all active worktrees..pi-flywheel/checkpoint.json (if any).git -C <path> status --shortgit -C <path> add -A && git -C <path> commit -m "wip: orphaned worktree cleanup"git worktree remove --force <path> via Bash.npx claudepluginhub burningportra/agent-flywheel-plugin --plugin agent-flywheel