parallel-cleanup

Remove unused git worktrees and terminate tmux sessions.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/KazusaNakagawa/claude_docs --skill parallel-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: parallel-cleanup
Source: https://github.com/KazusaNakagawa/claude_docs/tree/main/.claude/skills/parallel-cleanup
Command: npx skills add https://github.com/KazusaNakagawa/claude_docs --skill parallel-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Clean up the parallel development environment by removing git worktrees and killing tmux sessions to restore a clean and ready-to-work state.

Core Features & Use Cases

  • List active git worktrees and tmux sessions to understand current state.
  • Confirm with the user before removing any worktrees or killing sessions.
  • Remove parallel-dev worktrees, prune metadata, and return to the main repository.
  • Return to develop branch and verify a clean working environment.

Quick Start

Run /parallel-cleanup to start cleaning up the current parallel development session.

Frequently Asked Questions about parallel-cleanup

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

FAQPage Schema
How do I clean up unused git worktrees and tmux sessions after parallel development?

To clean up unused git worktrees and terminate tmux sessions, you can run a cleanup process that lists active worktrees and sessions, confirms removals with you, prunes metadata, and checks out your develop branch.

What is the best way to remove multiple git worktrees and restore the main repository?

The best way to remove multiple git worktrees and restore the main repository is to list the current worktree state, confirm the specific worktrees to remove, prune the metadata, and perform a final checkout to the develop branch.

Does the git worktree cleanup process ask for confirmation before deleting worktrees?

Yes, the git worktree cleanup process asks for user confirmation before removing any worktrees or killing tmux sessions, ensuring you review the active state and approve the restoration to a clean development environment.

How do I kill tmux sessions and prune git worktree metadata safely?

You can kill tmux sessions and prune git worktree metadata safely by running a cleanup routine that checks the current parallel development state, prompts for user confirmation, removes the worktrees, and prunes the leftover metadata.

Can I automate the cleanup of parallel dev worktrees and return to the develop branch?

Yes, you can automate the cleanup of parallel dev worktrees to return to the develop branch by executing a workflow that checks active sessions, confirms removals, prunes worktree metadata, and verifies a clean working environment.