remove-worktree

Remove a Git worktree and its associated branch with confirmation or force.

3|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/GDSDN/kord-aios --skill remove-worktree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: remove-worktree
Source: https://github.com/GDSDN/kord-aios/tree/main/src/features/builtin-skills/kord-aios/worktrees/remove-worktree
Command: npx skills add https://github.com/GDSDN/kord-aios --skill remove-worktree

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automates the removal of Git worktrees and their associated branches, preventing data loss and ensuring a clean repository state.

Core Features & Use Cases

  • Safe Removal: Interactive mode confirms deletion and warns about uncommitted changes.
  • Force Removal: Option to bypass checks and force removal, useful for cleanup.
  • Use Case: After completing a feature in a separate worktree, use this Skill to cleanly remove the worktree and its branch from your project.

Quick Start

Use the remove-worktree skill to remove the worktree associated with story ID 'feature-123'.

Frequently Asked Questions about remove-worktree

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

FAQPage Schema
How do I safely remove a Git worktree and its associated branch?

To safely remove a Git worktree and its branch, use an interactive mode that validates worktree existence, warns about uncommitted changes, and prompts for confirmation before proceeding with deletion.

Can I force delete a Git worktree that has uncommitted changes?

Yes, you can force delete a Git worktree with uncommitted changes by using a force removal option that bypasses safety checks, which is useful for automated repository cleanup without interactive confirmation.

What happens if I try to delete a Git worktree that does not exist?

When deleting a Git worktree, the process validates worktree existence first and provides detailed feedback on the removal process, ensuring you are alerted if the target worktree is not found.

How do I clean up multiple Git worktrees after completing feature branches?

To clean up Git worktrees after completing features, use a removal process that deletes both the worktree and its associated branch, ensuring a clean repository state and preventing data loss.

Does interactive worktree removal warn me before deleting uncommitted changes?

Yes, interactive worktree removal warns you about uncommitted changes before deletion, requiring explicit confirmation to proceed, which prevents accidental data loss during repository management.

When should I use force deletion instead of interactive confirmation for Git worktrees?

Use force deletion for Git worktrees during automated cleanup tasks where bypassing uncommitted change warnings and existence validations is necessary, whereas interactive confirmation is best for manual repository management.