worktree-close-cleanup

Close, remove, and clean up git worktrees without residual metadata.

16|3|Updated Jun 8, 2026
One-click install
npx skills add https://github.com/Yomiamy/flutter_inspector_kit --skill worktree-close-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-close-cleanup
Source: https://github.com/Yomiamy/flutter_inspector_kit/tree/main/.claude/skills/worktree-close-cleanup
Command: npx skills add https://github.com/Yomiamy/flutter_inspector_kit --skill worktree-close-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the process of closing, removing, and cleaning up git worktrees, ensuring a safe and efficient workflow without leaving any residual git metadata.

Core Features & Use Cases

  • Worktree State Check: Inspects the worktree status before removal.
  • Cleanup and Removal: Safely removes worktree without affecting corresponding branches.
  • Use Case: Use this Skill to cleanly remove a git worktree after completing development, without leaving any traces or affecting related branches.

Quick Start

Run the 'worktree-close-cleanup' skill to clean up and remove the specified git worktree.

Frequently Asked Questions about worktree-close-cleanup

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

FAQPage Schema
How do I safely remove a git worktree without deleting the branch?

To safely remove a git worktree without affecting the corresponding branch, you must inspect the worktree status before removal and execute a safe cleanup that eliminates the worktree directory and its residual git metadata.

What is the best way to clean up git worktrees after finishing development?

The best way to clean up git worktrees after development is to automate the safe closure and removal process, guaranteeing a clean repository by ensuring no residual git metadata is left behind in the main directory.

Why does git leave residual metadata after worktree removal?

Git leaves residual metadata after worktree removal when the deletion process is incomplete or improperly executed, which is why an automated cleanup specifically targets and clears these leftover traces for proper repo maintenance.

Can I automate git worktree cleanup to maintain a clean repository?

Yes, you can automate git worktree cleanup to maintain a clean repository by running a process that handles the safe closure, removal, and complete elimination of worktree metadata automatically.

How do I check git worktree state before removal?

To check the git worktree state before removal, you inspect the worktree status to ensure it is safe to delete, preventing data loss or orphaned branches during the repository maintenance process.