worktree-merge

Squash-merge a worktree branch into a target branch with a structured commit message.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/leessju/claude-skills --skill worktree-merge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-merge
Source: https://github.com/leessju/claude-skills/tree/main/worktree-merge
Command: npx skills add https://github.com/leessju/claude-skills --skill worktree-merge

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates squash-merging the worktree branch into the target branch with a comprehensive, structured commit message.

Core Features & Use Cases

  • Phase-driven workflow including validation, research, and target preparation to produce a high-quality commit message.
  • Analyzes commit history and worktree diffs to craft context-rich messages that accurately reflect changes.
  • Handles conflicts by reporting them clearly and stopping for manual resolution.

Quick Start

From inside a git worktree, run the worktree-merge skill with an optional target-branch argument to perform a squash merge and generate a structured commit message.

Frequently Asked Questions about worktree-merge

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

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

To squash-merge a git worktree branch, run the skill from inside the worktree with an optional target-branch argument. It validates the state, analyzes diffs, executes the squash merge, and crafts a structured commit message.

Can I automatically generate commit messages for multiple commits in a feature branch?

Yes, you can automatically generate commit messages by analyzing the worktree commit history and file diffs. The skill crafts a comprehensive, structured message that accurately reflects changes spanning multiple commits and files.

What's the best way to handle conflicts during a squash merge in a git worktree?

The best way to handle conflicts during a squash merge is to let the skill detect them. It reports conflicts clearly and stops the automated process for manual resolution before proceeding with the commit message generation.

How does a phase-driven workflow improve git branch merging?

A phase-driven workflow improves merging by executing validation, research, and target preparation before the actual squash merge. This ensures high-quality, context-rich commit messages that accurately reflect the worktree changes.

Do I need to manually prepare the target branch before squash-merging worktree changes?

No, you do not need to manually prepare the target branch. The skill includes a target preparation phase that readies the destination branch before executing the squash merge and generating the structured commit message.

Does squash-merge worktree automation work for solo repositories?

Yes, squash-merge worktree automation works for both collaborative and solo repositories that use feature branches. It applies native git commands to automate merging and produce structured commit messaging.