delete-worktree

Delete Git worktrees by name using makefile targets.

1|1|Updated Jan 1, 2026
One-click install
npx skills add https://github.com/wineast/agent0 --skill delete-worktree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: delete-worktree
Source: https://github.com/wineast/agent0/tree/main/.claude/skills/delete-worktree
Command: npx skills add https://github.com/wineast/agent0 --skill delete-worktree

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Managing multiple Git worktrees can become complicated, especially when needing to clean up or reorganize repositories. This Skill simplifies the process of deleting specific worktrees, avoiding manual error-prone steps.

Core Features & Use Cases

  • Worktree Management: List current worktrees and verify their existence before deletion.
  • Streamlined Deletion: Safely remove a specified worktree by name without affecting the main repository.
  • Use Case: Developers working on multiple feature branches can delete obsolete worktrees to free up space and reduce clutter efficiently.

Quick Start

Use the delete-worktree skill to remove a worktree named "hotfix" from your repository.

Frequently Asked Questions about delete-worktree

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

FAQPage Schema
How do I delete a Git worktree without affecting the main repository?

Deleting a Git worktree safely involves removing the specified workspace by name without impacting the main repository. This Skill validates worktree existence and applies Git commands via makefile targets for consistent operation.

What is the best way to clean up obsolete Git worktrees in my repository?

Cleaning up obsolete Git worktrees requires verifying the workspace existence before removal to prevent errors. This approach frees up space and reduces clutter efficiently across multiple feature branches.

Can I list and verify Git worktrees before removing them?

Yes, listing current Git worktrees and verifying their existence before deletion prevents accidental removal. This Skill provides worktree management features to check workspaces before executing deletion commands.

Does this worktree deletion method require any external dependencies?

No, this worktree deletion method requires no external dependencies. It utilizes standard Git commands wrapped in makefile targets to manage repository workspaces without installing additional packages or tools.

When should I remove worktrees using a makefile target instead of manual Git commands?

Removing worktrees via makefile targets is ideal when managing multiple feature branches to avoid manual error-prone steps. It provides consistent operation and validation, simplifying repository reorganization and workspace cleanup.