worktree-finish

Automate verification, commit, push, no-ff merge, and worktree cleanup.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ttsmith21/swcsharpaddin --skill worktree-finish
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-finish
Source: https://github.com/ttsmith21/swcsharpaddin/tree/main/.claude/skills/worktree-finish
Command: npx skills add https://github.com/ttsmith21/swcsharpaddin --skill worktree-finish

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Finish a feature worktree workflow by automating verification, commits, pushes, and cleanup to keep the repository tidy and consistent.

Core Features & Use Cases

  • Finalizes worktrees: validates the current feature branch and ensures a clean state before merge.
  • Safe merging: uses a no-ff merge into main to preserve history.
  • Automated cleanup: removes the worktree and deletes the feature branch after merge.
  • Visibility & safety: outputs absolute paths for cleanup actions to prevent mistakes.

Quick Start

Run the finalization flow on your current feature worktree to verify the branch, commit changes with a clear message, push to origin, perform a no-ff merge into main, remove the worktree, and delete the feature branch.

Frequently Asked Questions about worktree-finish

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

FAQPage Schema
How do I automate git worktree cleanup after merging a feature branch?

Git worktree cleanup after a merge can be automated by running a finalization flow that verifies the branch, commits changes, pushes to origin, merges into main, and safely removes the worktree and feature branch.

What is the best way to merge a feature branch into main while preserving commit history?

The best way to preserve commit history when merging a feature branch is to use a no-ff merge into main, which keeps the feature branch's commit graph intact rather than flattening the commits into the main timeline.

How do I prevent repository drift when using multiple git worktrees?

Repository drift from multiple git worktrees is prevented by enforcing a clean working directory before operations and automating worktree removal immediately after a successful merge to delete stale references.

Can I force a merge in a feature worktree if my working directory has uncommitted changes?

No, the workflow enforces a clean working directory before proceeding and prevents destructive actions when rules are violated, ensuring uncommitted changes are resolved before attempting a merge or cleanup.

How do I safely delete a git worktree without accidentally removing the wrong files?

To safely delete a git worktree, the finalization process outputs absolute paths for all cleanup actions, preventing mistakes by making the exact target directories explicit before removing the worktree and its branch.