clean-worktrees

Identify and remove stale git worktrees managed by git-worktree-runner.

1|Updated Jun 25, 2026
One-click install
npx skills add https://github.com/dyoshikawa/webseek --skill clean-worktrees-dyoshikawa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-worktrees
Source: https://github.com/dyoshikawa/webseek/tree/main/.rulesync/skills/clean-worktrees
Command: npx skills add https://github.com/dyoshikawa/webseek --skill clean-worktrees-dyoshikawa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill resolves the clutter caused by abandoned git worktrees, ensuring your local repository remains organized and free of orphaned branches.

Core Features & Use Cases

  • Automated Listing: Quickly identifies all active worktrees managed by git-worktree-runner.
  • Bulk Removal: Safely removes non-default worktree branches to reclaim disk space.
  • Repository Sync: Automatically fetches updates and prunes deleted remote branches to keep your local state current.

Quick Start

Execute the clean-worktrees skill to identify and remove all stale git worktrees while pruning your remote branches.

Frequently Asked Questions about clean-worktrees

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

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

To clean up stale git worktrees, you can automate the identification and removal of orphaned branches. This skill lists active worktrees and safely removes non-default ones to reclaim disk space and reduce repository bloat.

Why does my local repository have so many orphaned git worktree branches?

Orphaned git worktree branches accumulate when frequent branch switching and experimental worktrees are abandoned. This skill resolves the resulting repository bloat by automating the identification and removal of stale worktrees.

Do I need git-worktree-runner installed to automate worktree cleanup?

Yes, you need git-worktree-runner installed and configured in your local environment. This skill specifically automates the cleanup of worktrees created by the git-worktree-runner utility.

Can I prune deleted remote branches while removing stale worktrees?

Yes, you can prune deleted remote branches during worktree cleanup. This skill automatically fetches updates and prunes remote branches alongside removing stale worktrees to keep your local repository state current.

What is the best way to automate git worktree maintenance?

The best way to automate git worktree maintenance is to use a skill that lists active worktrees, removes non-default branches, and syncs remotes. This automates the entire process, preventing repository bloat from experimental branches.