claude/.claude/skills/git-worktree-remove/SKILL.md
Remove git worktrees from .worktrees/ directory and clean up all traces. Use this when the user wants to delete a worktree they no longer need, with interactive selection if no worktree name is provided.
npx skillsauth add alex-popov-tech/.dotfiles git-worktree-removeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill removes git worktrees from the .worktrees/ directory and ensures all traces are completely cleaned up. It can remove a specific worktree by name or present an interactive selection menu when no name is provided.
Use this skill when the user needs to:
The skill uses a bash script (scripts/remove_worktree.sh) that:
/ with -) to match git-worktree-create behavior.worktrees/ directory existsgit worktree remove --force.worktrees/ directory if it becomes emptyscripts/remove_worktree.sh <worktree-name>
Examples:
# Remove worktree by directory name
scripts/remove_worktree.sh hotfix-123
# Remove worktree using original branch name (will be auto-sanitized)
scripts/remove_worktree.sh user.name/AOF-123
# This will remove: .worktrees/user.name-AOF-123
# Both approaches work the same:
scripts/remove_worktree.sh feature/new-feature
scripts/remove_worktree.sh feature-new-feature
scripts/remove_worktree.sh
This will display a numbered list of available worktrees and prompt you to select one.
When called without arguments, the script displays:
No worktree name provided. Available worktrees:
[1] feature-branch
[2] hotfix-123
[3] bugfix-456
Select worktree to remove (number or name):
You can respond with either:
2)hotfix-123)--force flag to handle worktrees with uncommitted changesThe script ensures no traces remain by:
.worktrees/<worktree-name>).worktrees/ directory if emptyThe script will error if:
.worktrees/ directory exists# User has finished work on hotfix-123 worktree
$ scripts/remove_worktree.sh hotfix-123
⚠️ About to remove worktree: .worktrees/hotfix-123
Are you sure? (y/N): y
Removing worktree...
✅ Worktree removed successfully
Pruning worktree administrative data...
✅ Worktree 'hotfix-123' has been completely removed
All traces of the worktree have been cleaned up.
development
Detects TypeScript configuration and available compilation commands in a repository. Returns structured JSON output designed for consumption by the quality-gates-compilation agent. Checks for tsconfig.json, extracts compile commands from package.json, Makefile, and CLAUDE.md, and provides command sources for the agent to read directly.
tools
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
development
Detects Prettier configuration and formats code. This skill should be used for final cosmetic formatting before commits, after all logic and type fixes have been verified. Returns structured JSON with detection and format results.
tools
Create git worktrees in .worktrees/ for working on different branches without touching current working directory. Use this when the user needs to switch to another branch for quick fixes or temporary work while preserving uncommitted changes in their current worktree.