home/dot_agents/skills/remove-worktree/SKILL.md
Remove git worktrees using the Worktrunk CLI `wt`. Use this skill when the user asks to "remove a worktree", "delete a worktree", "clean up a worktree", "remove branch worktree", or wants to get rid of a parallel development environment. Also trigger when the user mentions removing or deleting worktrees in any form.
npx skillsauth add deferred/dotfiles remove-worktreeInstall 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.
Use the Worktrunk CLI wt to remove git worktrees.
Identify the target worktree from the user's request.
Confirm which worktree to remove only if the target is unclear. If it is obvious from context, such as "remove the feature-x worktree", proceed without asking.
Run the removal:
wt remove <branch> --foreground
Omit <branch> to remove the current worktree.
Handle failures. If the command fails, suggest the appropriate flag:
--force (-f)--force-delete (-D)Always explain what the flag does before running with it, so the user can make an informed call.
Verify the command succeeded and report the result to the user.
| Flag | When to use |
| --- | --- |
| --force / -f | Worktree has untracked files (will not affect the branch) |
| --force-delete / -D | Branch has unmerged commits |
| --no-delete-branch | Keep the branch after removing the worktree |
| --foreground | Wait for completion (recommended when running as an agent) |
By default, wt remove also deletes the branch if it is already merged. That is usually what you want.
Use --no-delete-branch if the user wants to keep the branch.
testing
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
testing
Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
development
Write and revise Markdown so it is clean, scannable, and consistent. Use this skill whenever you are about to produce Markdown of any kind, including READMEs, docs, guides, notes, reports, issue bodies, pull request text, or comments, even if the user did not explicitly ask for Markdown formatting.
research
Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping