git-worktree-remove

Remove a git worktree and its branches after safety checks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill allows you to safely remove a git worktree along with its local and remote branches, ensuring safety checks and cleanup before deletion.

Core Features & Use Cases

  • Safely Remove Worktree: Removes a git worktree and its branches after running safety checks.
  • Safety Checks: Checks for protected branches, uncommitted changes, and merge status.
  • Cleanup: Deletes local and remote branches, and prunes references.
  • Use Case: When you are done with a feature worktree and want to remove it securely.

Quick Start

Use the /git-worktree-remove skill to remove the worktree named 'auth'.

Frequently Asked Questions about git-worktree-remove

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

FAQPage Schema
How do I safely remove a git worktree and its branches?

To safely remove a git worktree, this skill performs safety checks for uncommitted changes and protected branches, then deletes the worktree alongside its local and remote branches while pruning references.

What happens if I try to delete a git worktree with uncommitted changes?

When removing a git worktree with uncommitted changes, the skill executes safety checks to detect them, preventing accidental data loss and ensuring your modifications are handled correctly before deletion proceeds.

Can I use this to delete a git worktree on a protected branch?

No, this skill includes safety checks that identify protected branches, ensuring that any attempt to remove a git worktree on a protected branch is halted to prevent accidental deletion of critical code.

Does removing a git worktree also delete the associated local and remote branches?

Yes, removing a git worktree with this skill includes cleanup steps that delete both local and remote branches associated with the worktree, and it prunes outdated references to keep your repository clean.

When should I clean up git worktrees in my development workflow?

You should clean up git worktrees when you are done with a feature branch and want to securely remove the worktree, ensuring that branch management stays organized without leftover development artifacts.