开发与测试
clean-worktrees
Remove git worktrees safely without force. Use when the user asks to remove, clean up, or delete git worktrees.
motlin · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add motlin/claude-code-plugins --skill clean-worktrees技能说明
name: clean-worktrees description: Remove git worktrees safely without force. Use when the user asks to remove, clean up, or delete git worktrees.
Clean Worktrees
Remove exactly the worktrees the user named. If they named none, ask which ones.
Don't pre-check for local changes or unpushed commits (git status, git log). Run the removal and let Git refuse when it is unsafe:
git worktree remove <worktree>
Without --force, Git exits with an error when the worktree has modified or untracked files. If Git refuses, report the error. Never add --force.