worktree-teardown

Close cmux workspaces and remove git worktrees with branch cleanup.

Updated Nov 9, 2025
One-click install
npx skills add https://github.com/manifoldlogic/claude-code-plugins --skill worktree-teardown
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-teardown
Source: https://github.com/manifoldlogic/claude-code-plugins/tree/main/plugins/devx/skills/worktree-teardown
Command: npx skills add https://github.com/manifoldlogic/claude-code-plugins --skill worktree-teardown

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires cmux, crewchief, cleanup-worktree.sh, and includes scripts (resource) components.

What problem does it solve?

This Skill automates the process of closing cmux workspaces and cleaning up git worktrees, saving time and reducing manual errors in your development workflow.

Core Features & Use Cases

  • Automated Workspace Closure: Closes cmux workspaces associated with git worktrees.
  • Worktree Cleanup: Removes git worktrees, ensuring a clean development environment.
  • Use Case: Ideal for developers finishing work on tickets and wanting to remove their associated worktree and workspace without manual intervention.

Quick Start

Run the teardown-worktree.sh script with the name of your worktree and repository, e.g., teardown-worktree.sh DEVX-1001 --repo crewchief.

Frequently Asked Questions about worktree-teardown

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

FAQPage Schema
How do I automatically close a cmux workspace and clean up a git worktree?

To clean up a git worktree and close a cmux workspace, you can run the teardown-worktree.sh script with the worktree name and repository. This automates workspace closure, worktree removal, and branch cleanup in one step.

Do I need cmux and crewchief to remove git worktrees automatically?

Yes, removing git worktrees automatically requires cmux, crewchief CLI, and the cleanup-worktree.sh script for execution. These dependencies handle the underlying workspace closure and branch cleanup operations.

What is the best way to remove git worktrees after finishing a development ticket?

The best way to remove git worktrees after finishing a ticket is to run an automated teardown script. This ensures a clean development environment by handling workspace closure and worktree removal without manual errors.

How does automated worktree teardown keep development environments clean?

Automated worktree teardown keeps development environments clean by handling workspace closure, removing the git worktree, and cleaning up associated branches. This leaves your repository in a pristine state after ticket completion.

Can I use a script to teardown multiple git worktrees and cmux workspaces at once?

The provided teardown-worktree.sh script targets specific worktrees by name and repository, such as DEVX-1001. It focuses on individual worktree and cmux workspace cleanup rather than batch operations.