worktree-finish

Merges a verified Git worktree branch and cleans it up afterward.

1|1|Updated Feb 1, 2026
One-click install
npx skills add https://github.com/corbat-tech/coco --skill worktree-finish-corbat-tech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-finish
Source: https://github.com/corbat-tech/coco/tree/main/.claude/skills/worktree-finish
Command: npx skills add https://github.com/corbat-tech/coco --skill worktree-finish-corbat-tech

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill streamlines the process of integrating completed feature work from a Git worktree back into the main development branch, ensuring code quality and cleaning up associated branches and directories.

Core Features & Use Cases

  • Automated Merging: Safely merges feature branches from isolated worktrees into main.
  • Pre-merge Checks: Runs automated tests and checks within the worktree before merging to catch issues early.
  • Cleanup: Removes the worktree directory and deletes the feature branch post-merge.
  • Use Case: After developing a new authentication module in a separate worktree, use this Skill to merge the changes into main, run all tests, and then automatically clean up the worktree and branch.

Quick Start

Run /worktree-finish auth-refactor from your original project directory to merge the 'work/auth-refactor' branch into main and clean up.

Frequently Asked Questions about worktree-finish

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

FAQPage Schema
How do I merge a git worktree branch back into main?

To merge a git worktree branch back into main, you can run a single command from your original project directory to safely integrate the feature branch, run automated pre-merge checks, and clean up the worktree.

Can I run automated tests before merging a worktree branch?

Yes, you can run automated tests before merging a worktree branch. The process validates worktree integrity and executes project-specific test scripts within the worktree to catch issues early before the actual merge.

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

The best way to clean up git worktrees after merging is to use an automated process that removes the worktree directory and deletes the feature branch post-merge, ensuring no leftover local artifacts remain.

How does merge conflict handling work during worktree branch integration?

Merge conflict handling during worktree branch integration works by gracefully managing conflicts encountered during the merge process, preventing broken states while safely attempting to integrate the feature branch into the main development branch.

Do I need to manually delete a git feature branch after using a worktree?

No, you do not need to manually delete a git feature branch after using a worktree. The automated cleanup process removes both the worktree directory and the associated feature branch automatically once the merge is complete.

Why should I use a worktree for feature branch development instead of a standard branch?

You should use a worktree for feature branch development to isolate new modules in separate directories, allowing you to validate worktree integrity and run specific test scripts independently before merging back into main.