Remove Worktree
Use when user wants to safely remove an autonomy worktree while preserving the branch
Install
/plugin marketplace add tilmon-engineering/claude-skillsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add tilmon-engineering/claude-skills --skill remove-worktreegit clone --depth 1 https://github.com/tilmon-engineering/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/plugins/autonomy/skills/remove-worktree ~/.claude/skills/remove-worktreePersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Removing Worktree ## Overview Safely remove an autonomy worktree directory while preserving the autonomy branch, all commits, and iteration history. Only removes the working directory; git history remains intact. **Core principle:** Worktree removal is destructive for working directory but non-destructive for git history. Branch and all commits persist. ## When to Use Use this skill when: - User runs `/remove-worktree` command - User finished with worktree and wants to clean up disk space - User wants to recreate worktree from scratch - User made mistakes in worktree and wants fresh start **DO NOT use for:** - Deleting branches (use git directly) - Deleting iterations or journals (those are committed, can't be removed this way) - Cleaning up non-autonomy worktrees ## Quick Reference | Step | Action | Tool | |------|--------|------| | 1. Parse arguments | Extract --force flag and strategy-name | Manual | | 2. Detect repository root | Find git root from anywhere | Bash | | 3. Validate worktree exists | Check .worktrees/autonomy/<strategy-name>/ exists | Bash | | 4. Safety checks | Check uncommitted changes (unless --force) | Bash | | 5. Remove worktree | git worktree remove | Bash | | 6. Cleanup metadata | git worktree prune | Bash | | 7. Report success | Confirm removal, note branch persists | Direct output | ## Process ### Step 1: Parse Arguments Extract arguments from command args: **Format:** `[--force] <strategy-name>` **Parse:**
Details
- Skill name
remove-worktree- Repository
- tilmon-engineering/claude-skills
- Path
plugins/autonomy/skills/remove-worktree/SKILL.md- License
- MIT
- Repo updated
- 22 May 2026
FAQ
What does the Remove Worktree skill do?
Use when user wants to safely remove an autonomy worktree while preserving the branch
How do I install the Remove Worktree skill?
Claude Code plugin: /plugin marketplace add tilmon-engineering/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Remove Worktree popular?
It lives in tilmon-engineering/claude-skills, which has 5 GitHub stars and 2 forks.
Related skills
Analyze Branch
5tilmon-engineering/claude-skills
Use when analyzing another branch's iteration journals to extract findings, decisions, and insights from divergent work
Branch Status
5tilmon-engineering/claude-skills
Use when user wants detailed status report for single autonomy branch including iteration timeline and metrics progression
Checkpoint Iteration
5tilmon-engineering/claude-skills
Use when saving current iteration progress mid-conversation, before context compaction, or at interim pause points
Slime
5tilmon-engineering/claude-skills
Use when user wants to set up slime mold exploration strategy with parallel autonomy branches for genetic algorithm approach to problem-solving
List Branches
5tilmon-engineering/claude-skills
Use when user wants to inventory autonomy branches with custom sorting, grouping, or filtering
Address PR Comments
8ranbot-ai/awesome-skills
First, check the branch {{ BRANCH_NAME }} and read the diff against the main branch to understand the purpose.
Browse the most popular Claude skills, all git & code review skills, or write your own with the skills generator.