git-worktree-clean

Detect merged git worktrees and remove stale ones to reclaim disk space.

1|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/bossjones/boss-skills --skill git-worktree-clean-bossjones
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree-clean
Source: https://github.com/bossjones/boss-skills/tree/main/plugins/boss-dev/agent-harness/skills/git-worktree-clean
Command: npx skills add https://github.com/bossjones/boss-skills --skill git-worktree-clean-bossjones

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the cleanup of stale git worktrees, freeing up disk space and managing git repositories more efficiently.

Core Features & Use Cases

  • Merge Branch Detection: Automatically detects merged worktrees for removal.
  • Disk Usage Report: Provides a detailed report of space reclaimed.
  • Dry Run Option: Allows you to preview changes before they are made.
  • Use Case: When you have many feature worktrees and want to clean up merged ones to free up disk space, this Skill can be used to safely remove them.

Quick Start

Run the 'git-worktree-clean' command to automatically clean up stale worktrees in your current git repository.

Frequently Asked Questions about git-worktree-clean

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up stale git worktrees to reclaim disk space?

You can clean up stale git worktrees by running the git-worktree-clean command, which automatically detects merged branches and removes their associated worktrees to reclaim disk space in your repository.

Does git worktree cleanup detect which branches have been merged?

Yes, git worktree cleanup uses merge branch detection to identify stale worktrees. It checks which feature branches have been merged and flags their corresponding worktrees for safe removal.

Can I preview which git worktrees will be deleted before making changes?

Yes, you can use the dry run option to preview changes before they are made. This allows you to see exactly which stale worktrees will be removed and how much disk space will be reclaimed.

What is the best way to free up disk space from accumulated git worktrees?

The best way to free up disk space from accumulated git worktrees is to automate their cleanup using merge branch detection, which safely removes worktrees for merged branches and provides a report of space reclaimed.

Do I need any special dependencies to remove stale worktrees from my git repository?

No special dependencies are required to remove stale worktrees. You only need standard git commands for branch operations and directory traversal for disk usage accounting within your existing repository management workflow.

When should I not use automated worktree cleanup in my repository?

You should not use automated worktree cleanup if you have unmerged feature branches still in active development. The tool targets merged branches for removal, so unmerged work remains unaffected during the cleanup process.